windows下如何编程实查看CPU、显卡、主板、硬盘等温度!

2024-12-03 12:29:07
推荐回答(5个)
回答1:

调用系统函数,
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\tNumber of Processors: %u",
siSysInfo.dwOemId,
siSysInfo.dwNumberOfProcessors);
TabbedTextOut(hdc, 25, 40, tchBuffer,
nSize, 1, aTabs, 25);

nSize = sprintf(tchBuffer,
"Page size: %u\tProcessor Type: %u",
siSysInfo.dwPageSize,
siSysInfo.dwProcessorType);
TabbedTextOut(hdc, 25, 60, tchBuffer,
nSize, 1, aTabs, 25);

nSize = sprintf(tchBuffer,
"Minimum app address: %lx\tMaximum 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);

回答2:

鲁大师能实现就说明电脑自带的硬件能检测出温度,利用软件编程也能得到相应的温度的系数。(可惜我不知道怎么用编程实现!)
所以你可以找专业的牛人问问,也可能自己到网上找找关于获取硬件温度的编程接口。
(最好是到专业的论坛或者是qq群中去问人。)

回答3:

粘贴以下代码到一个新建的文本文件中,保存,将该文本文件的后缀名改成"html"后双击运行该文件即可。你懂的……



获得CPU、显卡、主板、硬盘等温度





回答4:

这不好办吧,也太专业了啊,不好做,看其他人会不会把

回答5:

下载鲁大师。有硬件检测,系统似乎没自带这些功能吧……?