MFPutWorkItem2 function (mfapi.h)
Puts an asynchronous operation on a work queue, with a specified priority.
Syntax
HRESULT MFPutWorkItem2(
[in] DWORD dwQueue,
[in] LONG Priority,
[in] IMFAsyncCallback *pCallback,
[in] IUnknown *pState
);
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] Priority
The priority of the work item. Work items are performed in order of priority.
[in] pCallback
A pointer to the IMFAsyncCallback interface. The caller must implement this interface.
[in] pState
A pointer to the IUnknown interface of a state object, defined by the caller. This parameter can be NULL. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.
Return value
Returns an HRESULT value. Possible values include the following.
Return code | Description |
---|---|
|
Success. |
|
Invalid work queue identifier. |
|
The MFStartup function was not called, or MFShutdown was called. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | mfapi.h |
Library | Mfplat.lib |
DLL | Mfplat.dll |