获取windows操作系统版本号,威海印机新产品顺利通过鉴定委员会的验收
分类:web前端

搞了一点次 下了个WIN TC 复制三个小程序  运维一下  却突显用笔者的WIN7 六十一位操作系统不相配   用了一个C-FREE   感到强逼接纳  生手  决定 去走 IT这条路...我看的是C的书 

//操作系统版本

   在接受一些新本子的API,可能控件的新特点(例如新版的ComCtl32.dll)的时候,你或许会博得“error C2065: undeclared identifier.“那一个错误。原因是那么些功能是依据于你的操作系统的本子的。而你的头文件中的定义实际不是最新的。(对于MFC,便是stdafx.h)上面详细罗列了每种Windows版本对应的NTDDI_VERSION,_WIN32_WINNT,WINVER,_WIN32_IE这些宏。

ppzhan摘要】近期,威海印刷机械有限集团支付的WIN924四色胶印机、WIN564四色胶印机、WIN524四色柔印机、WIN560柔印机、WIN520胶印机等多个新付加物,顺利通过了由国内机构行家结合的评议委员会的检验收下。

有协作爱好的爱人   望 能够 商量   本人小白  求升高

#define WINXP                  51

 

后日,临安印制机械有限公司花销的WIN924四色柔印机、WIN564四色柔印机、WIN524四色柔印机、WIN560柔印机、WIN520柔印机等八个新产物,顺遂通过了由本国机构行家结合的裁委会的验收,并对威印产物予以了中度评价。

#define WINXP2600              512600

The following table describes the preferred macros in use by the Windows header files.

大方委员会评定感觉,WIN924四色柔印机手艺先进,改良点出色,,到达同类产物的国际先进度度。

#define WIN7                    61

Minimum system required                Macros to define 
Windows Server 2008                     NTDDI_VERSION >= NTDDI_LONGHORN 
Windows Vista                                NTDDI_VERSION >= NTDDI_VISTA 
Windows Server 2003 SP1                 NTDDI_VERSION >= NTDDI_WS03SP1 
Windows Server 2003                     NTDDI_VERSION >= NTDDI_WS03 
Windows XP SP2                          NTDDI_VERSION >= NTDDI_WINXPSP2 
Windows XP SP1                          NTDDI_VERSION >= NTDDI_WINXPSP1 
Windows XP                                  NTDDI_VERSION >= NTDDI_WINXP 
Windows 2000 SP4                        NTDDI_VERSION >= NTDDI_WIN2KSP4 
Windows 2000 SP3                        NTDDI_VERSION >= NTDDI_WIN2KSP3 
Windows 2000 SP2                        NTDDI_VERSION >= NTDDI_WIN2KSP2 
Windows 2000 SP1                        NTDDI_VERSION >= NTDDI_WIN2KSP1 
Windows 2000                                NTDDI_VERSION >= NTDDI_WIN2K

WIN564四色柔印机、WIN524四色胶印机技艺先进,立异点优越,达到了同类产物国内超越。

#define WIN77600                617600

The following table describes the legacy macros in use by the Windows header files.

#define WIN77601                617601

Minimum system required                 Macros to define 
Windows Server 2008                      _WIN32_WINNT>=0x0600
                                                         WINVER>=0x0600
 
Windows Vista                            _WIN32_WINNT>=0x0600
                                                     WINVER>=0x0600
 
Windows Server 2003                      _WIN32_WINNT>=0x0502
                                                          WINVER>=0x0502
 
Windows XP                               _WIN32_WINNT>=0x0501
                                                       WINVER>=0x0501
 
Windows 2000                             _WIN32_WINNT>=0x0500
                                                      WINVER>=0x0500
 
Windows NT 4.0                           _WIN32_WINNT>=0x0400
                                                       WINVER>=0x0400
 
Windows Me                               _WIN32_WINDOWS=0x0500
                                                       WINVER>=0x0500
 
Windows 98                               _WIN32_WINDOWS>=0x0410
                                                   WINVER>=0x0410
 
Windows 95                               _WIN32_WINDOWS>=0x0400
                                                    WINVER>=0x0400
 
