RtwqScheduleWorkItem function (rtworkq.h)
Schedules an asynchronous operation to be completed after a specified interval.
Syntax
HRESULT RtwqScheduleWorkItem(
[in] IRtwqAsyncResult *result,
[in] INT64 Timeout,
[out, optional] RTWQWORKITEM_KEY *key
);
Parameters
[in] result
A pointer to the callback. The caller must implement this interface.
[in] Timeout
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.
[out, optional] key
Receives a key that can be used to cancel the timer. To cancel the wait, call RtwqCancelWorkItem and pass this key in the Key parameter.
Return value
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8.1 [desktop apps only] |
Minimum supported server | Windows Server 2012 R2 [desktop apps only] |
Target Platform | Windows |
Header | rtworkq.h |
Library | Rtworkq.lib |
DLL | RTWorkQ.dll |