如何得到WINDOWS系统配置信息,包括系统版本是否为XP,SP2补丁是否打上,USB版本是否为2.0,显卡是否支持DirectX9.0
给点详细代码 最好是API函数
给点详细代码 最好是API函数
解决方案 »
- YUV数据问题
- 关于addchart这个函数的问题
- 请问函数的返回值的类型如何确定??操作注册表的时候,发现代码与msdn的说明不一致
- 发一段提取Mfcc的部分c代码。大家帮看下
- midl\oleaut32.dll : error MIDL2020 : error generating type library : SetFuncAndParamNames failed : StoredProc (0x8002802C)问题!
- 如何用GDI+来实现Coreldraw中多个图形的焊接,相交,修剪等的功能?
- 重起问题!
- SHChangeNotify 为什么 2、3秒的延迟?
- 如何理解多级指针及其用法?
- 怎么样是一张24位色的位图显示成256色,程序详细,一定给分
- MFC Activex ControlWizard的问题
- codejoke xtreme toolkits pro v12.0.0 full version
The GetSystemInfo function returns information about the current system
#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);
}
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
NULL, // not used
&aMouseInfo, // holds mouse information
NULL); // not used if( fResult )
{
printf("Speed: %d\n", aMouseInfo[2]);
printf("Threshold (x,y): %d,%d\n",
aMouseInfo[0], aMouseInfo[1]);
}
}
}
This next 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
NULL, // not used
&aMouseInfo, // holds mouse information
NULL); // 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
NULL, // not used
aMouseInfo, // mouse information
SPIF_SENDCHANGE); // update win.ini
}
}csdn上的,简单英文应该可以应付吧
能给代码最好