StorPortInitializeWorker routine

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

Syntax


ULONG StorPortInitializeWorker(
  _In_   PVOID HwDeviceExtension,
  _Out_  PVOID *Worker
);

Parameters

HwDeviceExtension [in]

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

Worker [out]

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 codeDescription
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

Version

Available in Windows 8 and later versions of Windows.

Header

Storport.h (include Storport.h)

IRQL

<= DISPATCH_LEVEL

See also

HwStorFindAdapter
StorPortFreeWorker
StorPortQueueWorkItem

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft