首先还是要介绍一个基本姿势。首先是结构体:OSVERSIONINFOEX
该结构体包括了操作系统版本信息。
Contains operating system version information. The information includes major and minor version numbers, a build number, a platform identifier, and information about product suites and the latest Service Pack installed on the system.
语法如下:
typedef struct {
DWORD dwOSVersionInfoSize; //在使用GetVersionEx之前要将此初始化
//为结构的大小
DWORD dwMajorVersion; //系统主版本号
DWORD dwMinorVersion; //系统次版本号
DWORD dwBuildNumber; //系统构建号
DWORD dwPlatformId; //系统支持的平台(详见附1)
TCHAR szCSDVersion[
首先还是要介绍一个基本姿势。首先是结构体:OSVERSIONINFOEX
该结构体包括了操作系统版本信息。
Contains operating system version information. The information includes major and minor version numbers, a build number, a platform identifier, and information about product suites and the latest Service Pack installed on the system.
语法如下:
typedef struct {
DWORD dwOSVersionInfoSize; //在使用GetVersionEx之前要将此初始化
//为结构的大小
DWORD dwMajorVersion; //系统主版本号
DWORD dwMinorVersion; //系统次版本号
DWORD dwBuildNumber; //系统构建号
DWORD dwPlatformId; //系统支持的平台(详见附1)
TCHAR szCSDVersion[