Bewerken

Delen via


StorPortInitializeWorker function (storport.h)

Creates a new Storport work item that runs in a system worker thread.

Syntax

ULONG StorPortInitializeWorker(
  [in]  PVOID HwDeviceExtension,
  [out] PVOID *Worker
);

Parameters

[in] HwDeviceExtension

A pointer to the hardware device extension for the host bus adapter (HBA).

[out] Worker

A pointer to an opaque buffer that holds context information for the work item.

Return value

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 Worker is NULL.
STOR_STATUS_INSUFFICIENT_RESOURCES
Insufficient resources are available to initialize the work item context.
STOR_STATUS_SUCCESS
The work item was successfully initialized.

Remarks

The work item context returned in the Worker parameter by StorPortInitializeWorker is used in future calls to StorPortQueueWorkItem or StorPortFreeWorker.

If the miniport uses the work item during IO processing, we recommended that StorPortInitializeWorker be called during the miniport's HwStorFindAdapter function to ensure that resources are available when needed.

Requirements

Requirement Value
Minimum supported client Available in Windows 8 and later versions of Windows.
Target Platform Universal
Header storport.h (include Storport.h)
IRQL <= DISPATCH_LEVEL

See also

HwStorFindAdapter

StorPortFreeWorker

StorPortQueueWorkItem