用这个例子试试,其中的145558878用你的电脑上检测到的dwReserved来替换。 Private Type SYSTEM_INFO dwOemID As Long dwPageSize As Long lpMininumApplicationAddress As Long lpMaximumApplicationAddress As Long dwActiveProcessorMask As Long dwNumberOfProcessors As Long dwProcessorType As Long dwAllocationGranularity As Long dwReserved As Long End TypePrivate Declare Sub GetSystemInfo Lib "kernel32" _ (lpSystemInfo As SYSTEM_INFO)
Public Function IsValidComputer() As Boolean Dim sysinfo As SYSTEM_INFO GetSystemInfo sysinfoIf sysinfo.dwReserved = 145558878 Then IsValidComputer = True Else IsValidComputer = False End If End Function
Private Type SYSTEM_INFO
dwOemID As Long
dwPageSize As Long
lpMininumApplicationAddress As Long
lpMaximumApplicationAddress As Long
dwActiveProcessorMask As Long
dwNumberOfProcessors As Long
dwProcessorType As Long
dwAllocationGranularity As Long
dwReserved As Long
End TypePrivate Declare Sub GetSystemInfo Lib "kernel32" _
(lpSystemInfo As SYSTEM_INFO)
Public Function IsValidComputer() As Boolean
Dim sysinfo As SYSTEM_INFO
GetSystemInfo sysinfoIf sysinfo.dwReserved = 145558878 Then
IsValidComputer = True
Else
IsValidComputer = False
End If
End Function