IWDFIoRequest::ForwardToIoQueue method

The ForwardToIoQueue method forwards (that is, requeues) an I/O request to one of the calling driver's I/O queues.

Syntax


HRESULT ForwardToIoQueue(
  [in]  IWDFIoQueue *pDestination
);

Parameters

pDestination [in]

A pointer to the IWDFIoQueue interface for the destination queue object.

Return value

ForwardToIoQueue returns S_OK if the operation succeeds. Otherwise, this method returns one of the error codes that are defined in Winerror.h.

Remarks

The driver must own the I/O request and must have obtained the request from one of its I/O queues.

The source and destination queues cannot be the same. In other words, the driver cannot call ForwardToIoQueue to return a request to the queue that it came from. To return an I/O request to the I/O queue that it came from, the driver can call IWDFIoRequest2::Requeue.

Both the source and destination queues must belong to the same device.

Also, the ForwardToIoQueue method cannot requeue a request that the driver obtained by calling the IWDFIoQueue::RetrieveNextRequest method.

The request cannot be cancelable. If the driver previously called the IWDFIoRequest::MarkCancelable method to make the request cancelable, the driver must call the IWDFIoRequest::UnmarkCancelable method before calling ForwardToIoQueue.

Examples

The following code example shows how to forward a request to another queue if the request's buffer is insufficient to hold the required information.


HRESULT hr;
 if (OutputBufferSizeInBytes < sizeof(SWITCH_STATE)) {
    hr = HRESULT_FROM_NT(ERROR_INSUFFICIENT_BUFFER);
 }
 else {
     hr = FxRequest->ForwardToIoQueue(
                          m_Device->GetSwitchChangeQueue()
                          );
     if (SUCCEEDED(hr)) {
         completeRequest = false;
     }
  }

Requirements

End of support

Unavailable in UMDF 2.0 and later.

Minimum UMDF version

1.5

Header

Wudfddi.h (include Wudfddi.h)

DLL

WUDFx.dll

See also

IWDFIoRequest
IWDFIoQueue
IWDFIoQueue::RetrieveNextRequest
IWDFIoRequest::MarkCancelable
IWDFIoRequest::UnmarkCancelable

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft