// storport.h
ULONG StorPortFreeWorker(
[in] PVOID HwDeviceExtension,
PVOID Worker
);
View the official Windows Driver Kit DDI referenceNo description available.
Frees a Storport work item previously allocated by the StorPortInitializeWorker routine.
HwDeviceExtension [in]A pointer to the hardware device extension for the host bus adapter (HBA).
WorkerA pointer to an opaque buffer for the work item context returned by StorPortInitializeWorker.
The StorPortInitializeWorker routine returns one of these status codes:
| Return code | Description |
|---|---|
| STOR_STATUS_INVALID_IRQL | Current IRQL > DISPATCH_LEVEL. |
| STOR_STATUS_INVALID_PARAMETER | Either HwDeviceExtension or WorkItem is NULL. |
| STOR_STATUS_BUSY | The work item is currently queued for processing. |
| STOR_STATUS_SUCCESS | The work item was successfully freed. |
| STOR_STATUS_UNSUCCESSFUL | The work item is already free. |
Miniports should call StorPortFreeWorker whenever a work item is no longer needed or when the miniport receives a PnP SRB notification that the adapter is removed.