MFInvokeCallback

Invokes a callback method to complete an asynchronous operation.

Syntax

HRESULT MFInvokeCallback(
         IMFAsyncResult *pAsyncResult
)  

Parameters

pAsyncResult
Type: IMFAsyncResult *

Pointer to the IMFAsyncResult interface. To create this object, call MFCreateAsyncResult.

Return value

Type: HRESULT 

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codes
Return code Description
S_OK The function succeeded.
MF_E_INVALID_WORKQUEUE Invalid work queue. For more information, see IMFAsyncCallback::GetParameters.
MF_E_SHUTDOWN The MFShutdown function was called to shut down the Media Foundation platform.

Refer to Media Foundation return codes.

Remarks

If you are implementing an asynchronous method, use this function to invoke the caller’s IMFAsyncCallback::Invoke method.

The callback is invoked from a Media Foundation work queue. For more information, see Writing an Asynchronous Method.

The MFShutdown function shuts down the work queue threads, so the callback is not guaranteed to be invoked after MFShutdown is called.

Requirements

Header: Declared in mfapi.h.

Library: Use mfplat.lib.