Get Hard Drive Serial Number Delphi

Get Hard Drive Serial Number Delphi

Get Hard Drive Serial Number Delphi Average ratng: 6,9/10 3381 reviews

Home Delphi: Getting The Hard Drive Serial Number Comments. Every hard drive has a distinctive Volume Serial Number, with the chances of any two drives you encounter.

Delphi

Well the component I mentioned works with D5,D6 and D7. Here is the list of what computerinfo you get. >I was looking for code that would work with Delphi6 using a Windows 98SE platform.

Shema sai 190 resanta. Try this function, it'll work in win98SE function GetBiosInfoAsText: string; var p, q: pchar; begin q:= nil; p:= PChar(Ptr($FE000)); repeat if q  nil then begin if not (p^ in [#10, #13, #32.#126, #169, #184]) then begin if (p^ = #0) and (p - q >= 8) then begin Result:= Result + TrimRight(String(q)) + #13#10; end; q:= nil; end; end else if p^ in [#33.#126, #169, #184] then q:= p; inc(p); until p > PChar(Ptr($FFFFF)); Result:= TrimRight(Result); end; procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Lines.Text:= GetBiosInfoAsText; end; Regards Azhdari.

Here is another translation from C++ to Delphi by Victor Derevyanko project: Because the first method (WithZeroRights) doesn't work for me, I wrote another for ReadIdeDriveAsScsiDriveInNT method: unit HDScsiInfo; interface uses Windows, SysUtils; const IDENTIFY_BUFFER_SIZE = 512; FILE_DEVICE_SCSI = $0000001b; IOCTL_SCSI_MINIPORT_IDENTIFY = ((FILE_DEVICE_SCSI shl 16) + $0501); IDE_ATA_IDENTIFY = $EC; // Returns ID sector for ATA. Posting this purely for completeness sake, and to possibly satisfy those interested or die hard hardware fanatics.

I do not have a Pascal compiler at my disposal to test these routines on current Windows systems, but I do know this code worked back in the DOS era. Maybe it still works from a command prompt window.

Blog

Get Hard Drive Serial Number Delphi
© 2019