Detect Win-64, NumberOfProcessors,CPU-Type
Posted: Sat Nov 05, 2005 1:58 pm
Code updated For 5.20+
while playing with X64,
while playing with X64,
Code: Select all
SysInfo64.SYSTEM_INFO
hLib = LoadLibrary_("KERNEL32.DLL")
Message.s
C.s=Chr(13)+Chr(10)
If hLib
ProcSI = GetProcAddress_(hLib, "GetNativeSystemInfo")
If ProcSI
RetL=CallFunctionFast(ProcSI ,@SysInfo64)
Message = "Processors type:" + Str(SysInfo64\dwProcessorType) + C
Message = Message + "Number of processors:" + Str(SysInfo64\dwNumberOfProcessors) + C + C
EndIf
ProcWow = GetProcAddress_(hLib, "IsWow64Process")
If ProcWow
PID=GetCurrentProcess_()
RetL=CallFunctionFast(ProcWow ,PID, @Wow64)
If Wow64
Message = Message + "Running under a 64 bit OS !" + C
Else
Message = Message + "Running under a 32 bit OS !" + C
EndIf
Else
Message = Message + "IsWow64Process function not supported" + C
EndIf
EndIf
MessageRequester("Info",Message,0)