GetSystemInfo()
生活随笔
收集整理的這篇文章主要介紹了
GetSystemInfo()
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
關(guān)于“GetSystemInfo()”的詳細(xì)信息,參考: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
?
函數(shù)原型:void WINAPI GetSystemInfo( ? _Out_ LPSYSTEM_INFO lpSystemInfo );
作用:獲取當(dāng)前系統(tǒng)的信息。
參數(shù):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: \n"); 16 printf(" OEM ID: %u\n", siSysInfo.dwOemId); 17 printf(" Number of processors: %u\n", 18 siSysInfo.dwNumberOfProcessors); 19 printf(" Page size: %u\n", siSysInfo.dwPageSize); 20 printf(" Processor type: %u\n", siSysInfo.dwProcessorType); 21 printf(" Minimum application address: %lx\n", 22 siSysInfo.lpMinimumApplicationAddress); 23 printf(" Maximum application address: %lx\n", 24 siSysInfo.lpMaximumApplicationAddress); 25 printf(" Active processor mask: %u\n", 26 siSysInfo.dwActiveProcessorMask); 27 return 0; 28 }?
轉(zhuǎn)載于:https://www.cnblogs.com/Satu/p/8194594.html
總結(jié)
以上是生活随笔為你收集整理的GetSystemInfo()的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: iOS----------UITextF
- 下一篇: 企业标准和国家标准执行哪个标准?