Dear all, I'm trying to read serial no of the hard disk as a unique id of the machine. I tried the code as follows: class function TDeviceUtils.GetDeviceId: string; const IDENTIFY_BUFFER_SIZE = 512; type TIDERegs = packed record bFeaturesReg: BYTE; // Used for specifying SMART 'commands'. BSectorCountReg: BYTE; // IDE sector count register bSectorNumberReg: BYTE; // IDE sector number register bCylLowReg: BYTE; // IDE low order cylinder value bCylHighReg: BYTE; // IDE high order cylinder value bDriveHeadReg: BYTE; // IDE drive/head register bCommandReg: BYTE; // Actual IDE command. BReserved: BYTE; // reserved for future use. Must be zero. End; TSendCmdInParams = packed record // Buffer size in bytes cBufferSize: LongInt; // Structure with drive register values. IrDriveRegs: TIDERegs; // Physical drive number to send command to (0,1,2,3).
BDriveNumber: BYTE; bReserved: array [0. 2] of BYTE; dwReserved: array [0. 3] of DWORD; bBuffer: array [0. Office tab enterprise 9.81. 0] of BYTE; // Input buffer. End; TIdSector = packed record wGenConfig: Word; wNumCyls: Word; wReserved: Word; wNumHeads: Word; wBytesPerTrack: Word; wBytesPerSector: Word; wSectorsPerTrack: Word; wVendorUnique: array [0. 2] of Word; sSerialNumber: array [0. 19] of CHAR; wBufferType: Word; wBufferSize: Word; wECCSize: Word; sFirmwareRev: array [0.
EmbarcaderoPrism XE2 Professional Embarcadero Prism XE2 Professional is designed for developers who want to go beyond the capabilities of other.NET development solutions with expanded language capabilities and cross-platform targeting.
7] of CHAR; sModelNumber: array [0. 39] of CHAR; wMoreVendorUnique: Word; wDoubleWordIO: Word; wCapabilities: Word; wReserved1: Word; wPIOTiming: Word; wDMATiming: Word; wBS: Word; wNumCurrentCyls: Word; wNumCurrentHeads: Word; wNumCurrentSectorsPerTrack: Word; ulCurrentSectorCapacity: DWORD; wMultSectorStuff: Word; ulTotalAddressableSectors: DWORD; wSingleWordDMA: Word; wMultiWordDMA: Word; bReserved: array [0. 127] of BYTE; end; PIdSector = ^TIdSector; TDriverStatus = packed record bDriverError: BYTE; bIDEStatus: BYTE; bReserved: array [0. 1] of BYTE; dwReserved: array [0. 1] of DWORD; end; TSendCmdOutParams = packed record // bBuffer的大小 cBufferSize: DWORD; DriverStatus: TDriverStatus; bBuffer: array [0. 0] of BYTE; end; var hDevice: Thandle; cbBytesReturned: DWORD; SCIP: TSendCmdInParams; aIdOutCmd: array [0. (SizeOf(TSendCmdOutParams) + IDENTIFY_BUFFER_SIZE - 1) - 1] of BYTE; IdOutCmd: TSendCmdOutParams absolute aIdOutCmd; procedure ChangeByteOrder(var Data; Size: Integer); var ptr: pchar; i: Integer; c: CHAR; begin ptr:= @Data; for i:= 0 to (Size shr 1) - 1 do begin c:= ptr^; ptr^:= (ptr + 1)^; (ptr + 1)^:= c; Inc(ptr, 2); end; end; begin Result:= '; // '.
PhysicalDrive0 means the first drive, use '. PhysicalDrive1 ' for the second one, etc. HDevice:= CreateFile( '. PhysicalDrive0', GENERIC_READ or GENERIC_WRITE, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0); if hDevice = INVALID_HANDLE_VALUE then Exit; try FillChar(SCIP, SizeOf(TSendCmdInParams) - 1, #0); FillChar(aIdOutCmd, SizeOf(aIdOutCmd), #0); cbBytesReturned:= 0; // Set up data structures for IDENTIFY command.
K lik Customize and control Chromium (yang bergambar Kunci Pas di sebelah kanan atas Google Chrome kamu) 2. L ihat tulisan 'Zoom'. Ada tanda (-) dan (+). Atur sampai zoom 100%. Brazzer russian tulisan aslinya. Hebatnya Doc Translator menerjemahkan dokumen Anda tanpa kehilangan format aslinya. Inilah salah satu kelebihannya dibanding google Translate. Layanan terjemahan ini pun menerima dokumen dari semua ukuran. Aslinya, bulu kucing ini berwarna biru solid, dengan tidak ada tanda-tanda warna lain, namun akibat persilangan tersebut ada peluang muncul warna lain. Mata Russian Blue aslinya berwarna hijau gelap, namun akibat persilangan ada yang berwarna kekuningan, dsb. Penerjemah artikel dari bahasa indonesia ke inggris Saya perlu menerjemahkan artikel dalam bahasa indonesia ke inggris dengan gaya bahasa yang beda dengan tulisan asli tanpa mengurangi isi dan makna tulisan aslinya.
Dear all, I'm trying to read serial no of the hard disk as a unique id of the machine. I tried the code as follows: class function TDeviceUtils.GetDeviceId: string; const IDENTIFY_BUFFER_SIZE = 512; type TIDERegs = packed record bFeaturesReg: BYTE; // Used for specifying SMART 'commands'. BSectorCountReg: BYTE; // IDE sector count register bSectorNumberReg: BYTE; // IDE sector number register bCylLowReg: BYTE; // IDE low order cylinder value bCylHighReg: BYTE; // IDE high order cylinder value bDriveHeadReg: BYTE; // IDE drive/head register bCommandReg: BYTE; // Actual IDE command. BReserved: BYTE; // reserved for future use.
Must be zero. End; TSendCmdInParams = packed record // Buffer size in bytes cBufferSize: LongInt; // Structure with drive register values. IrDriveRegs: TIDERegs; // Physical drive number to send command to (0,1,2,3). BDriveNumber: BYTE; bReserved: array [0. 2] of BYTE; dwReserved: array [0.
Dear all, I'm trying to read serial no of the hard disk as a unique id of the machine. I tried the code as follows: class function TDeviceUtils.GetDeviceId: string; const IDENTIFY_BUFFER_SIZE = 512; type TIDERegs = packed record bFeaturesReg: BYTE; // Used for specifying SMART 'commands'. BSectorCountReg: BYTE; // IDE sector count register bSectorNumberReg: BYTE; // IDE sector number register bCylLowReg: BYTE; // IDE low order cylinder value bCylHighReg: BYTE; // IDE high order cylinder value bDriveHeadReg: BYTE; // IDE drive/head register bCommandReg: BYTE; // Actual IDE command. BReserved: BYTE; // reserved for future use. Must be zero. End; TSendCmdInParams = packed record // Buffer size in bytes cBufferSize: LongInt; // Structure with drive register values. IrDriveRegs: TIDERegs; // Physical drive number to send command to (0,1,2,3).
BDriveNumber: BYTE; bReserved: array [0. 2] of BYTE; dwReserved: array [0. 3] of DWORD; bBuffer: array [0. Office tab enterprise 9.81. 0] of BYTE; // Input buffer. End; TIdSector = packed record wGenConfig: Word; wNumCyls: Word; wReserved: Word; wNumHeads: Word; wBytesPerTrack: Word; wBytesPerSector: Word; wSectorsPerTrack: Word; wVendorUnique: array [0. 2] of Word; sSerialNumber: array [0. 19] of CHAR; wBufferType: Word; wBufferSize: Word; wECCSize: Word; sFirmwareRev: array [0.
EmbarcaderoPrism XE2 Professional Embarcadero Prism XE2 Professional is designed for developers who want to go beyond the capabilities of other.NET development solutions with expanded language capabilities and cross-platform targeting.
7] of CHAR; sModelNumber: array [0. 39] of CHAR; wMoreVendorUnique: Word; wDoubleWordIO: Word; wCapabilities: Word; wReserved1: Word; wPIOTiming: Word; wDMATiming: Word; wBS: Word; wNumCurrentCyls: Word; wNumCurrentHeads: Word; wNumCurrentSectorsPerTrack: Word; ulCurrentSectorCapacity: DWORD; wMultSectorStuff: Word; ulTotalAddressableSectors: DWORD; wSingleWordDMA: Word; wMultiWordDMA: Word; bReserved: array [0. 127] of BYTE; end; PIdSector = ^TIdSector; TDriverStatus = packed record bDriverError: BYTE; bIDEStatus: BYTE; bReserved: array [0. 1] of BYTE; dwReserved: array [0. 1] of DWORD; end; TSendCmdOutParams = packed record // bBuffer的大小 cBufferSize: DWORD; DriverStatus: TDriverStatus; bBuffer: array [0. 0] of BYTE; end; var hDevice: Thandle; cbBytesReturned: DWORD; SCIP: TSendCmdInParams; aIdOutCmd: array [0. (SizeOf(TSendCmdOutParams) + IDENTIFY_BUFFER_SIZE - 1) - 1] of BYTE; IdOutCmd: TSendCmdOutParams absolute aIdOutCmd; procedure ChangeByteOrder(var Data; Size: Integer); var ptr: pchar; i: Integer; c: CHAR; begin ptr:= @Data; for i:= 0 to (Size shr 1) - 1 do begin c:= ptr^; ptr^:= (ptr + 1)^; (ptr + 1)^:= c; Inc(ptr, 2); end; end; begin Result:= '; // '.
PhysicalDrive0 means the first drive, use '. PhysicalDrive1 ' for the second one, etc. HDevice:= CreateFile( '. PhysicalDrive0', GENERIC_READ or GENERIC_WRITE, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0); if hDevice = INVALID_HANDLE_VALUE then Exit; try FillChar(SCIP, SizeOf(TSendCmdInParams) - 1, #0); FillChar(aIdOutCmd, SizeOf(aIdOutCmd), #0); cbBytesReturned:= 0; // Set up data structures for IDENTIFY command.
K lik Customize and control Chromium (yang bergambar Kunci Pas di sebelah kanan atas Google Chrome kamu) 2. L ihat tulisan 'Zoom'. Ada tanda (-) dan (+). Atur sampai zoom 100%. Brazzer russian tulisan aslinya. Hebatnya Doc Translator menerjemahkan dokumen Anda tanpa kehilangan format aslinya. Inilah salah satu kelebihannya dibanding google Translate. Layanan terjemahan ini pun menerima dokumen dari semua ukuran. Aslinya, bulu kucing ini berwarna biru solid, dengan tidak ada tanda-tanda warna lain, namun akibat persilangan tersebut ada peluang muncul warna lain. Mata Russian Blue aslinya berwarna hijau gelap, namun akibat persilangan ada yang berwarna kekuningan, dsb. Penerjemah artikel dari bahasa indonesia ke inggris Saya perlu menerjemahkan artikel dalam bahasa indonesia ke inggris dengan gaya bahasa yang beda dengan tulisan asli tanpa mengurangi isi dan makna tulisan aslinya.
Dear all, I'm trying to read serial no of the hard disk as a unique id of the machine. I tried the code as follows: class function TDeviceUtils.GetDeviceId: string; const IDENTIFY_BUFFER_SIZE = 512; type TIDERegs = packed record bFeaturesReg: BYTE; // Used for specifying SMART 'commands'. BSectorCountReg: BYTE; // IDE sector count register bSectorNumberReg: BYTE; // IDE sector number register bCylLowReg: BYTE; // IDE low order cylinder value bCylHighReg: BYTE; // IDE high order cylinder value bDriveHeadReg: BYTE; // IDE drive/head register bCommandReg: BYTE; // Actual IDE command. BReserved: BYTE; // reserved for future use.
Must be zero. End; TSendCmdInParams = packed record // Buffer size in bytes cBufferSize: LongInt; // Structure with drive register values. IrDriveRegs: TIDERegs; // Physical drive number to send command to (0,1,2,3). BDriveNumber: BYTE; bReserved: array [0. 2] of BYTE; dwReserved: array [0.