SCSI command

Hi All.

I need to pass to CD drive SCSI command and I know mounted drive letter. How
to get pointer to device object which could proceed SCSI commands. Is CDFS
driver could proceed SCSI commands?

Thanx in advance.

Yes, CDFS will pass these commands down to the storage stack.
Just open ??\E: - or \.\E: in Win32.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“ntdev” wrote in message
news:…
> Hi All.
>
> I need to pass to CD drive SCSI command and I know mounted drive letter. How
> to get pointer to device object which could proceed SCSI commands. Is CDFS
> driver could proceed SCSI commands?
>
> Thanx in advance.
>
>
>
> —
> 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

Do not open \.\e:\ however. CDFS may not bother passing down I/O
controls sent to the root directory.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim
S. Shatskih
Sent: Tuesday, August 31, 2004 12:49 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] SCSI command

Yes, CDFS will pass these commands down to the storage stack.
Just open ??\E: - or \.\E: in Win32.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“ntdev” wrote in message
> news:…
> > Hi All.
> >
> > I need to pass to CD drive SCSI command and I know mounted drive
> > letter. How to get pointer to device object which could
> proceed SCSI
> > commands. Is CDFS driver could proceed SCSI commands?
> >
> > Thanx in advance.
> >
> >
> >
> > —
> > 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
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@windows.microsoft.com To unsubscribe send a blank
> email to xxxxx@lists.osr.com
>

Surely.
\.\E:\ - the root directory on the E: volume, which is serviced by the
filesystem
\.\E: - the special “DASD volume” file from the filesystem point of view,
the FSD will pass all IOCTLs down from such a file.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Peter Wieland”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, August 31, 2004 9:11 PM
Subject: RE: [ntdev] SCSI command

> Do not open \.\e:\ however. CDFS may not bother passing down I/O
> controls sent to the root directory.
>
> -p
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim
> > S. Shatskih
> > Sent: Tuesday, August 31, 2004 12:49 AM
> > To: Windows System Software Devs Interest List
> > Subject: Re: [ntdev] SCSI command
> >
> > Yes, CDFS will pass these commands down to the storage stack.
> > Just open ??\E: - or \.\E: in Win32.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> > “ntdev” wrote in message
> > news:…
> > > Hi All.
> > >
> > > I need to pass to CD drive SCSI command and I know mounted drive
> > > letter. How to get pointer to device object which could
> > proceed SCSI
> > > commands. Is CDFS driver could proceed SCSI commands?
> > >
> > > Thanx in advance.
> > >
> > >
> > >
> > > —
> > > 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
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as:
> > xxxxx@windows.microsoft.com To unsubscribe send a blank
> > email to xxxxx@lists.osr.com
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

It is very common to send SCSI commands directly to a CD/DVD device
using the drive letter as the device being opened. Simply open the the
handle using the \.\ version of the path:

HANDLE cd = CreateFile(“\\.\E:”,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);

This handle can then be used to send CDBs using IOCTL_SCSI_PASS_THROUGH
and/or IOCTL_SCSI_PASS_THROUGH_DIRECT. This handle can also be used to
dismount the file system using FSCTL_LOCK_VOLUME and/or
FSCTL_DISMOUNT_VOLUME, which may be important depending upon the
particular commands you want to send to the device.

Hope that helps,
.

This posting is provided “AS IS” with no warranties, and confers no
rights. Use of included script samples are subject to the terms
specified at
http://www.microsoft.com/info/cpyright.htm

-----Original Message-----
From: ntdev [mailto:xxxxx@ukr.net]
Sent: Tuesday, August 31, 2004 12:36 AM
Subject: SCSI command

Hi All.

I need to pass to CD drive SCSI command and I know mounted drive letter.
How
to get pointer to device object which could proceed SCSI commands. Is
CDFS
driver could proceed SCSI commands?

Thanx in advance.