Internet Explorer 7.0                        _WIN32_IE>=0x0700 
Internet Explorer 6.0 SP2                 _WIN32_IE>=0x0603 
Internet Explorer 6.0 SP1                 _WIN32_IE>=0x0601 
Internet Explorer 6.0                        _WIN32_IE>=0x0600 
Internet Explorer 5.5                         _WIN32_IE>=0x0550 
Internet Explorer 5.01                        _WIN32_IE>=0x0501 
Internet Explorer 5.0, 5.0a, 5.0b          _WIN32_IE>=0x0500 
Internet Explorer 4.01                       _WIN32_IE>=0x0401 
Internet Explorer 4.0                          _WIN32_IE>=0x0400 
Internet Explorer 3.0, 3.01, 3.02        _WIN32_IE>=0x0300

#define WIN8                    62

#define WIN89200                629200

#define WIN81                  63

#define WIN819600              639600

#define WIN10                  100

#define WIN1010240              10010240

#define WIN1010586              10010586

#define WIN1014393              10014393

DWORD  __stdcall  GetWindowsVersion()

{

//定义变量

typedef LONG(__stdcall *fnRtlGetVersion)(PRTL_OSVERSIONINFOW lpVersionInformation);

fnRtlGetVersion pRtlGetVersion;

HMODULE hNtdll;

LONG ntStatus;

ULONG    dwMajorVersion = 0;

ULONG    dwMinorVersion = 0;

ULONG    dwBuildNumber = 0;

RTL_OSVERSIONINFOW VersionInformation = { 0 };

DWORD OsVersion;

do

{

hNtdll = GetModuleHandle(L"ntdll.dll");

if (hNtdll == NULL)break;

pRtlGetVersion = (fnRtlGetVersion)GetProcAddress(hNtdll, "RtlGetVersion");

if (pRtlGetVersion == NULL)break;

VersionInformation.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOW);

ntStatus = pRtlGetVersion(&VersionInformation);

if (ntStatus != 0)break;

dwMajorVersion = VersionInformation.dwMajorVersion;

dwMinorVersion = VersionInformation.dwMinorVersion;

dwBuildNumber = VersionInformation.dwBuildNumber;

if (dwMajorVersion == 5 && dwMinorVersion == 1 && dwBuildNumber == 2600)

OsVersion = WINXP2600;

else if (dwMajorVersion == 5 && dwMinorVersion == 1)

OsVersion = WINXP;

else if (dwMajorVersion == 6 && dwMinorVersion == 1 && dwBuildNumber == 7601)

OsVersion = WIN77601;

else if (dwMajorVersion == 6 && dwMinorVersion == 1 && dwBuildNumber == 7600)

OsVersion = WIN77600;

else if (dwMajorVersion == 6 && dwMinorVersion == 1)

OsVersion = WIN7;

else if (dwMajorVersion == 6 && dwMinorVersion == 2 && dwBuildNumber == 9200)

OsVersion = WIN89200;

else if (dwMajorVersion == 6 && dwMinorVersion == 2)

OsVersion = WIN8;

else if (dwMajorVersion == 6 && dwMinorVersion == 3 && dwBuildNumber == 9600)

OsVersion = WIN819600;

else if (dwMajorVersion == 6 && dwMinorVersion == 3)

OsVersion = WIN81;

else if (dwMajorVersion == 10 && dwMinorVersion == 0 && dwBuildNumber == 10240)

OsVersion = WIN1010240;

else if (dwMajorVersion == 10 && dwMinorVersion == 0 && dwBuildNumber == 10586)

OsVersion = WIN1010586;

else if (dwMajorVersion == 10 && dwMinorVersion == 0 && dwBuildNumber == 14393)

OsVersion = WIN1014393;

else if (dwMajorVersion == 10 && dwMinorVersion == 0)

OsVersion = WIN10;

else

{

return FALSE;

}

} while (FALSE);

return OsVersion;

}

本文由10bet手机官网发布于web前端,转载请注明出处:获取windows操作系统版本号,威海印机新产品顺利通过鉴定委员会的验收

上一篇:结构体变量与结构体数组,结构体类型定义 下一篇:没有了
猜你喜欢
热门排行
精彩图文