青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

twzheng's cppblog

『站在風(fēng)口浪尖緊握住鼠標(biāo)旋轉(zhuǎn)!』 http://www.cnblogs.com/twzheng

  C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
  136 隨筆 :: 78 文章 :: 353 評論 :: 0 Trackbacks

GetSystemInfo

GetSystemInfo,Win32 API 函數(shù)。

函數(shù)說明:
         GetSystemInfo返回關(guān)于當(dāng)前系統(tǒng)的信息。


函數(shù)原型:

void GetSystemInfo(
  LPSYSTEM_INFO lpSystemInfo
);


參數(shù)表:
lpSystemInfo 
         [out] 指向一個供函數(shù)返回信息的SYSTEM_INFO結(jié)構(gòu)體。

返回值:

         這個函數(shù)不返回任何值。

必備條件:

Client Requires Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, or Windows 95.
Server Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server.
Header

Declared in Winbase.h; include Windows.h.

Library

Link to Kernel32.lib.

DLL Requires Kernel32.dll.

其他:

SYSTEM_INFO 結(jié)構(gòu)體介紹

示例代碼:

Getting Hardware Information

The following examples get or set hardware information.

Example 1

The following example uses the GetSystemInfo function to obtain hardware information such as the OEM identifier, processor type, page size, and so on. The example displays the information in the console.

#include <windows.h>
#include 
<stdio.h>

void main()
{
   SYSTEM_INFO siSysInfo;
 
   
// Copy the hardware information to the SYSTEM_INFO structure. 
 
   GetSystemInfo(
&siSysInfo); 
 
   
// Display the contents of the SYSTEM_INFO structure. 

   printf(
"Hardware information: \n");  
   printf(
"  OEM ID: %u\n", siSysInfo.dwOemId);
   printf(
"  Number of processors: %u\n"
      siSysInfo.dwNumberOfProcessors); 
   printf(
"  Page size: %u\n", siSysInfo.dwPageSize); 
   printf(
"  Processor type: %u\n", siSysInfo.dwProcessorType); 
   printf(
"  Minimum application address: %lx\n"
      siSysInfo.lpMinimumApplicationAddress); 
   printf(
"  Maximum application address: %lx\n"
      siSysInfo.lpMaximumApplicationAddress); 
   printf(
"  Active processor mask: %u\n"
      siSysInfo.dwActiveProcessorMask); 
}


Example 2

The following example uses the GetSystemMetrics function to determine whether a mouse is installed and whether the mouse buttons are swapped. The example also uses the SystemParametersInfo function to retrieve the mouse threshold and speed. It displays the information in the console.

#include <windows.h>
#include 
<stdio.h>

void main()
{
   BOOL fResult;
   
int aMouseInfo[3];
 
   fResult 
= GetSystemMetrics(SM_MOUSEPRESENT); 
 
   
if (fResult == 0
      printf(
"No mouse installed.\n"); 
   
else 
   

      printf(
"Mouse installed.\n");

      
// Determine whether the buttons are swapped. 

      fResult 
= GetSystemMetrics(SM_SWAPBUTTON); 
 
      
if (fResult == 0
         printf(
"Buttons not swapped.\n"); 
      
else printf("Buttons swapped.\n");
 
      
// Get the mouse speed and the threshold values. 
 
      fResult 
= SystemParametersInfo(
         SPI_GETMOUSE,  
// get mouse information 
         0,             // not used 
         &aMouseInfo,   // holds mouse information 
         0);            // not used 

      
if( fResult )
      

         printf(
"Speed: %d\n", aMouseInfo[2]); 
         printf(
"Threshold (x,y): %d,%d\n"
            aMouseInfo[
0], aMouseInfo[1]); 
      }

   }
 
}


Example 3

The following example uses SystemParametersInfo to double the mouse speed.

#include <windows.h>
#include 
<stdio.h>

