[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 SetCompletionCallback method registers the interface for the OnCompletion method that the framework should call when an I/O request completes.
void SetCompletionCallback( IRequestCallbackRequestCompletion *pCompletionCallback, void *pContext );
A pointer to the IRequestCallbackRequestCompletion interface whose OnCompletion method the framework calls after the I/O request completes. Beginning with version 1.9 of UMDF, the driver can specify NULL to deregister a previously registered OnCompletion method.
A pointer to a buffer that contains context information that is related to the request completion. The framework passes this context information in a call to the IRequestCallbackRequestCompletion::OnCompletion method. This parameter is optional and can be NULL.
If a driver that forwards an I/O request requires notification when the lower-level driver completes the request, the driver can provide a completion routine and call SetCompletionCallback to register the IRequestCallbackRequestCompletion interface for the completion routine. The framework calls the completion routine after the lower-level driver completes the I/O request.
For a code example of how to use the SetCompletionCallback method, see IWDFIoRequest::Send.
|End of support||Unavailable in UMDF 2.0 and later.|
|Minimum UMDF version||1.5|
|Header||wudfddi.h (include Wudfddi.h)|