Serial numbers are not disk signatures.
The disk serial number is a requirement for SCSI-II compatible disk devices.
It unfortunately is not a requirement for IDE drives.
There is a defect in ScsiPort that does not return valid results for the
serial number from a call to IOCTL_SCSI_GET_INQUIRY_DATA. Instead for SCSI
disks you have to do it the old fashioned way and read the Inquiry data
directly.
For IDE drives your are stuck. The best you could do is to use the NT
supplied disk signature. Note that a disk signature is a binary value while
the disk serial nubmer is an ascii string.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Tushar Banerjee
Sent: Tuesday, April 18, 2000 5:43 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Serial Number of an IDE Hard Disk
Hi,
The harddisk signature can uniquely identify a harddisk in NT.
Similarly Serial Number can identify a partition.
To get the serial number do a CreateFile for ??\PHYSICALDRIVE0
where 0 is ur harddisk number as shown by windisk.
Then do a DeviceIoControl with IOCTL –> IOCTL_DISK_GET_DRIVE_LAYOUT
The returned DRIVE_LAYOUT_INFORMATION structure contains all info.
regards
Sumtush
-----Original Message-----
Hi All,
How can we obtain the Serial number of an IDE Hard Disk using
standard method ie from DeviceIoControl. From the spec, the words 10-19 in
the Identify Device represents the Serial number.
But if i issue the IOCTL_SCSI_GET_INQUIRY_DATA, the returned buffer doesnot
contain the Serial Number. If i read the Identify Device info from within
my
driver, i am getting the Serial Number. Am i missing something? Why the
standard ATA driver is not copying the Serial number to the return buffer?
Is there any other way to obtain the serial number/ uniquely identify the
drive.
I also need to findout which all drive letters are mapped to a specific
hard
disk… in 95 there are some std VxD services available which may give the
driveletters provided with the disk number. In NT, we don’t have any such
unique number for the hard disks…right ?
I need some mechanism to Uniquely Identify a Hard Disk. I am hoping that
the
disk serial number may help.
Thanks in Advance
balan
Get Your Private, Free Email at http://www.hotmail.com
You are currently subscribed to ntdev as: xxxxx@wattanuck.mv.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)