www.pudn.com > Gimcrack-v0.0051-Source.zip > 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#include #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