How to know the size of buffer required when passing IRP to another DeviceObject

Hi ,

In my filter driver I have two device objects: one attached to a stack while
the other is a standalone DO(both of them are named DO). All
my communiations from the user mode app is to the standalone DO.

From the user mode app I am trying to ReadFile. Hence I create an IRP using
IrpBuildSynchronousIRP and pass it to the attached DeviceObject. However I
need to know what is the size required for the buffer? Anyway I can know
that?

Tehnically this maylook wierd but I am just try to play around with the
API’s and the stack to see how things work.

Abdul

It depends on the stack and its requirements, however you have the
buffer size of the user read request to the standalone device object,
so that is one choice.

Mark Roddy
Not as “valuable” as he used to be.

On Mon, Oct 4, 2010 at 5:39 PM, Abdul Qader wrote:
> Hi ,
>
> In my filter driver I have two device objects: one attached to a stack while
> the other is a standalone DO(both of them are named DO). All
> my?communiations from the user mode app is to the standalone DO.
>
> From the user mode app I am trying to ReadFile. Hence I create an IRP using
> IrpBuildSynchronousIRP and pass it to the attached DeviceObject. However I
> need to know what is the size required for the buffer? Anyway I can know
> that?
>
> Tehnically this maylook?wierd but I am just try to play around with the
> API’s and the stack to see how things work.
>
> Abdul
>
> — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
> List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

but i keep getting buffer size small ( getLasterror = 122)

On Tue, Oct 5, 2010 at 3:23 AM, Mark Roddy wrote:

> It depends on the stack and its requirements, however you have the
> buffer size of the user read request to the standalone device object,
> so that is one choice.
>
> Mark Roddy
> Not as “valuable” as he used to be.
>
>
>
> On Mon, Oct 4, 2010 at 5:39 PM, Abdul Qader
> wrote:
> > Hi ,
> >
> > In my filter driver I have two device objects: one attached to a stack
> while
> > the other is a standalone DO(both of them are named DO). All
> > my communiations from the user mode app is to the standalone DO.
> >
> > From the user mode app I am trying to ReadFile. Hence I create an IRP
> using
> > IrpBuildSynchronousIRP and pass it to the attached DeviceObject. However
> I
> > need to know what is the size required for the buffer? Anyway I can know
> > that?
> >
> > Tehnically this maylook wierd but I am just try to play around with the
> > API’s and the stack to see how things work.
> >
> > Abdul
> >
> > — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
> > other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the
> > List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

So buffer size requirements can depend on the device stack and its
requirements. You might want to explain in a bit more detail what you
are trying to do.

What stack?
What problem are you trying to solve?

Mark Roddy

On Mon, Oct 4, 2010 at 6:19 PM, Abdul Qader wrote:
> but i keep getting buffer size small ( getLasterror = 122)
>
> On Tue, Oct 5, 2010 at 3:23 AM, Mark Roddy wrote:
>>
>> It depends on the stack and its requirements, however you have the
>> buffer size of the user read request to the standalone device object,
>> so that is one choice.
>>
>> Mark Roddy
>> Not as “valuable” as he used to be.
>>
>>
>>
>> On Mon, Oct 4, 2010 at 5:39 PM, Abdul Qader
>> wrote:
>> > Hi ,
>> >
>> > In my filter driver I have two device objects: one attached to a stack
>> > while
>> > the other is a standalone DO(both of them are named DO). All
>> > my?communiations from the user mode app is to the standalone DO.
>> >
>> > From the user mode app I am trying to ReadFile. Hence I create an IRP
>> > using
>> > IrpBuildSynchronousIRP and pass it to the attached DeviceObject. However
>> > I
>> > need to know what is the size required for the buffer? Anyway I can know
>> > that?
>> >
>> > Tehnically this maylook?wierd but I am just try to play around with the
>> > API’s and the stack to see how things work.
>> >
>> > Abdul
>> >
>> > — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging
>> > and
>> > other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
>> > the
>> > List Server section of OSR Online at
>> > http://www.osronline.com/page.cfm?name=ListServer
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
> List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer