IMFAsyncCallback::GetParameters method (mfobjects.h)

Provides configuration information to the dispatching thread for a callback.


HRESULT GetParameters(
  [out] DWORD *pdwFlags,
  [out] DWORD *pdwQueue


[out] pdwFlags

Receives a flag indicating the behavior of the callback object's IMFAsyncCallback::Invoke method. The following values are defined. The default value is zero.

Value Meaning
The callback does not take a long time to complete, but has no specific restrictions on what system calls it makes. The callback generally takes less than 30 milliseconds to complete.
The callback does very minimal processing. It takes less than 1 millisecond to complete.

The callback must be invoked from one of the following work queues:

Implies MFASYNC_FAST_IO_PROCESSING_CALLBACK, with the additional restriction that the callback does no processing (less than 50 microseconds), and the only system call it makes is SetEvent.

The callback must be invoked from one of the following work queues:

Blocking callback.
Reply callback.

[out] pdwQueue

Receives the identifier of the work queue on which the callback is dispatched.

This value can specify one of the standard Media Foundation work queues, or a work queue created by the application. For list of standard Media Foundation work queues, see Work Queue Identifiers. To create a new work queue, call MFAllocateWorkQueue. The default value is MFASYNC_CALLBACK_QUEUE_STANDARD.

If the work queue is not compatible with the value returned in pdwFlags, the Media Foundation platform returns MF_E_INVALID_WORKQUEUE when it tries to dispatch the callback. (See MFPutWorkItem.)

Return value

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

Return code Description
The method succeeded.
Not implemented. Assume the default behavior.


The GetParameters method returns information about the callback so that the dispatching thread can optimize the process that it uses to invoke the callback.

If the method returns a value other than zero in the pdwFlags parameter, your Invoke method must meet the requirements described here. Otherwise, the callback might delay the pipeline.

If you want default values for both parameters, return E_NOTIMPL. The default values are given in the parameter descriptions on this page.

This interface is available on the following platforms if the Windows Media Format 11 SDK redistributable components are installed:

  • Windows XP with Service Pack 2 (SP2) and later.
  • Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (October 2006 Update Rollup for Windows XP Media Center Edition) installed.


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 mfobjects.h (include Mfidl.h)
Library Mfuuid.lib

See also

Asynchronous Callback Methods


Work Queues