IQueueCallbackIoStop::OnIoStop method (wudfddi.h)

[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]

The OnIoStop callback function stops the processing of the specified I/O request from the specified queue.

Syntax

void OnIoStop(
  [in] IWDFIoQueue   *pWdfQueue,
  [in] IWDFIoRequest *pWdfRequest,
  [in] ULONG         ActionFlags
);

Parameters

[in] pWdfQueue

A pointer to the IWDFIoQueue interface for the I/O queue object that processing of the I/O request is stopped from.

[in] pWdfRequest

A pointer to the IWDFIoRequest interface that represents the framework request object whose processing is stopped.

[in] ActionFlags

A valid bitwise OR of WDF_REQUEST_STOP_ACTION_FLAGS-typed values that identifies the state of a stop action request.

Return value

None

Remarks

A driver registers the IQueueCallbackIoStop interface when the driver calls the IWDFDevice::CreateIoQueue method to create an I/O queue or to configure the default I/O queue.

If a driver registers an OnIoStop callback function for an I/O queue, the framework calls it when the queue's underlying device is leaving its working (D0) state. The framework calls the OnIoStop callback function for every I/O request that the driver has not completed, including requests that the driver owns and those that it has forwarded to an I/O target.

The OnIoStop callback function must complete, cancel, or postpone further processing of the I/O request. You must use the following rules:

If the driver owns the I/O request, it must call IWDFIoRequest::Complete to complete or cancel the request, or it must postpone further processing of the request and then call IWDFIoRequest2::StopAcknowledge.

If the driver has forwarded the I/O request to an I/O target, it must call IWDFIoRequest::CancelSentRequest to attempt to cancel the request, or it must postpone further processing of the request and then call StopAcknowledge.

If the WdfRequestStopRequestCancelable flag is set in the ActionFlags parameter, the driver must call IWDFIoRequest::UnmarkCancelable before calling IWDFIoRequest::Complete to complete (or cancel) the request or calling IWDFIoRequest2::StopAcknowledge to requeue the request.

Requirements

Requirement Value
Target Platform Windows
Header wudfddi.h (include Wudfddi.h)

See also

IQueueCallbackIoStop

IWDFDevice::CreateIoQueue

IWDFIoQueue

IWDFIoRequest

IWDFIoRequest2::StopAcknowledge

WDF_REQUEST_STOP_ACTION_FLAGS