Re: DIRECT_IO IOCTL ,driver gets request as a BUFFER - ED_IO ?

In one of the seminars I have attended with Jamie Hanrahan, he probably
stated it best. When you define METHOD_*_DIRECT, the buffer pointers you
pass to DeviceIoControl have a “context” switch. “Input buffer” becomes a
“command and control buffer” and it is pointed to by
Irp->AssociatedIrp.SystemBuffer. The “Output buffer” is the data buffer and
has an MDL associated with it found in Irp->MdlAddress.

Simple.

Gary G. Little
Broadband Storage, Inc.
xxxxx@broadstor.com
xxxxx@inland.net

-----Original Message-----
From: xxxxx@amd.com [mailto:xxxxx@amd.com]
Sent: Wednesday, February 20, 2002 8:59 AM
To: NT Developers Interest List
Subject: [ntdev] Re: DIRECT_IO IOCTL ,driver gets request as a BUFFER ED_IO
?

So in the application DeviceIoControl() if I specify both “InputBuffer” and
“OutputBuffer” ,both can be used to transfer data to/from the driver ?

does that mean,we can do both BUFFERED IO and DIRECT IO at the same time
using METHOD_*_DIRECT?.
When I specified “OutputBuffer” in DeviceIoControl() ,I get the
corresponding MDL at the Irp.Thank you folks.
Thanks,
Reeja
-----Original Message-----
From: xxxxx@thermonicolet.com [mailto:xxxxx@thermonicolet.com]
Sent: Wednesday, February 20, 2002 6:55 AM
To: NT Developers Interest List
Subject: [ntdev] Re: DIRECT_IO IOCTL ,driver gets request as a BUFFER ED_IO
?
To expand a little on Max’s suggestion, when you use the DIRECT methods only
one direction is direct buffer (either IN or OUT) - then the other direction
will still be BUFFERED. Perhaps you are specifying the wrong direction and
then you are looking at the BUFFERED variable instead of the DIRECT one.

  • Dennis

Dennis Merrill
Embedded Systems Engineer
Thermo Electron Corporation
Spectroscopy Division

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, February 19, 2002 9:52 PM
To: NT Developers Interest List
Subject: [ntdev] Re: DIRECT_IO IOCTL ,driver gets request as a BUFFERED_IO ?

DO_DIRECT_IO has no effect on IOCTLs, only on reads and writes.
Try METHOD_OUT_DIRECT.

Max
----- Original Message -----

From: xxxxx@amd.com mailto:xxxxx
To: NT Developers mailto:xxxxx Interest List
Sent: Wednesday, February 20, 2002 5:08 AM
Subject: [ntdev] DIRECT_IO IOCTL ,driver gets request as a BUFFERED_IO ?

Hi,
I added a new METHOD_IN_DIRECT ioctl to a kernel mode driver.I changed
device object flags to pDeviceObject->Flags| = DO_DIRECT_IO.But when the
application send a buffer through this IOCTL call the buffer get as a
BUFFERED_IO call. That means pIrp->MdlAddress is NULL and I can see the
buffer at pIRP->AsscociatedIrp.SystemBuffer.Am I missing something?Any clue?

Thanks in advance,
Reeja

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@thermonicolet.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@amd.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx></mailto:xxxxx>