pollopf.blogg.se

Get hard drive serial number delphi
Get hard drive serial number delphi











If DeviceDescriptor.ProductRevisionOffset 0 then If DeviceDescriptor.ProductIdOffset 0 then HexToBin(PChar(SerNum), SizeOf(Cardinal)) įunction SerialNumberToString(SerNum: String): String RawDeviceProperties: array of Byte įunction ByteToChar(const B: Byte): Char įunction SerialNumberToCardinal (SerNum: String): Cardinal STORAGE_DEVICE_DESCRIPTOR = packed record Property SerialNumber: string read FSerialNumber ĪdditionalParameters: array of Byte Property ProductRevision: string read FProductRevision Property ProductId: string read FProductId Property VendorId: string read FVendorId Property DriveNumber: Byte read FDriveNumber write SetDriveNumber

get hard drive serial number delphi

Procedure SetDriveNumber(const Value: Byte) Writeln(Format('DriveNumber %d, %s: %s', )) Writeln('SerialNumberText: ', HDDInfo.SerialNumberText) Writeln('SerialNumberInt: ', HDDInfo.SerialNumberInt) Writeln('SerialNumber: ', HDDInfo.SerialNumber)

get hard drive serial number delphi

Writeln('ProductRevision: ', HDDInfo.ProductRevision) Writeln('ProductId: ', HDDInfo.ProductId) Procedure ReadPhysicalDriveInNTWithZeroRights () įor DriveNumber := 0 to MAX_IDE_DRIVES - 1 do

get hard drive serial number delphi

Max number of drives assuming primary/secondary, master/slave topology I wrote some sample use for it: program DiskDriveSerialConsoleProject Now you need someone to help you translate this C++ code to Delphi.Įdit: Found a Delphi unit that does this for you. The cool thing is that this C++ code works as a non-administrator user too! NET, which in turn was based on a link to Borland C++ code and article. Following the links in the question comments Sertac posted, I came across this interesting C++ question, where Fredou answered with a nice link to a codeproject example showing how to do this in.













Get hard drive serial number delphi