Try page 80.
struct _CDB6INQUIRY {
UCHAR OperationCode; <- SCSIOP_INQUIRY
UCHAR Reserved1 : 5;
UCHAR LogicalUnitNumber : 3;
UCHAR PageCode; <- 0x80
UCHAR IReserved;
UCHAR AllocationLength; <- sizeof(SERIALNUMBER)
UCHAR Control;
} CDB6INQUIRY, *PCDB6INQUIRY;
The returned buffer ought to something like this:
typedef struct {
UCHAR junk[4];
CHAR SerialNumber[128];
} SERIALNUMBER, *PSERIALNUMBER;
In the code that used this I actually over-allocated the buffer for the
serial number by one CHAR so I could guarantee a null terminated serial
number string (SCSI says ascii data but doesn’t say null terminated.)
Of course this is for SCSI devices. I have no idea what one has to do
for IDE.
=====================
Mark Roddy
Windows XP/2000/NT Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
xxxxx@hollistech.com
For Windows Device Driver Training: see www.azius.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moises Herrera
Vazquez
Sent: Saturday, January 12, 2002 8:45 AM
To: File Systems Developers
Subject: [ntfsd] I need to ctach a serial number of HDD
Hello everybody…
Thanks for you attention…
I need to catch a real serial number of HDD, not the serial that change
with format…
I use IOCTL_SCSI_GET_INQUIRY_DATA , but just get FirmwareRevision and
ModelNumber.
if some body know how can I catch this serial number , IOCTL or
something please talk me…
Now I catch a serial but doing a direct write /read to a IDE controller,
this maybe have a problem with other drivers,
I need to know how can I lock HDD for exclusive use, of my driver and
SYSTEM of course…
I try with CreteFile(…,0) I mean not SHARED, i think that is
correct, but I don’t know if this resolve my problems…
I need to catch serial to SCSI drivers too
tanks and regards…
Moises
You are currently subscribed to ntfsd as: xxxxx@hollistech.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com