WriteFileGather support for device drivers

  • Thread starter Thread starter P Satya Pavan Kiran
  • Start date Start date
P

P Satya Pavan Kiran

Guest
HI Team,

I have a device driver that provides device files that can be opened, write, read operations.

The driver is supporting async operations by initializing the queue WdfIoQueueDispatchParallel.

Able to perform async read writes using ReadFile, WriteFile, ReadFileEx, WriteFileEx methods.

But, when trying to perform async writes using WriteFileGather, i am getting Error number 87 (ERROR_INVALID_PARAMETER) and Overlapped internal status is coming as 259.

- File is opened with GENERIC_WRITE, (FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING) Capabilities

- aSegmentArray is defined for MAX_BUFS + 1 size where last element is to provide NULL

- Memory for aSegmentArray is allocated using _aligned_malloc() and the alignment is getting from GetSystemInfo() method (sys_info.dwPageSize parameter)

- aSegmentArray buffer is typecasted with PtrToPtr64(BUFFER)


could someone please help me on this?

is windows supports WriteFileGather() method for custom drivers? if yes, is there any additional settings that need to be taken care

Continue reading...
 

Similar threads

Back
Top