Creates an asynchronous result object. Use this function if you are implementing an asynchronous method.
HRESULT MFCreateAsyncResult(
IUnknown *punkObject,
IMFAsyncCallback *pCallback,
IUnknown *punkState,
IMFAsyncResult **ppAsyncResult
)
punkObject
Type: IUnknown *
Pointer to the object stored in the asynchronous result. This pointer is returned by the IMFAsyncResult::GetObject method. This parameter can be NULL.
pCallback
Type: IMFAsyncCallback *
Pointer to the IMFAsyncCallback interface. This interface is implemented by the caller of the asynchronous method.
punkState
Type: IUnknown *
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
Type: IMFAsyncResult **
[out]
Receives a pointer to the IMFAsyncResult interface. The caller must release the interface.
Type: HRESULT
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
| S_OK | The function succeeded. |
Refer to Media Foundation return codes.
To invoke the callback specified in pCallback, call the MFInvokeCallback function.
Header: Declared in mfapi.h.
Library: Use Mfplat.lib.