MFInvokeCallback function (mfapi.h)

Invokes a callback method to complete an asynchronous operation.


HRESULT MFInvokeCallback(
  IMFAsyncResult *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
The function succeeded.
Invalid work queue. For more information, see IMFAsyncCallback::GetParameters.
The MFShutdown function was called to shut down the Media Foundation platform.


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.


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