MFCreateAsyncResult function (mfapi.h)
Creates an asynchronous result object. Use this function if you are implementing an asynchronous method.
Syntax
HRESULT MFCreateAsyncResult(
IUnknown *punkObject,
IMFAsyncCallback *pCallback,
IUnknown *punkState,
IMFAsyncResult **ppAsyncResult
);
Parameters
punkObject
Pointer to the object stored in the asynchronous result. This pointer is returned by the IMFAsyncResult::GetObject method. This parameter can be NULL.
pCallback
Pointer to the IMFAsyncCallback interface. This interface is implemented by the caller of the asynchronous method.
punkState
Pointer to the IUnknown interface of a state object. This value is provided by the caller of the asynchronous method. This parameter can be NULL.
ppAsyncResult
Receives a pointer to the IMFAsyncResult interface. The caller must release the interface.
Return value
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The function succeeded. |
Remarks
To invoke the callback specified in pCallback, call the MFInvokeCallback function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | mfapi.h |
Library | Mfplat.lib |
DLL | Mfplat.dll |