void main()
{
   BOOL fResult;
   
int aMouseInfo[3];       // array for mouse information
 
   
// Get the current mouse speed. 
 
   fResult 
= SystemParametersInfo(
      SPI_GETMOUSE,   
// get mouse information 
      0,              // not used 
      &aMouseInfo,    // holds mouse information
      0);             // not used 
   
   
// Double it. 
 
   
if( fResult )
   
{
      aMouseInfo[
2= 2 * aMouseInfo[2]; 
 
      
// Change the mouse speed to the new value. 
 
      SystemParametersInfo(
         SPI_SETMOUSE,      
// set mouse information
         0,                 // not used 
         aMouseInfo,        // mouse information 
         SPIF_SENDCHANGE);  // update win.ini 
   }

}



參考MSDN.
posted on 2007-06-02 22:34 譚文政 閱讀(8704) 評論(3)  編輯 收藏 引用 所屬分類: 網(wǎng)絡(luò)編程

評論

# re: GetSystemInfo函數(shù)介紹 2007-06-04 13:56 picasa
很有價值的代碼  回復(fù)  更多評論
  

# re: GetSystemInfo函數(shù)介紹 2007-06-04 18:16 Bin
VOID GetSystemInfo(
LPSYSTEM_INFO lpSystemInfo // address of system information structure
);

說明
在一個SYSTEM_INFO結(jié)構(gòu)中載入與底層硬件平臺有關(guān)的信息

參數(shù)表
參數(shù) 類型及說明

lpSystemInfo
SYSTEM_INFO,指定一個結(jié)構(gòu),用于裝載適當(dāng)?shù)南到y(tǒng)信息



typedef struct _SYSTEM_INFO { // sinf
union {
DWORD dwOemId;
struct {
WORD wProcessorArchitecture;
WORD wReserved;
};
};
DWORD dwPageSize;
LPVOID lpMinimumApplicationAddress;
LPVOID lpMaximumApplicationAddress;
DWORD dwActiveProcessorMask;
DWORD dwNumberOfProcessors;
DWORD dwProcessorType;
DWORD dwAllocationGranularity;
WORD wProcessorLevel;
WORD wProcessorRevision;
} SYSTEM_INFO;  回復(fù)  更多評論
  

