Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit
Reference
IWDFIoRequest
 IWDFIoRequest::SetCompletionCallbac...
Windows Driver Kit: User-Mode Driver Framework
IWDFIoRequest::SetCompletionCallback

The SetCompletionCallback method registers the interface for the OnCompletion method that the framework should call when an I/O request completes.

void 
  SetCompletionCallback(
    IN IRequestCallbackRequestCompletion*  pCompletionCallback,
    IN void*  pContext
    );

Parameters

pCompletionCallback
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.

pContext
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.

Return Value

None

Comments

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.

Example

For a code example of how to use the SetCompletionCallback method, see IWDFIoRequest::Send.

Requirements

Headers: Declared in Wudfddi.h. Include Wudfddi.h.

See Also

IRequestCallbackRequestCompletion, IRequestCallbackRequestCompletion::OnCompletion, IWDFIoRequest::Send


Send feedback on this topic
Built on November 19, 2009
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker