Hello,
Is there a ONE-to-ONE correspondence between WriteFile() and IRP_MJ_WRITE
requests ? i.e. if an application makes a single call to WriteFile(), will
the I/O Manager send only ONE IRP_MJ_WRITE request to my Driver or can it
send MULTIPLE IRP_MJ_WRITE requests to my driver ?
Please help!
Thanks
Puja
No, you cannot make this assumption. As an example, the scsiport driver may
break a large request up into smaller chunks if it knows that the miniport
driver cannot handle such a large transfer.
Regards,
Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com
-----Original Message-----
From: xxxxx@usa.net [mailto:xxxxx@usa.net]
Sent: Monday, September 18, 2000 6:00 PM
To: NT Developers Interest List
Subject: [ntdev] Help Please: IRP_MJ_WRITE and WriteFile()
Hello,
Is there a ONE-to-ONE correspondence between WriteFile() and IRP_MJ_WRITE
requests ? i.e. if an application makes a single call to WriteFile(), will
the I/O Manager send only ONE IRP_MJ_WRITE request to my Driver or can it
send MULTIPLE IRP_MJ_WRITE requests to my driver ?
Hi,
I don’t think so. What kind of drivers are you talking about. Storage I
guess. First the information might be cached so you might not see a
corresponding IRP_MJ_WRITE. When it does come down to your driver, it
depends on what the drivers that processed the IRP before yours did. For eg.
there might be a filter driver which could split the request into a number
of smaller chunks etc.
----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Tuesday, September 19, 2000 6:00 PM
Subject: [ntdev] Help Please: IRP_MJ_WRITE and WriteFile()
> Hello,
>
> Is there a ONE-to-ONE correspondence between WriteFile() and IRP_MJ_WRITE
> requests ? i.e. if an application makes a single call to WriteFile(),
will
> the I/O Manager send only ONE IRP_MJ_WRITE request to my Driver or can it
> send MULTIPLE IRP_MJ_WRITE requests to my driver ?
>
> Please help!
>
> Thanks
> Puja
>
> —
> You are currently subscribed to ntdev as: xxxxx@hotmail.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>
>
Hello,
My driver is NOT a storage driver, it is a Win2K driver which simulates
devices (and their Register Spaces). To my knowledge, there are NO Filter
Drivers above it (there is another similar driver below, which is also
mine).
And I want to be able to do something like “type ” and
redirect the output to my simulated device. I am wondering if this will
result in my Driver getting SINGLE/MULTIPLE IRP_MJ_WRITE requests ?
Also, does the SIZE of the Write() operation influence how many
IRP_MJ_WRITE requests the I/O Manager sends to a driver ?
Thanks for your help!
Puja
On 09/19/00, ““Noman Smith” ” wrote:
> Hi,
>
> I don’t think so. What kind of drivers are you talking about. Storage I
> guess. First the information might be cached so you might not see a
> corresponding IRP_MJ_WRITE. When it does come down to your driver, it
> depends on what the drivers that processed the IRP before yours did. For eg.
> there might be a filter driver which could split the request into a number
> of smaller chunks etc.
>
>
> ----- Original Message -----
> From:
> To: “NT Developers Interest List”
> Sent: Tuesday, September 19, 2000 6:00 PM
> Subject: [ntdev] Help Please: IRP_MJ_WRITE and WriteFile()
>
>
> > Hello,
> >
> > Is there a ONE-to-ONE correspondence between WriteFile() and IRP_MJ_WRITE
> > requests ? i.e. if an application makes a single call to WriteFile(),
> will
> > the I/O Manager send only ONE IRP_MJ_WRITE request to my Driver or can it
> > send MULTIPLE IRP_MJ_WRITE requests to my driver ?
> >
> > Please help!
> >
> > Thanks
> > Puja
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> >
> >
>
My driver is NOT a storage driver, it is a Win2K driver which simulates
devices (and their Register Spaces). To my knowledge, there are
NO Filter
Drivers above it (there is another similar driver below, which is also
mine).
In which case you will see one IRP_MJ_WRITE for each NtWriteFile operation.
If you write a Win32 application using WriteFile calls, you will see one
NtWriteFile operation for each WriteFile operation.
And I want to be able to do something like “type ” and
> redirect the output to my simulated device. I am wondering if this will
> result in my Driver getting SINGLE/MULTIPLE IRP_MJ_WRITE requests ?
>
Multiple. Why? Well now you’ve introduced yet another layer on top of Win32
WriteFile, which is layered on top of the NT system service api NtWriteFile.
How the nt command shell buffers stdout is up to the nt command shell
application. It might even be specified somewhere.
> Also, does the SIZE of the Write() operation influence how many
> IRP_MJ_WRITE requests the I/O Manager sends to a driver ?
>
Not directly. The IoManager is not, for example, going to look at your write
request and decide that it needs three IRPs. The layers (upon layers) of
system services above the IoManager are also generally not going to do this,
but the command shell application certainly might.
Mark Roddy
Windows 2000/NT Consultant
Hollis Technology Solutions
www.hollistech.com