Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
|
Detect the HD serial number
8 comments. Current rating: (3 votes). Leave comments and/ or rate it.
Use this code to detect the hard disk's serial number:
Thanks to Jonathan Arnett for a corrected version of previously posted code.
 | |  | | uses
SysUtils, Dialogs, Windows;
function HDD_Serial : string;
var
SerialNum : dword;
a, b : dword;
Buffer : array [0..255] of char;
begin
if GetVolumeInformation('c:\', Buffer, SizeOf(Buffer), @SerialNum, a, b, nil, 0) then
Result := IntToHex(SerialNum, 8)
else
Result := '';
end; | |  | |  |
Comments:
|
|
|
|
Nice, ok Can U Help Me How To Detec MotherBord,Vga card, Lan Card Etc Serial Number
Tank's Before
|
|
|
|
|
It's partition serial number
|
|
|
|
|
EXCELENT!!! i was looking for this for a verry long time
|
|
|
|
|
Correct, this is not useful as partition serial number and it can be changed after deleting and creating a new partition or by editing particular sector of a hard drive. It is not hard drive serial number exactly! Serial number you can get through hardware ports or with hardware library that allows direct access to the hardware under Win32.
|
|
|
|
|
please help me to how configuration the version & model of the modem & cdrom of the
pc .
thanks.
|
|
|
|
|
Thanks.
But I Want HDD phisical serial Number No Volume Info.
Can You Hel Me !
|
|
|
|
|
You get partition serial numeber that is always different when you format it. Next time, this value is completely different.
|
|
|
|
|
Very g00d :)
|
|