Better yet, first have your upper levels send the standard INQUIRY CDB
and check for your unique VENDORID/PRODUCTID/PRODUCTREVISION
combination(s).
From here, you now know it’s one of “your” disks. You can then either
use the vendor-specific area in the inquiry data (it’s about 20 bytes in
length), or you can use one fo the following Vendor-specific opcodes to
do anything you define:
Use only for 6-byte CDBs, may cause problems with other sizes:
0x02, 0x05, 0x06, 0x09, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x13, 0x14, 0x19
Use only for 10-byte CDBs, may cause problems with other sizes:
0x20, 0x21, 0x22, 0x23, 0x24, 0x26, 0x27, 0x29, 0x2C, 0x2D
Use for any CDB size (6,10,12,16) (opcode families 6,7 were always
vendor-unique):
0xC0 through 0xFF
So, please spend a little more time than just adding an “interesting”
CDB. Also, request an official VendorID if you haven’t already done so
– it’ll help prevent clashes with other software virtual disks.
Thanks,
.
-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Thursday, September 01, 2005 1:36 PM
Subject: Re: Recognizing drive letter of my Virtual Disk Drive
Support some “interesting” SCSI CDB in your virtual miniport. Then
send
IOCTL_SCSI_PASS_THROUGH to this disk from the app, executing this CDB.
This will fail on usual disks and succeed on “your” disks.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Somsubhra Raj”
To: “Windows System Software Devs Interest List”
Sent: Thursday, September 01, 2005 9:43 AM
Subject: [ntdev] Recognizing drive letter of my Virtual Disk Drive
> Hi All,
>
> I’ve written a virtual scsi miniport driver, which I’m
> using to virtualising a disk drive. After successfull
> enumeration of the virtual adapter I can see the
> virtual disk drive in the explorer. Now this
> assignment of the drive letter to the new virtual
> drive is done by Windows volume manager ( Hope I’m not
> wrong ).
>
> Now is there any way to know the drive letter assigned
> to my virtual disk drive from my application without
> any user interaction.
>
> I’ve tried using ‘GetLogicalDrives()’ call to get all
> the logical drives existing in the machine and then
> used ‘QueryDosDevice()’ to know the device linked to
> it. However it points to some device as /HardDisk/…
> etc. And I can’t extract any information from that.
>
> Can you guys suggest any method by which I can know
> the drive letter assigned to my virtual disk drive ?
>
> Thanks in Advance
>
> Somsubhra Raj
>
> If you think you can, you can.
> If you think you can’t, you are right.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com