AW: HDD serial number

Hello,

under NTFS and user mode it works with NtFsControlFile and the control
command FSCTL_GET_NTFS_VOLUME_DATA
the output structure is typedef struct {

LARGE_INTEGER VolumeSerialNumber;
LARGE_INTEGER NumberSectors;
LARGE_INTEGER TotalClusters;
LARGE_INTEGER FreeClusters;
LARGE_INTEGER TotalReserved;
DWORD BytesPerSector;
DWORD BytesPerCluster;
DWORD BytesPerFileRecordSegment;
DWORD ClustersPerFileRecordSegment;
LARGE_INTEGER MftValidDataLength;
LARGE_INTEGER MftStartLcn;
LARGE_INTEGER Mft2StartLcn;
LARGE_INTEGER MftZoneStart;
LARGE_INTEGER MftZoneEnd;

} NTFS_VOLUME_DATA_BUFFER, *PNTFS_VOLUME_DATA_BUFFER;

you can find this in <winioctl.h>

-----Ursprungliche Nachricht-----
Von: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]Im Auftrag von Dmitry K
Gesendet: Samstag, 7. Oktober 2000 09:57
An: NT Developers Interest List
Betreff: [ntdev] HDD serial number

Hi ALL!

I have a question:
How to read HDD serial number from device driver?

Best regards,
Dmitry.


You are currently subscribed to ntdev as: xxxxx@gmx.net
To unsubscribe send a blank email to $subst(‘Email.Unsub’)</winioctl.h>

It depends on what you mean by the “HDD serial number”. If you want the disk
volume serial number see the other response. If you want the NT disk serial
number read the MBR. If you want the SCSI vital product data serial number
then you have to build and send an SRB INQUIRY for the correct mode page.
(EVPD) How you do that depends on where you are doing it from.

Mark Roddy
Windows 2000/NT Consultant
Hollis Technology Solutions
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Dmitry K
Sent: Saturday, October 07, 2000 3:57 AM
To: NT Developers Interest List
Subject: [ntdev] HDD serial number

Hi ALL!

I have a question:
How to read HDD serial number from device driver?

Best regards,
Dmitry.


You are currently subscribed to ntdev as: xxxxx@wattanuck.mv.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

> I have a question:

How to read HDD serial number from device driver?

Try IOCTL_SCSI_GET_INQUIRY_DATA - this will work for ATA too.

Max