RtwqPutWaitingWorkItem function (rtworkq.h)

Queues a work item that waits for an event to be signaled.

Syntax

HRESULT RtwqPutWaitingWorkItem(
  [in]            HANDLE           hEvent,
  [in]            LONG             lPriority,
  [in]            IRtwqAsyncResult *result,
  [out, optional] RTWQWORKITEM_KEY *key
);

Parameters

[in] hEvent

A handle to an event object, such as an event or timer. To create an event object, call CreateEvent or CreateEventEx.

[in] lPriority

The priority of the work item. Work items are performed in order of priority.

[in] result

A pointer to the IRtwqAsyncResult interface of an asynchronous result object. To create the result object, call RtwqCreateAsyncResult.

[out, optional] key

Receives a key that can be used to cancel the wait. To cancel the wait, call RtwqCancelWorkItem and pass this key in the Key parameter. This parameter can be NULL.

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