Hi,
I implemented a bus driver in kernel mode. The drivers for the devices
enumerated by the bus driver should forward their IO requests to the
bus driver, after modifying them.
The forwarding runs fine for KMDF, but does not work for UMDF drivers.
Here the KMDF code (this one works):
// .......
hDevice = WdfIoQueueGetDevice(Queue); // retrieve a handle to the
device
WDF_REQUEST_PARAMETERS_INIT(¶ms);
WdfRequestGetParameters(Request, ¶ms);
WdfRequestFormatRequestUsingCurrentType(Request);
WDF_REQUEST_SEND_OPTIONS_INIT(&options,
WDF_REQUEST_SEND_OPTION_SYNCHRONOUS);
WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT(&options,
WDF_REL_TIMEOUT_IN_SEC(1));
ioTargetHandle = WdfDeviceGetIoTarget(hDevice);
WdfRequestSend(Request, ioTargetHandle, &options)
// .......
Here the UMDF code (this does not work):
// .......
IWDFDevice *dev;
pWdfQueue->GetDevice(&dev);
pWdfRequest->FormatUsingCurrentType();
IWDFIoTarget* pWdfIoTarget = NULL;
dev->GetDefaultIoTarget(&pWdfIoTarget);
hr = pWdfRequest->Send (pWdfIoTarget, WDF_REQUEST_SEND_OPTION_TIMEOUT,
-10000000);
// .......
For the UMDF hr is set to 0xD0000128, which looks like
STATUS_FILE_CLOSED = 0xC0000128L, but reserved bit (bit 28) set.
How can I solve this issue?
Thanks in advice
|