// wdm.h
PIO_WORKITEM IoAllocateWorkItem(
[in] PDEVICE_OBJECT DeviceObject
);
View the official Windows Driver Kit DDI reference
No description available.
The IoAllocateWorkItem routine allocates a work item.
DeviceObject
[in]Pointer to the caller's driver object or to one of the caller's device objects. If the caller will later pass the work item to IoQueueWorkItem, DeviceObject must point to a device object.
IoAllocateWorkItem returns a pointer to the allocated IO_WORKITEM structure. The routine returns NULL if sufficient resources do not exist.
The driver must free the work item that is returned by IoAllocateWorkItem by calling IoFreeWorkItem.
IoAllocateWorkItem both allocates and initializes a work item. A related routine, IoInitializeWorkItem, initializes a work item in storage that the driver has previously allocated. Do not call IoInitializeWorkItem to initialize a work item that was allocated by IoAllocateWorkItem.
For more information about work items, see System Worker Threads.