The source code for CDROM.SYS is part of the DDK (Storage samples -
class drivers), so you should have a very easy time investigating this.
Also, why are you making another virtual drive? There are a number of
free/low-cost versions out there.
TUR is used when the device has been determined to not support
GET_EVENT_STATUS_NOTIFICATION (GESN) command. Also, CDROM.SYS requires
at least a subset of the commands to be supported. Furthermore,
CDROM.SYS detects common errors and can decide that a drive is not
reliable, and thus transition one-way back to use of TUR.
There was a whitepaper I wrote about how to avoid common firmware
mistakes with this command which I highly recommend, since you’re
essentially writing firmware. It was posted at:
http://www.microsoft.com/hwdev/tech/storage/GESN_Imp.asp.
Unfortunately, the powers that be have moved it around. It was posted
around May, 2002. Sorry I don’t have a direct link (and I don’t have a
copy – I looked).
So, at a minimum, look at the DDK sources
(%DDK_DIR%\src\storage\class\classpnp\autorun.c, etc.), focus on the
GESN functions:
ClasspInitializeGesn() – used to detect initial support
ClasspInterpretGesnData() – detects incorrect firmware support, works
around some
Hth,
.
-----Original Message-----
From: ZG [mailto:xxxxx@ybwork.com]
Sent: Thursday, December 08, 2005 5:33 AM
Subject: SCSI: TEST_UNIT_READY & GET_EVENT
Hi all:
I’m working on a SCSI miniport driver which simulates a DVD/CD drive. I
finish GET_EVENT command and it works fine when I test it with some
software.
But, it seems that usually Windows just uses TEST_UNIT_READY to check
the
media status. Sometimes, after reboots or on another computer, Windows
uses
GET_EVENT instead.
Could anybody tell me why? Thanks.
–
Regards,
ZG [@ Sydney]
Windows Driver Developer