📄 compinfo.h
字号:
//////////////////////////////////////////////////
// //
// Get info on the computer. Orginal CPU //
// recongnision code (GetCPUSpeed(), //
// GetCPUCaps() and HasMMX()) //
// by Matthias Hofmann //
// //
// All orginal CPU stat code copyright (C) //
// Matthias Hofmann //
// //
//////////////////////////////////////////////////
#ifndef _CPU_H_
#define _CPU_H_
#include <windows.h>
#include <winbase.h>
#define CPU_FEATURE_MMX 0x00800000
#define CPU_FEATURE_RDTSC 0x00000010
#define CPU_FEATURE_3DNOW 0x80000000
class GcCompchar
{
public:
// Constructor / Destructor
GcCompchar();
~GcCompchar();
// The get speed of the users CPU
int GetCPUSpeed(void);
// Get the capabilities of the users CPU
DWORD GetCPUCaps(void);
// Log the users CPU charactestic
void LogCompCharac();
// Does the computer have MMX
bool HasMMX() { return hasMMX; }
// Get the current windows version
void GetWindowsVersion();
private:
DWORD cpuCaps; // The capabilities of the CPU
int cpuSpeed; // The speed of the cpu
bool hasMMX; // Does the CPU have MMX instructions
OSVERSIONINFO osinfo; // The OS info
MEMORYSTATUS meminfo; // The memory info
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -