- 瑞瑞爱吃桃
-
调用系统函数,
VOID GetSystemInfo(
LPSYSTEM_INFO lpSystemInfo // system information
);
下面是例子
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 a window"s client area.
SYSTEM_INFO siSysInfo; // struct. for hardware information
int aTabs[1] = {260}; // tab stop for TabbedTextOut
TCHAR tchBuffer[BUFFER]; // buffer for expanded string
int nSize; // size of string
// Display the "hardware information" header.
nSize = sprintf(tchBuffer,
"Hardware information:");
TextOut(hdc, 15, 20, tchBuffer, nSize);
// Copy the hardware information to the SYSTEM_INFO structure.
GetSystemInfo(&siSysInfo);
// Display the contents of the SYSTEM_INFO structure.
nSize = sprintf(tchBuffer,
"OEM ID: %u Number of Processors: %u",
siSysInfo.dwOemId,
siSysInfo.dwNumberOfProcessors);
TabbedTextOut(hdc, 25, 40, tchBuffer,
nSize, 1, aTabs, 25);
nSize = sprintf(tchBuffer,
"Page size: %u Processor Type: %u",
siSysInfo.dwPageSize,
siSysInfo.dwProcessorType);
TabbedTextOut(hdc, 25, 60, tchBuffer,
nSize, 1, aTabs, 25);
nSize = sprintf(tchBuffer,
"Minimum app address: %lx Maximum app address: %lx",
siSysInfo.lpMinimumApplicationAddress,
siSysInfo.lpMaximumApplicationAddress);
TabbedTextOut(hdc, 25, 80, tchBuffer,
nSize, 1, aTabs, 25);
nSize = sprintf(tchBuffer,
"Active processor mask: %u",
siSysInfo.dwActiveProcessorMask);
TextOut(hdc, 25, 100, tchBuffer, nSize);
- xinz
-
鲁大师能实现就说明电脑自带的硬件能检测出温度,利用软件编程也能得到相应的温度的系数。(可惜我不知道怎么用编程实现!)
所以你可以找专业的牛人问问,也可能自己到网上找找关于获取硬件温度的编程接口。
(最好是到专业的论坛或者是qq群中去问人。)
- 里论外几
-
粘贴以下代码到一个新建的文本文件中,保存,将该文本文件的后缀名改成"html"后双击运行该文件即可。你懂的……
<html>
<head>
<title>获得CPU、显卡、主板、硬盘等温度</title>
<script type="text/javascript" scr="get_computer_temperature.js"></script>
</head>
<body>
<script type="text/javascript">
var a = new computerTemperature();
alert(a.getCpuTemperature());
alert(a.getDisplayCardTemperature());
alert(a.getMainboardTemperature());
</script>
</body>
</html>
- 黑桃猪
-
这不好办吧,也太专业了啊,不好做,看其他人会不会把
- 我不懂运营
-
下载鲁大师。有硬件检测,系统似乎没自带这些功能吧……?