void __fastcall ReadPhysicalDriveOnW9X_Ring0(bool IsFirst, WORD BaseAddress, BYTE MoS, bool &IsIDEExist, bool &IsDiskExist, WORD *OutData);
// SCSI读取函数(for NT/2000/XP) String __fastcall ReadIDEDriveAsScsiDriveOnNT(); //--------------------------------------------------------------------------- // ReadPhysicalDrive void __fastcall ReadPhysicalDrive(TStrings *pSerList, TStrings *pModeList) { switch(Win32Platform) { case VER_PLATFORM_WIN32_WINDOWS: ReadPhysicalDriveOnW9X(pSerList, pModeList); break; case VER_PLATFORM_WIN32_NT: ReadPhysicalDriveOnNT(pSerList, pModeList); break; default: break; } } //--------------------------------------------------------------------------- // ConvertToString char *__fastcall ConvertToString(DWORD dwDiskData[256], int nFirstIndex, int nLastIndex) { static char szResBuf[1024]; int nIndex = 0; int nPosition = 0;
// Each integer has two characters stored in it backwards for(nIndex = nFirstIndex; nIndex <= nLastIndex; nIndex++) { // Get high BYTE for 1st character szResBuf[nPosition] = (char)(dwDiskData[nIndex] / 256); nPosition++;
// Get low BYTE for 2nd character szResBuf[nPosition] = (char)(dwDiskData[nIndex] % 256); nPosition++; }