Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

StorPortInitialize routine

The StorPortInitilize routine initializes the port driver parameters and extension data. StorPortInitilize also saves the adapter information provided from the miniport driver.


STORPORT_API ULONG StorPortInitialize(
  _In_      PVOID Argument1,
  _In_      PVOID Argument2,
  _In_      PHW_INITIALIZATION_DATA HwInitializationData,
  _In_opt_  PVOID HwContext


Argument1 [in]

The first pointer with which the operating system called the miniport's DriverEntry routine.

Argument2 [in]

The second pointer with which the operating system called the miniports's DriverEntry routine.

HwInitializationData [in]

Pointer to the initialization and configuration information set by the miniport driver in it's DriverEntry routine.

HwContext [in, optional]

Is the address of a context value to be passed to the miniport driver's HwStorFindAdapter routine. Only legacy miniport drivers that scan the bus for HBAs rather than receiving configuration information from the port driver can use this parameter to store state between calls to HwStorFindAdapter.

Return value

The result of the initialization actions performed by StorPortInitilize. The miniport driver will return this value as the return value for its DriverEntry routine.

StorPortInitilize returns one of the following status codes:

Return codeDescription

Argument1 is NULL.


Argument2 is NULL.


HwInitializationData is NULL.


The driver extension data and adapter information were initialized successfully.


No memory is available to store an initialization parameter.


The version of the structure pointed to by HwInitializationData is invalid for the current operating system.


The allocation failed for the driver object extension data.



This routine must be called from the miniport driver's DriverEntry routine.

Because Storport miniport drivers must support PnP, the Storport driver does not use the HwContext parameter passed to StorPortInitilize.

Every miniport driver's DriverEntry routine must call StorPortInitilize after the miniport driver has first zeroed and then set the members of HW_INITIALIZATION_DATA.



Storport.h (include Storport.h)



See also




Send comments about this topic to Microsoft

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.