WriteFileGather to drivers

Hello all;

I am currently developing a miniport driver and an application that uses this driver (the driver will only be used by one instance of this application at any point in time). This application uses scatter/gather for I/O operations (this is how the application was designed).

However, if the application wants to write some data to the driver, it currently has to use WrieFile on a handle to the driver. This works fine, but this does not allow for a single call to write from multiple buffers.

MSDN lists WriteFileGather() as a function that does exactly this (http://msdn.microsoft.com/en-us/library/aa365749(v=vs.85).aspx) (but shows the handle as a handle to file, not device). This was seen to work fine when the handle is to a file (tried with a .txt file), but when the handle is a handle to my driver, this function fails with INVALID_PARAMETER.

Does anyone happen to have some experience with this?

Thanks & Regards,
Matt

>This was seen to work fine when the handle is to a file (tried with a .txt

file), but when the handle is a handle to my driver, this function >fails
with INVALID_PARAMETER.

The system service that implements WriteFileGather restricts the device type
that the request can be sent to. I would have expected the docs to make this
clear, though they don’t appear to.

-scott


Scott Noone
Consulting Associate and Chief System Problem Analyst
OSR Open Systems Resources, Inc.
http://www.osronline.com

Hope to see you at the next OSR kernel debugging class February 14th in
Columbia, MD!

Thank you for your reply, much appreciated.

Matt