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


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

本文整理汇总了C++中SystemInfo::getMajorVersion方法的典型用法代码示例。如果您正苦于以下问题:C++ SystemInfo::getMajorVersion方法的具体用法?C++ SystemInfo::getMajorVersion怎么用?C++ SystemInfo::getMajorVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SystemInfo的用法示例。


在下文中一共展示了SystemInfo::getMajorVersion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main


//.........这里部分代码省略.........
    case AdvancedServer:
        cout << "Advanced Server Edition" << endl;
        break;

    case Home:
        cout << "Home Edition" << endl;
        break;

    case Ultimate:
        cout << "Ultimate Edition" << endl;
        break;

    case HomeBasic:
        cout << "Home Basic Edition" << endl;
        break;

    case HomePremium:
        cout << "Home Premium Edition" << endl;
        break;

    case Enterprise:
        cout << "Enterprise Edition" << endl;
        break;

    case Professional:
        cout << "Professional Edition" << endl;
        break;

    case HomeBasic_N:
        cout << "Home Basic N Edition" << endl;
        break;

    case Business:
        cout << "Business Edition" << endl;
        break;

    case StandardServer:
        cout << "Standard Server Edition" << endl;
        break;

    case EnterpriseServerCore:
        cout << "Enterprise Server Core Edition" << endl;
        break;

    case EnterpriseServerIA64:
        cout << "Enterprise Server IA64 Edition" << endl;
        break;

    case Business_N:
        cout << "Business N Edition" << endl;
        break;

    case WebServer:
        cout << "Web Server Edition" << endl;
        break;

    case ClusterServer:
        cout << "Cluster Server Edition" << endl;
        break;

    case HomeServer:
        cout << "Home Server Edition" << endl;
        break;
    }

    cout << "Platform type: ";
    if (sysInfo.isNTPlatform())
    {
        cout << "NT" << endl;
    }
    else if (sysInfo.isWindowsPlatform())
    {
        cout << "Windows" << endl;
    }
    else if (sysInfo.isWin32sPlatform())
    {
        cout << "Win32s" << endl;
    }
    else
    {
        cout << "Unknown" << endl;
    }

    cout << "Major version: " << sysInfo.getMajorVersion() << endl;
    cout << "Minor version: " << sysInfo.getMinorVersion() << endl;
    cout << "Build number: " << sysInfo.getBuildNumber() << endl;

    sysInfo.getServicePackInfo(szServicePack);
    cout << "Service Pack info: " << szServicePack << endl;

    cout << "32-bit platform: " << std::boolalpha << sysInfo.is32bitPlatform() << endl;
    cout << "64-bit platform: " << std::boolalpha << sysInfo.is64bitPlatform() << endl;

    std::string softWareName1 = "360云盘";
    std::string softWareName2 = "Microsoft Visual Studio Professional 2015 - 简体中文"; 
    std::string softWareName = "支付宝安全控件 5.3.0.3807";
    cout << checkIsInstalled(softWareName);

    return 0;
}
开发者ID:yiminyangguang520,项目名称:HardwareInfoUtils,代码行数:101,代码来源:SystemVersion.cpp


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