How I send a irp to a port driver directly?

Posted: 05-10-2005, 04:58 AM
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?


Reply With Quote

Responses to "How I send a irp to a port driver directly?"

heinz
Guest
Posts: n/a
 
Re: How I send a irp to a port driver directly?
Posted: 05-10-2005, 06:54 AM
> 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.

It would be good to know what problem you are trying to solve. Perhaps
there is a better solution that does not involve making a poorly
behaved driver. Because if you bypass the stack, you WILL create field
problems. When possible, please specify what you are trying to solve
instead of asking how to do bad things. I think you will like the
alternate solutions you will discover.

Reply With Quote
zhangjf
Guest
Posts: n/a
 
How I send a irp to a port driver directly?
Posted: 05-10-2005, 07:01 AM
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?



Reply With Quote
heinz
Guest
Posts: n/a
 
Re: How I send a irp to a port driver directly?
Posted: 05-10-2005, 07:22 AM
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?

Reply With Quote
zhangjf
Guest
Posts: n/a
 
Re: How I send a irp to a port driver directly?
Posted: 05-10-2005, 07:37 AM
Sorry. I want send irp in my user application, not in a driver.

"heinz" <heinz_baer@my-deja.com>
??????:1115706177.600236.206960@o13g2000cwo.google groups.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?
>

Reply With Quote
heinz
Guest
Posts: n/a
 
Re: How I send a irp to a port driver directly?
Posted: 05-10-2005, 10:32 AM
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.

Reply With Quote
Maxim S. Shatskih
Guest
Posts: n/a
 
Re: How I send a irp to a port driver directly?
Posted: 05-10-2005, 01:24 PM
> 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


Reply With Quote
zhangjf
Guest
Posts: n/a
 
Re: How I send a irp to a port driver directly?
Posted: 05-11-2005, 02:32 AM
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.g bl...
>> 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
>
>

Reply With Quote
Maxim S. Shatskih
Guest
Posts: n/a
 
Re: How I send a irp to a port driver directly?
Posted: 05-11-2005, 02:41 AM
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.g bl...
> >> 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
> >
> >
>
>

Reply With Quote
zhangjf
Guest
Posts: n/a
 
Re: How I send a irp to a port driver directly?
Posted: 05-11-2005, 03:24 AM
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.g bl...
>> >> 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
>> >
>> >
>>
>>
>
>

Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
usb port and driver mckeke0702@aol.com Windows XP Device Drivers 1 09-26-2004 01:00 AM
MS com port driver help chas Windows XP Device Drivers 1 01-25-2004 08:37 AM
duplicate a print job and send to generic driver WilPeck Windows XP Printers / Scanners / Fax 0 08-18-2003 08:17 PM
Block port send file Darlie Windows XP Messenger 3 08-12-2003 06:07 AM
can not send through port 25 dave Windows XP Network & Web 8 07-14-2003 07:17 PM