zoukankan      html  css  js  c++  java
  • GetSystemInfo()

    关于“GetSystemInfo()”的详细信息,参考:https://msdn.microsoft.com/en-us/library/windows/desktop/ms724381(v=vs.85).aspx

    Getting Hardware Information 例程:https://msdn.microsoft.com/en-us/library/windows/desktop/ms724423(v=vs.85).aspx

    函数原型:void WINAPI GetSystemInfo(   _Out_ LPSYSTEM_INFO lpSystemInfo );

    作用:获取当前系统的信息。

    参数:lpSystemInfo - A pointer to a SYSTEM_INFO structure that receives the information.

     1 #include <windows.h>
     2 #include <stdio.h>
     3 #pragma comment(lib, "user32.lib")
     4 
     5 int main()
     6 {
     7    SYSTEM_INFO siSysInfo;
     8 
     9    // Copy the hardware information to the SYSTEM_INFO structure.
    10 
    11    GetSystemInfo(&siSysInfo);
    12 
    13    // Display the contents of the SYSTEM_INFO structure.
    14 
    15    printf("Hardware information: 
    ");
    16    printf("  OEM ID: %u
    ", siSysInfo.dwOemId);
    17    printf("  Number of processors: %u
    ",
    18       siSysInfo.dwNumberOfProcessors);
    19    printf("  Page size: %u
    ", siSysInfo.dwPageSize);
    20    printf("  Processor type: %u
    ", siSysInfo.dwProcessorType);
    21    printf("  Minimum application address: %lx
    ",
    22       siSysInfo.lpMinimumApplicationAddress);
    23    printf("  Maximum application address: %lx
    ",
    24       siSysInfo.lpMaximumApplicationAddress);
    25    printf("  Active processor mask: %u
    ",
    26       siSysInfo.dwActiveProcessorMask);
    27     return 0;
    28 }
  • 相关阅读:
    P3478 [POI2008]STA-Station
    P2015 二叉苹果树
    P2014 选课 (树型背包模版)
    求树的每个子树的重心
    求树的直径
    Javascript--防抖与节流
    JavaScript中call和apply的区别
    解决谷歌浏览器“此Flash Player与您的地区不相容,请重新安装Flash”问题(最新版)
    matlab实验代码(总)
    表达式树
  • 原文地址:https://www.cnblogs.com/Satu/p/8194594.html
Copyright © 2011-2022 走看看