Windows Driver Kit: User-Mode Driver Framework
IWDFObject::RetrieveContext
The RetrieveContext method retrieves a context that was previously registered through the IWDFObject::AssignContext method.
HRESULT
RetrieveContext(
OUT void** ppvContext
);
Parameters
- ppvContext
- A pointer to a buffer that receives a pointer to the previously registered context.
Return Value
RetrieveContext returns S_OK if the operation succeeds. Otherwise, this method returns one of the error codes that are defined in Winerror.h.
Comments
Because the context is not a Component Object Model (COM) interface, the driver must not treat the context as such. For example, the driver cannot call the AddRef method on the context.
Example
For a code example of how to use the RetrieveContext method, see IWDFIoQueue::GetDevice.
Requirements
Headers: Declared in Wudfddi.h. Include Wudfddi.h.
See Also
IWDFIoQueue::GetDevice, IWDFObject::AssignContext
APIScan Requirements
Header: Wudfddi.h
Function: IWDFObject::RetrieveContext