Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GetSystemInfo, GetNativeSystemInfo

227 views
Skip to first unread message

Nick Vlachou

unread,
Oct 27, 2022, 1:23:55 PM10/27/22
to
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.

Steve Hagedorn

unread,
Oct 28, 2022, 5:17:38 AM10/28/22
to
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 ))



Nick Vlachou

unread,
Oct 28, 2022, 8:33:23 PM10/28/22
to
Thanks for uploading the code Stv.

My code was pretty much identical to yours but just in case, I created a new module containing your code which gave identical results to those I had been achieving. On the same PC, Calling "GetNativeSystemInfo" using Pascal, I am receiving correct results. The Pascal is 32bit just as CAVO26 is.
The PC is "64-bit operating system", "x64-based processor" using "Windows 11 Home". I feel confident the code is correct as the results from the 2 different programs only differ in the values returned in the ProcessorArchitecture & the ProcessorType variables. All the other 9 values are identical.

I created the CAVO EXE and copied both the CAVO & the Pascal EXE's to another PC. Both programs returned identical results on this PC. The 2nd PC has ""32-bit operating system", "x64-based processor" using "Windows 10 Home".

If you care to email me I can attach images to show you the differences.

For the moment I have taken a different approach to gather the information I need.

Again, thank you so much for your speedy response.
Cheers.

Sonsonora

unread,
Jun 9, 2023, 2:27:02 PM6/9/23
to
do you know where i can download cavo 2.6? i need for fix a very old app (sorri, i already not using cavo)
0 new messages