本文整理汇总了C++中SystemInfo::getWindowsEdition方法的典型用法代码示例。如果您正苦于以下问题:C++ SystemInfo::getWindowsEdition方法的具体用法?C++ SystemInfo::getWindowsEdition怎么用?C++ SystemInfo::getWindowsEdition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SystemInfo
的用法示例。
在下文中一共展示了SystemInfo::getWindowsEdition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
{
SystemInfo sysInfo;
TCHAR szServicePack[128] = { 0 };
switch (sysInfo.getWindowsVersion())
{
case Windows:
cout << "Windows" << endl;
break;
case Windows32s:
cout << "Windows 32s" << endl;
break;
case Windows95:
cout << "Windows 95" << endl;
break;
case Windows95OSR2:
cout << "Windows 95 SR2" << endl;
break;
case Windows98:
cout << "Windows 98" << endl;
break;
case Windows98SE:
cout << "Windows 98 SE" << endl;
break;
case WindowsMillennium:
cout << "Windows Me" << endl;
break;
case WindowsNT351:
cout << "Windows NT 3.51" << endl;
break;
case WindowsNT40:
cout << "Windows NT 4.0" << endl;
break;
case WindowsNT40Server:
cout << "Windows NT 4.0 Server" << endl;
break;
case Windows2000:
cout << "Windows 2000" << endl;
break;
case WindowsXP:
cout << "Windows XP" << endl;
break;
case WindowsXPProfessionalx64:
cout << "Windows XP Professional x64" << endl;
break;
case WindowsHomeServer:
cout << "Windows Home Server" << endl;
break;
case WindowsServer2003:
cout << "Windows Server 2003" << endl;
break;
case WindowsServer2003R2:
cout << "Windows Server 2003 R2" << endl;
break;
case WindowsVista:
cout << "Windows Vista" << endl;
break;
case WindowsServer2008:
cout << "Windows Server 2008" << endl;
break;
case WindowsServer2008R2:
cout << "Windows Server 2008 R2" << endl;
break;
case Windows7:
cout << "Windows 7" << endl;
break;
case Windows8Point1:
cout << "Windows 8.1" << endl;
case Windows10:
cout << "Windows 10 ";
break;
case WindowsServer2016TechnicalPreview:
cout << "Windows 10 Server" << endl;
break;
}
switch (sysInfo.getWindowsEdition())
{
//.........这里部分代码省略.........