Hi!
I have a Problem with the API "GetVersionEx" i Need the Information wich Windows System is running.
Microsoft mean this:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724834(v=vs.85).aspx
But I become sometimes the wrong Version back e.g:
Windows VISTA and Windows 2008 Server have the same Version Number the different is:
OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION / OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
But i become not the Information back about wProductType...
Her are more Details:
01 OSVERSIONINFO is typedef.
03 dwOSVersionInfoSize DWORD.
03 dwMajorVersion DWORD.
03 dwMinorVersion DWORD.
03 dwBuildNumberFull.
05 dwBuildNumber USHORT.
05 dwMajorAndMinor USHORT.
03 dwPlatformId DWORD.
03 szCSDVersion PIC X(128).
03 dwServicePack DWORD.
03 dwMinorPack DWORD.
03 dwSuiteMask DWORD.
03 dwProductType BYTE.
03 wReserved BYTE.
78 OSVERSIZE VALUE 148.
78 GetVersionEx VALUE "GetVersionExA".
01 WS-MYOSVER OSVERSIONINFO.
01 WS-MYOSOK BOOL.
here is the call:
INITIALIZE VERSIONINFOEX.
move OSVERSIZE to dwOSVersionInfoSize of ws-myOSVer.
CALL WINAPI GetVersionEx uSING
BY REFERENCE WS-MYOSVER
RETURNING WS-MYOSOK
END-CALL.
The "dwProductType" is every time 0 on everey Windows Version
The same Problem is between Windows 8 and 2012 Server and so on...
Have anyone an idea whats wrong?
Best Regards
Bernd
#APIGetVersionEx




