sharing Memory between App & UMDF driver

As the title states, I’m trying to share a buffer between the application and my UMDF USB driver. In the app, an overlapped DeviceIoControl call is made. The IOCTL is defined as METHOD_OUT_DIRECT, although I’ve tried it using METHOD_BUFFERED as well.
Once the call reaches the driver, I forward the request to a manual queue that I have set up. I don’t complete the call in hopes of keeping the pending request alive.
During the completion routine of a different event, I am trying to alter the buffer that was passed into the driver in the pended operation mentioned above. The memory is being altered in the drivers copy of the buffer. Unfortunately I can’t get the applications buffer updated until the pending IOCTL is completed.
Any insight as to what I’m doing wrong? Is this even possible with a UMDF driver?

Thanks,

Dave

xxxxx@piacton.com wrote:

As the title states, I’m trying to share a buffer between the application and my UMDF USB driver. In the app, an overlapped DeviceIoControl call is made. The IOCTL is defined as METHOD_OUT_DIRECT, although I’ve tried it using METHOD_BUFFERED as well.
Once the call reaches the driver, I forward the request to a manual queue that I have set up. I don’t complete the call in hopes of keeping the pending request alive.
During the completion routine of a different event, I am trying to alter the buffer that was passed into the driver in the pended operation mentioned above. The memory is being altered in the drivers copy of the buffer. Unfortunately I can’t get the applications buffer updated until the pending IOCTL is completed.
Any insight as to what I’m doing wrong? Is this even possible with a UMDF driver?

No, it’s not. With a UMDF driver, *ALL* I/O is buffered. Have you
considered using a mapped file?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.