[email protected] schrieb am Donnerstag, 27. Oktober 2022 um 19:23:55 UTC+2:
I am having trouble retrieving the correct data using the windows API calls to GetSystemInfo & GetNativeSystemInfo.
The version of CAVO I am using is CAVO 2.6 on a DELL G15 AMD64 Processor with Windows 11.
Executing the call to GetNativeSystemInfo returns;
wProcessorArchitecture == ZERO (0) PROCESSOR_ARCHITECTURE_INTEL
should be (9) PROCESSOR_ARCHITECTURE_AMD64
dwProcessorType == 586
Should be (8664) PROCESSOR_AMDX8664
The only thing I can think of is that my SYSTEM_INFO structure is not correctly defined.
If anyone has a working CAVO example including the structure declaration I would love to have it. Happy to post my code if required.
Thank you.
Hi, your code might help to see what may be wrong
i tried this and it works for me
STRUCT _winSYSTEM_INFO2
MEMBER Oem IS _OEM_INFO
MEMBER dwPageSize AS DWORD
MEMBER lpMinimumApplicationAddress AS PTR
MEMBER lpMaximumApplicationAddress AS PTR
MEMBER dwActiveProcessorMask AS DWORD
MEMBER dwNumberOfProcessors AS DWORD
MEMBER dwProcessorType AS DWORD
MEMBER dwAllocationGranularity AS DWORD
MEMBER wProcessorLevel AS WORD
MEMBER wProcessorRevision AS WORD
UNION _OEM_INFO
MEMBER dwOemId AS DWORD
MEMBER OEMINFONAME IS _OEM_INFONAME
STRUCT _OEM_INFONAME
MEMBER wProcessorArchitecture AS DWORD
MEMBER wReserved AS DWORD
FUNCTION Start(p)
LOCAL oCon AS Console
LOCAL sInf IS _winSYSTEM_INFO2
oCon := Console{}
GetNativeSystemInfo( @sInf )
oCon:WriteLine ( "Oem.dwOemId : " + NTrim( sInf.Oem.dwOemId ))
oCon:WriteLine ( "Oem.OEMINFONAME.wProcessorArchitecture : " + NTrim( sInf.Oem.OEMINFONAME.wProcessorArchitecture ))
oCon:WriteLine ( "Oem.OEMINFONAME.wReserved : " + NTrim( sInf.Oem.OEMINFONAME.wReserved ))
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)