Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
In my driver IO control code use METHOD_OUT_DIRECT with FILE_READ_ACCESS | FILE_WRITE_ACCESS.
My usecase is readbuffer passed from user space needs to be updated by driver before ioctl is complete
In ioctl handler WdfRequestRetrieveInputBuffer is used to retrieve input buffer. It is received properly. This buffer is sent to pcie device and response from pcie device needs to be copied in same input buffer. From windbg I can see buffer returned by WdfRequestRetrieveInputBuffer is properly updated before wdfrequestcomplete but in user space input buffer is reading the same values.
Please let me know if I am missing something here.
|Upcoming OSR Seminars|
|OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!|
|Internals & Software Drivers||19-23 June 2023||Live, Online|
|Writing WDF Drivers||10-14 July 2023||Live, Online|
|Kernel Debugging||16-20 October 2023||Live, Online|
|Developing Minifilters||13-17 November 2023||Live, Online|
If you want a two-way buffer, use the second buffer in the ioctl call and use "WdfRequestRetrieveOutputBuffer". The first ioctl buffer is copied into kernel mode, but the second buffer is mapped, so the bytes you write are the same bytes the user app sees.
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
Thanks Tim. That worked like a charm.