//-------------------------------------------------------------------------- // Rob Wyatt for Game Developer/Gamasutra April 1999 //-------------------------------------------------------------------------- #ifndef HEADER_DETECT_PIII #define HEADER_DETECT_PIII //============================================================================== enum SerialElement { SN_BOTTOM = 0, SN_MIDDLE, SN_TOP }; //============================================================================== class CDetect { public: //-------------------------------------------------------------------------- CDetect(); //-------------------------------------------------------------------------- bool GetStatus() { return DetectStatus; } //-------------------------------------------------------------------------- bool GetSIMDSupport() { return SIMDPresent; } //-------------------------------------------------------------------------- bool GetOSSupport() { return OSSupport; } //-------------------------------------------------------------------------- bool GetOSExceptions() { return OSExceptions; } //-------------------------------------------------------------------------- bool SerialNumberPresent() { return SerialPresent; } //-------------------------------------------------------------------------- DWORD* GetSerialNumber ( ) { return SerialNumber; } private: //-------------------------------------------------------------------------- bool DetectExceptionSupport ( ); //-------------------------------------------------------------------------- // Return true if the specifed bit is set in the CPU feature flags bool CDetect::DetectFeatureBit ( DWORD bit ); //-------------------------------------------------------------------------- void ReadSerialNumber ( DWORD* serial_num // pointer to 12 bytes ); //-------------------------------------------------------------------------- bool SIMDPresent; bool OSSupport; bool OSExceptions; bool DetectStatus; bool SerialPresent; DWORD SerialNumber[3]; }; #endif