• GetSystemInfo, GetNativeSystemInfo

    From Nick Vlachou@21:1/5 to All on Thu Oct 27 10:23:54 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve Hagedorn@21:1/5 to nickvl...@gmail.com on Fri Oct 28 02:17:37 2022
    nickvl...@gmail.com 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)
  • From Nick Vlachou@21:1/5 to All on Fri Oct 28 17:33:22 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sonsonora@21:1/5 to All on Fri Jun 9 11:27:01 2023
    El jueves, 27 de octubre de 2022 a la(s) 10:23:55 UTC-7, Nick Vlachou escribió:
    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.
    do you know where i can download cavo 2.6? i need for fix a very old app (sorri, i already not using cavo)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)