IOCTL's buffer mgmt.

Hello friends,
My problem is that i am writing two layered drivers both are
using METHOD_BUFFERED for their IOCTL’s Now from the above driver i am
building an Irp(using IoBuildControlReuest()) & allocating some space to
InBuffer & Some to OutBuffer to pass.
When i am using IOCALLDRIVER() call for passing the created Irp to
the lower driver. How is the lower driver Supposed to recieve the data & how
is he supposed to fill it with the Return values in OutBuffer.

Although InBuffer is succesfully copied to Irp->AssociatedIrp.SystemBuffer
But i am unable to get Outbuffer back to upper driver.

TIA
Navin Saini

The driver that processes the METHOD_BUFFERED IOCTL uses
Irp->AssociatedIrp.SystemBuffer for both input data and output data. The
IoManager will copy data into the system buffer when the IRP is constructed,
and will copy data out of the system buffer when the IRP is completed.

You did of course remember to set Irp->IoStatus.Information to the correct
size of the returned data before you completed the IRP? This is a classic
defect that traps everyone at some time or other, and generally at least two
or three times.

-----Original Message-----
From: Navin Saini [mailto:xxxxx@dcmds.co.in]
Sent: Tuesday, May 23, 2000 11:52 AM
To: NT Developers Interest List
Subject: [ntdev] IOCTL’s buffer mgmt.

Hello friends,
My problem is that i am writing two layered
drivers both are
using METHOD_BUFFERED for their IOCTL’s Now from the above driver i am
building an Irp(using IoBuildControlReuest()) & allocating
some space to
InBuffer & Some to OutBuffer to pass.
When i am using IOCALLDRIVER() call for passing the
created Irp to
the lower driver. How is the lower driver Supposed to recieve
the data & how
is he supposed to fill it with the Return values in OutBuffer.

Although InBuffer is succesfully copied to
Irp->AssociatedIrp.SystemBuffer
But i am unable to get Outbuffer back to upper driver.

TIA
Navin Saini


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)