该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
GetVersionEx
The GetVersionEx function obtains extended information about the version of the operating system that is currently running.
To compare the current system version to a required version, use the VerifyVersionInfo function instead of using GetVersionEx to perform the comparison yourself.
BOOL GetVersionEx(
LPOSVERSIONINFO lpVersionInfo
);
Parameters
lpVersionInfo
[in, out] Pointer to an OSVERSIONINFO data structure that the function fills with operating system version information.
Before calling the GetVersionEx function, set the dwOSVersionInfoSize member of this structure to sizeof(OSVERSIONINFO).
Windows NT 4.0 SP6 and later: This member can be a pointer to an OSVERSIONINFOEX structure. Set the dwOSVersionInfoSize member to sizeof(OSVERSIONINFOEX) to identify the structure type.
Return Values
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError. The function fails if you specify an invalid value for the dwOSVersionInfoSize member of the OSVERSIONINFO or OSVERSIONINFOEX structure.