当前位置: 首页>>代码示例>>C++>>正文


C++ SystemInfo::getWindowsEdition方法代码示例

本文整理汇总了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())
    {
//.........这里部分代码省略.........
开发者ID:yiminyangguang520,项目名称:HardwareInfoUtils,代码行数:101,代码来源:SystemVersion.cpp


注:本文中的SystemInfo::getWindowsEdition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。