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)
Prototype IsWow64Process(pid.l, *bResult)
Procedure.l IsWow64() ; For PB4.0
Protected bIsWow64.l = #False
fnIsWow64Process.IsWow64Process = GetProcAddress_(GetModuleHandle_("kernel32"), "IsWow64Process")
If fnIsWow64Process ; Windows XP+
If Not fnIsWow64Process(GetCurrentProcess_(), @bIsWow64)
; handle error
EndIf
EndIf
ProcedureReturn bIsWow64
EndProcedure
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer