MFPutWorkItemEx function (mfapi.h)

Puts an asynchronous operation on a work queue.

Syntax

HRESULT MFPutWorkItemEx(
  [in] DWORD          dwQueue,
  [in] IMFAsyncResult *pResult
);

Parameters

[in] dwQueue

The identifier for the work queue. 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 or MFAllocateWorkQueueEx.

[in] pResult

A pointer to the IMFAsyncResult interface of an asynchronous result object. To create the result object, call MFCreateAsyncResult.

Return value

Returns an HRESULT value. Possible values include the following.

Return code Description
S_OK
Success.
MF_E_INVALID_WORKQUEUE
Invalid work queue identifier. For more information, see IMFAsyncCallback::GetParameters.
MF_E_SHUTDOWN
The MFStartup function was not called, or MFShutdown was called.

Remarks

To invoke the work-item, this function passes pResult to the MFInvokeCallback function. The callback is specified when you create the result object specified by pResult.

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

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header mfapi.h
Library Mfplat.lib
DLL Mfplat.dll

See also

MFPutWorkItem

Media Foundation Functions

Work Queues