StorPortGetSystemPortNumber routine

The StorPortGetSystemPortNumber routine retrieves the system assigned port number for a storage adapter.

Syntax


ULONG StorPortGetSystemPortNumber(
  _In_    PVOID         HwDeviceExtension,
  _Inout_ PSTOR_ADDRESS Address
);

Parameters

HwDeviceExtension [in]

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

Address [in, out]

A pointer to a storage address structure formatted as STOR_ADDR_BTL8. On return, the Port member of this structure will contain the port value assigned to the adapter.

Return value

StorPortGetSystemPortNumber returns one of the following status codes:

Return codeDescription
STOR_STATUS_INVALID_DEVICE_STATE

A port number value is not yet assigned to the storage adapter.

STOR_STATUS_SUCCESS

Indicates that port number of the storage adapter was returned successfully.

STOR_STATUS_INVALID_PARAMETER

The HwDeviceExtension was NULL.

-or-

The Type member of Address is not STOR_ADDRESS_TYPE_BTL8.

 

Remarks

The address structure pointed to by Address is allocated and formatted as STOR_ADDR_BTL8. The Type member of Address must be set to STOR_ADDRESS_TYPE_BTL8 and the Length member Address must be greater than or equal to STOR_ADDR_BTL8_ADDRESS_LENGTH.

Requirements

Target platform

Universal

Version

Available in starting with Windows 8.

Header

Storport.h

See also

STOR_ADDR_BTL8
STOR_ADDRESS

 

 

Send comments about this topic to Microsoft

Show: