osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx (&osvi);
 
typedef struct _OSVERSIONINFOEX {
DWORD dwOSVersionInfoSize;
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
TCHAR dwPlatformId;
TCHAR szCSDVersion[128];
WORD wServicePackMajor; //wServicePackMajor; //sp
WORD wServicePackMinor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
BYTE wProductType;
BYTE wReserved; } OSVERSIONINFOEX,
*POSVERSIONINFOEX,
*LPOSVERSIONINFOEX;

dwMajorVersion
Major version number of the operating system. This member can be one of the following values.
Value Meaning
4 Windows NT 4.0
5 Windows Server 2003, Windows XP, or Windows 2000
dwMinorVersion
Minor version number of the operating system. This member can be one of the following values.
Value Meaning
0 Windows 2000 or Windows NT 4.0
1 Windows XP
2 Windows Server 2003

相关文章:

  • 2022-03-10
  • 2021-05-29
  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2021-10-26
猜你喜欢
  • 2022-12-23
  • 2021-10-23
  • 2021-10-21
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案