KsQueueWorkItem - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ks.h

KSDDKAPI NTSTATUS KsQueueWorkItem(
  [in] PKSWORKER        Worker,
  [in] PWORK_QUEUE_ITEM WorkItem
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ks-ksqueueworkitem)

KsQueueWorkItem function

Description

The KsQueueWorkItem function queues the specified work item with a worker previous created by the KsRegisterWorker function.

Parameters

Worker [in]

Specifies the previously allocated worker.

WorkItem [in]

Specifies the initialized work item to queue. This work item is only associated with the worker as long as the worker is on a queue. The work item must have been initialized by IoAllocateWorkItem.

Return value

The KsQueueWorkItem function returns STATUS_SUCCESS if the work item was queued, or if unsuccessful the function returns an error when attempting to create a new worker if no threads are currently available.

Remarks

The worker can only be on a queue in one place, so subsequent queuing of the worker must wait until the work item has begun executing. This function may be called at DISPATCH_LEVEL.