FltQueueGenericWorkItem posts a work item that is not associated with a specific I/O operation to a work queue.
NTSTATUS FltQueueGenericWorkItem( _In_ PFLT_GENERIC_WORKITEM FltWorkItem, _In_ PVOID FltObject, _In_ PFLT_GENERIC_WORKITEM_ROUTINE WorkerRoutine, _In_ WORK_QUEUE_TYPE QueueType, _In_opt_ PVOID Context );
- FltWorkItem [in]
Pointer to the work item to be added to the work queue. The work item must have been allocated by calling FltAllocateGenericWorkItem.
- FltObject [in]
Opaque filter (PFLT_FILTER) or instance (PFLT_INSTANCE) pointer for the caller.
- WorkerRoutine [in]
Pointer to a caller-supplied worker routine. This routine is declared as follows:
typedef VOID (*PFLT_GENERIC_WORKITEM_ROUTINE) ( _In_ PFLT_GENERIC_WORKITEM FltWorkItem, _In_ PVOID FltObject, _In_opt_ PVOID Context );
- QueueType [in]
Specifies the queue into which the work item that FltWorkItem points to is to be inserted. QueueType can be either of the following:
Insert the work item into the queue from which a system thread with a real-time priority attribute processes the work item.
Insert the work item into the queue from which a system thread with a variable priority attribute processes the work item.
The QueueType value HyperCriticalWorkQueue is reserved for system use.
- Context [in, optional]
Pointer to caller-defined context information to be passed as the Context parameter of the callback routine specified in the WorkerRoutine parameter. This parameter is optional.
FltQueueGenericWorkItem returns STATUS_SUCCESS or an appropriate NTSTATUS value such as one of the following:
The minifilter driver is being unloaded. This is an error code.
FltQueueGenericWorkItem inserts a work item that is not associated with a specific I/O operation into a system work queue. The specified WorkerRoutine callback routine is called in the context of a system thread, at IRQL PASSIVE_LEVEL.
To allocate a work item, call FltAllocateGenericWorkItem.
To free the work item when it is no longer needed, call FltFreeGenericWorkItem.