# re: GetSystemInfo函數(shù)介紹 2008-11-16 15:51 安永輝
很有代表性 和說明性  回復(fù)  更多評論
  

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            国产精品视频内| 一区二区三区久久网| 亚洲国产女人aaa毛片在线| 美女诱惑一区| 一本一本久久| 久久久综合网| 日韩视频免费在线| 国产精品免费一区二区三区在线观看| 亚洲女同性videos| 欧美第一黄网免费网站| 在线一区视频| 黄色成人在线网址| 亚洲成色最大综合在线| 日韩小视频在线观看专区| 国产精品拍天天在线| 久久婷婷国产麻豆91天堂| 亚洲美女精品成人在线视频| 欧美与欧洲交xxxx免费观看| 91久久嫩草影院一区二区| 国产精品黄色| 蜜桃av综合| 亚洲欧美成人| 亚洲人久久久| 免费黄网站欧美| 亚洲欧美日韩中文视频| 在线观看欧美日本| 国产精品日韩精品欧美精品| 欧美成人高清| 久久精品国内一区二区三区| 亚洲免费福利视频| 欧美成人久久| 欧美一区二区三区免费观看视频| 亚洲欧洲一区二区在线观看| 国产欧美日韩精品一区| 欧美美女bbbb| 久久全国免费视频| 亚洲欧美国产高清| 99亚洲一区二区| 嫩草伊人久久精品少妇av杨幂| 亚洲欧美日韩精品在线| 99这里只有精品| 亚洲电影免费观看高清| 国产日韩精品在线观看| 欧美三级欧美一级| 欧美国产视频日韩| 老司机午夜精品| 久久久夜色精品亚洲| 午夜日韩视频| 亚洲欧美自拍偷拍| 亚洲一区二区三区精品视频 | 欧美激情亚洲视频| 久久久久国产成人精品亚洲午夜| 亚洲在线观看视频| 亚洲一区二区高清视频| 99视频日韩| 99精品国产99久久久久久福利| 亚洲第一主播视频| 精品不卡一区| 激情伊人五月天久久综合| 国产亚洲欧美一区在线观看 | 亚洲美女在线国产| 亚洲精品久久在线| 日韩网站在线观看| 亚洲免费观看高清完整版在线观看熊 | 久久综合狠狠综合久久激情| 亚洲欧美日本国产专区一区| 在线视频欧美精品| 亚洲视频在线观看网站| 亚洲午夜久久久| 亚洲欧美电影在线观看| 亚欧成人精品| 久久久久久高潮国产精品视| 久久久久久久国产| 美脚丝袜一区二区三区在线观看 | 久久久久综合网| 久热精品视频在线观看一区| 鲁鲁狠狠狠7777一区二区| 久热这里只精品99re8久| 欧美成人精品一区二区| 亚洲黄色免费网站| 亚洲精品网址在线观看| 在线亚洲高清视频| 午夜视黄欧洲亚洲| 久久综合狠狠综合久久综青草 | 欧美午夜不卡在线观看免费| 国产精品白丝jk黑袜喷水| 国产乱码精品一区二区三区av| 国产欧美va欧美不卡在线| 伊大人香蕉综合8在线视| 亚洲国产视频a| 亚洲午夜激情网页| 欧美在线视频观看免费网站| 美女性感视频久久久| 亚洲欧洲日本在线| 亚洲女性喷水在线观看一区| 久久精品视频免费观看| 欧美精品国产精品日韩精品| 国产精品久久久久高潮| 国内精品**久久毛片app| 亚洲人妖在线| 午夜国产欧美理论在线播放| 久久深夜福利| 亚洲美女黄色片| 久久成人这里只有精品| 欧美激情一区二区三区在线视频观看 | 香蕉免费一区二区三区在线观看 | 一区二区三区四区五区在线| 欧美在线关看| 91久久夜色精品国产九色| 亚洲综合国产| 欧美国产第一页| 国产午夜精品全部视频播放| 亚洲精选在线观看| 久久精品成人一区二区三区蜜臀 | 久久精品久久99精品久久| 国产资源精品在线观看| 一本久久a久久精品亚洲| 久久久7777| 在线亚洲激情| 欧美福利视频在线| 韩国在线一区| 亚洲欧美日韩在线高清直播| 欧美激情一区二区| 欧美在线免费观看亚洲| 欧美午夜精品理论片a级大开眼界| 永久免费视频成人| 欧美一区二区精品在线| 日韩视频久久| 牛牛影视久久网| 黄色成人免费观看| 欧美一区网站| 日韩一区二区电影网| 欧美91视频| 亚洲成色www久久网站| 久久九九国产| 午夜精品久久久久久99热软件| 欧美日韩一区二区三区视频| 亚洲国产另类 国产精品国产免费| 欧美一区二区视频网站| 一区二区三区高清视频在线观看 | 在线欧美亚洲| 久久女同互慰一区二区三区| 亚洲一二三区在线| 国产精品成人免费精品自在线观看| 亚洲人成人一区二区在线观看| 麻豆精品国产91久久久久久| 欧美一级专区| 国产一区二区三区无遮挡| 欧美综合国产| 性久久久久久久| 国产乱码精品一区二区三区av| 亚洲天堂久久| 制服丝袜激情欧洲亚洲| 欧美特黄一区| 亚洲欧美成人综合| 中文日韩在线| 国产精品一香蕉国产线看观看| 亚洲男人第一av网站| 亚洲视频播放| 国产美女诱惑一区二区| 久久大综合网| 欧美一区观看| 在线播放视频一区| 欧美激情视频在线免费观看 欧美视频免费一| 欧美专区日韩视频| 亚洲成人在线视频网站| 欧美黄色成人网| 欧美极品影院| 亚洲综合色丁香婷婷六月图片| 一区二区三区精品在线| 国产老女人精品毛片久久| 久久精品九九| 奶水喷射视频一区| 99精品欧美| 亚洲一区二区在线免费观看视频 | 午夜精品福利一区二区三区av| 国产精品99久久久久久久久| 国产精品麻豆欧美日韩ww| 久久av在线| 久久―日本道色综合久久| 亚洲精品欧美日韩| 亚洲欧洲综合另类| 一区二区高清| 国产一区二区中文字幕免费看| 久热精品在线视频| 欧美日本韩国| 欧美怡红院视频| 老司机aⅴ在线精品导航| 一区二区欧美在线| 午夜精品美女自拍福到在线| 亚洲大片精品永久免费| 亚洲精品一区二区在线观看| 国产精品一区免费观看| 欧美99在线视频观看| 欧美三级电影大全| 久久久亚洲国产天美传媒修理工| 欧美va亚洲va香蕉在线| 亚洲欧美日韩国产成人| 久久综合一区二区三区| 在线亚洲美日韩|