MFScheduleWorkItemEx function
Schedules an asynchronous operation to be completed after a specified interval.
Syntax
HRESULT MFScheduleWorkItemEx( _In_ IMFAsyncResult *pResult, _In_ INT64 Timeout, _Out_ MFWORKITEM_KEY *pKey );
Parameters
- pResult [in]
-
Pointer to the IMFAsyncResult interface of an asynchronous result object. To create the result object, call MFCreateAsyncResult.
- Timeout [in]
-
Time-out interval, in milliseconds. Set this parameter to a negative value. The callback is invoked after −Timeout milliseconds. For example, if Timeout is −5000, the callback is invoked after 5000 milliseconds.
- pKey [out]
-
Receives a key that can be used to cancel the timer. To cancel the timer, call MFCancelWorkItem and pass this key in the Key parameter.
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. |
Remarks
When the timer interval elapses, the timer calls MFInvokeCallback with the pResult pointer to invoke the asynchronous callback. The callback is specified when you create the result object.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also