09-22-2011، 12:34 AM
کد:
DWORD __inline SiberianTiger::CheckIDT( )
{
DWORD returnVal;
DWORD_PTR *IDTP = new DWORD_PTR[4];
DWORD IDT;
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
if( GetVersionEx( &osvi ) == 0 )
{
#ifdef AGGRESSIVE
return( 0 );
#else
return( 1 );
#endif
}
if( osvi.dwMajorVersion < 6 )
{
#ifdef __INTRIN_H_
__sidt( IDTP );
#else
__asm SIDT [IDTP]
#endif
IDT = ( DWORD ) IDTP;
returnVal = ( IDT & 0x373FC8 ) == IDT;
}
else
{
returnVal = 1;
}
return( returnVal );
}