Bewerken

Delen via


IWDFIoRequest::CancelSentRequest 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 CancelSentRequest method attempts to cancel the I/O request that the driver previously submitted to an I/O target.

Syntax

BOOL CancelSentRequest();

Return value

CancelSentRequest returns a BOOL value that indicates whether the cancel request was successfully delivered to the request's owner. TRUE indicates the request was successfully delivered. FALSE indicates the request was not successfully delivered.

Remarks

A driver can call CancelSentRequest to attempt to cancel the I/O request that it previously sent to an I/O target by calling the IWDFIoRequest::Send method.

If the request is in the I/O target's queue, the framework cancels the request. If the framework already delivered the request to the I/O target's driver, and if that driver previously called IWDFIoRequest::MarkCancelable to enabling canceling, the framework calls that driver's IRequestCallbackCancel::OnCancel method. If the target's driver did not call IWDFIoRequest::MarkCancelable, the request is not canceled unless the request subsequently becomes cancelable.

If the driver previously registered the IRequestCallbackRequestCompletion interface for the request's completion routine, the framework calls the completion routine after the request is canceled.

Requirements

Requirement Value
End of support Unavailable in UMDF 2.0 and later.
Target Platform Desktop
Minimum UMDF version 1.5
Header wudfddi.h (include Wudfddi.h)
DLL WUDFx.dll

See also

IRequestCallbackCancel::OnCancel

IRequestCallbackRequestCompletion

IWDFIoRequest

IWDFIoRequest::MarkCancelable

IWDFIoRequest::Send