MFInvokeCallback function (mfapi.h)

Invokes a callback method to complete an asynchronous operation.

Syntax

HRESULT MFInvokeCallback(
  IMFAsyncResult *pAsyncResult
);

Parameters

pAsyncResult

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

Return value

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

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

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

See also

Asynchronous Callback Methods

Media Foundation Functions