Buffer queue

Just a quick question: I’m setting up a scheme where I pass buffers in IOCTLs to the driver with METHOD_OUT_DIRECT so I
get a valid MdlAddress. I’m going to mark the IRPs pending and complete them in another thread when I receive data.
Will METHOD_OUT_DIRECT work (or BSOD me), or should I use METHOD_BUFFERED ?

TIA
/Rob

I dont think there is any problem in that… I have done pretty much the same
before and at the end of the day the user mode code is giving up the memory
until you complete the request regardless of the method.

Dan

On Sun, Nov 14, 2010 at 9:14 PM, Robert Bielik wrote:

> Just a quick question: I’m setting up a scheme where I pass buffers in
> IOCTLs to the driver with METHOD_OUT_DIRECT so I
> get a valid MdlAddress. I’m going to mark the IRPs pending and complete
> them in another thread when I receive data.
> Will METHOD_OUT_DIRECT work (or BSOD me), or should I use METHOD_BUFFERED ?
>
> TIA
> /Rob
>
> —
> 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
>

“Robert Bielik” wrote in message
news:xxxxx@ntdev…
> Just a quick question: I’m setting up a scheme where I pass buffers in
> IOCTLs to the driver with METHOD_OUT_DIRECT so I
> get a valid MdlAddress. I’m going to mark the IRPs pending and complete
> them in another thread when I receive data.
> Will METHOD_OUT_DIRECT work (or BSOD me), or should I use METHOD_BUFFERED
> ?
>
> TIA
> /Rob

Completing IRPs from another thread should work, with any method.
( but, when done wrong, it may BSOD you :wink:

– pa

Daniel Newton skrev 2010-11-14 10:13:

I dont think there is any problem in that… I have done pretty much the same before and at the end of the day the user mode code is giving up the memory until you complete the request regardless of the method.

Thnx guys, going with METHOD_OUT_DIRECT then :slight_smile:

/Rob