How I send a irp to a port driver directly?

G

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

I want send a irp to read a sector from cdrom. I want to bypass the layered
driver architecture of windowsXP and directly send irp to port driver.

Who can help me?
 

heinz

Distinguished
Apr 2, 2004
10
0
18,510
Archived from groups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

Let me state this in another way. Use IoGetDeviceObjectPointer to get
the top device object and use IoCallDriver to send your IRP down the
stack which eventually will be handled by the port driver. Will that
work? If not, what is the problem?
 

heinz

Distinguished
Apr 2, 2004
10
0
18,510
Archived from groups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

If you want really low level, you could use DeviceIoControl with
IOCTL_SCSI_PASS_THROUGH. See the SPTI example in the DDK which is an
application, not a driver and it works with SCSI, ATAPI, USB, and
FireWire interfaces. The legacy way to get a handle is to call
CreateFile on a device name like "CdRom0". The new way is to discover
CD-ROM devices using the Setup API's to enumerate them.
 
G

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

Sorry. I want send irp in my user application, not in a driver.

"heinz" <heinz_baer@my-deja.com>
??????:1115706177.600236.206960@o13g2000cwo.googlegroups.com...
> Let me state this in another way. Use IoGetDeviceObjectPointer to get
> the top device object and use IoCallDriver to send your IRP down the
> stack which eventually will be handled by the port driver. Will that
> work? If not, what is the problem?
>
 
G

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

> FireWire interfaces. The legacy way to get a handle is to call
> CreateFile on a device name like "CdRom0".

Drive letter is also fine in the \\.\D: form.

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

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

Now I do as what you said. But the catpure result of "BusTrace 2002
Professinal" show that the irp was generated as a SCSI Pass Through command
by "cdfs.sys". I want the irp was sent dorectly to the port driver,
bypassing the layered driver architecture of windows.

"Maxim S. Shatskih" <maxim@storagecraft.com> дÈëÏûÏ¢ÐÂÎÅ:%23VlgxsVVFHA.3152@TK2MSFTNGP12.phx.gbl...
>> FireWire interfaces. The legacy way to get a handle is to call
>> CreateFile on a device name like "CdRom0".
>
> Drive letter is also fine in the \\.\D: form.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
>
 
G

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

You cannot bypass CDFS at all. The IRP will be routed through it anyway.

Passthru just means that these layers - CDFS/CDROM - does not participate
in CDB creation, the CDB will be exactly as built by your app.

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

"zhangjf" <zhangjf@argosoft.net> wrote in message
news:d5rnbn$dri$1@news.yaako.com...
> Now I do as what you said. But the catpure result of "BusTrace 2002
> Professinal" show that the irp was generated as a SCSI Pass Through command
> by "cdfs.sys". I want the irp was sent dorectly to the port driver,
> bypassing the layered driver architecture of windows.
>
> "Maxim S. Shatskih" <maxim@storagecraft.com>
дÈëÏûÏ¢ÐÂÎÅ:%23VlgxsVVFHA.3152@TK2MSFTNGP12.phx.gbl...
> >> FireWire interfaces. The legacy way to get a handle is to call
> >> CreateFile on a device name like "CdRom0".
> >
> > Drive letter is also fine in the \\.\D: form.
> >
> > --
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > maxim@storagecraft.com
> > http://www.storagecraft.com
> >
> >
>
>
 
G

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

I found by BusTrace that the alcohol120% can sent the irp directly to port
driver.

"Maxim S. Shatskih" <maxim@storagecraft.com> дÈëÏûÏ¢ÐÂÎÅ:d5rns6$285r$1@gavrilo.mtu.ru...
> You cannot bypass CDFS at all. The IRP will be routed through it
> anyway.
>
> Passthru just means that these layers - CDFS/CDROM - does not
> participate
> in CDB creation, the CDB will be exactly as built by your app.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "zhangjf" <zhangjf@argosoft.net> wrote in message
> news:d5rnbn$dri$1@news.yaako.com...
>> Now I do as what you said. But the catpure result of "BusTrace 2002
>> Professinal" show that the irp was generated as a SCSI Pass Through
>> command
>> by "cdfs.sys". I want the irp was sent dorectly to the port driver,
>> bypassing the layered driver architecture of windows.
>>
>> "Maxim S. Shatskih" <maxim@storagecraft.com>
> дÈëÏûÏ¢ÐÂÎÅ:%23VlgxsVVFHA.3152@TK2MSFTNGP12.phx.gbl...
>> >> FireWire interfaces. The legacy way to get a handle is to call
>> >> CreateFile on a device name like "CdRom0".
>> >
>> > Drive letter is also fine in the \\.\D: form.
>> >
>> > --
>> > Maxim Shatskih, Windows DDK MVP
>> > StorageCraft Corporation
>> > maxim@storagecraft.com
>> > http://www.storagecraft.com
>> >
>> >
>>
>>
>
>
 
G

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

It uses unstable hacks.

People who are concerned about stability of their computers do not use this
software, they use Nero instead.

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

"zhangjf" <zhangjf@argosoft.net> wrote in message
news:d5rqcn$g7r$1@news.yaako.com...
> I found by BusTrace that the alcohol120% can sent the irp directly to port
> driver.
>
> "Maxim S. Shatskih" <maxim@storagecraft.com>
дÈëÏûÏ¢ÐÂÎÅ:d5rns6$285r$1@gavrilo.mtu.ru...
> > You cannot bypass CDFS at all. The IRP will be routed through it
> > anyway.
> >
> > Passthru just means that these layers - CDFS/CDROM - does not
> > participate
> > in CDB creation, the CDB will be exactly as built by your app.
> >
> > --
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > maxim@storagecraft.com
> > http://www.storagecraft.com
> >
> > "zhangjf" <zhangjf@argosoft.net> wrote in message
> > news:d5rnbn$dri$1@news.yaako.com...
> >> Now I do as what you said. But the catpure result of "BusTrace 2002
> >> Professinal" show that the irp was generated as a SCSI Pass Through
> >> command
> >> by "cdfs.sys". I want the irp was sent dorectly to the port driver,
> >> bypassing the layered driver architecture of windows.
> >>
> >> "Maxim S. Shatskih" <maxim@storagecraft.com>
> > дÈëÏûÏ¢ÐÂÎÅ:%23VlgxsVVFHA.3152@TK2MSFTNGP12.phx.gbl...
> >> >> FireWire interfaces. The legacy way to get a handle is to call
> >> >> CreateFile on a device name like "CdRom0".
> >> >
> >> > Drive letter is also fine in the \\.\D: form.
> >> >
> >> > --
> >> > Maxim Shatskih, Windows DDK MVP
> >> > StorageCraft Corporation
> >> > maxim@storagecraft.com
> >> > http://www.storagecraft.com
> >> >
> >> >
> >>
> >>
> >
> >
>
>