共用方式為


StorPortGetSystemPortNumber 函式 (storport.h)

StorPortGetSystemPortNumber 例程會擷取記憶體配接器的系統指派埠號碼。

語法

ULONG StorPortGetSystemPortNumber(
  [in]      PVOID         HwDeviceExtension,
  [in, out] PSTOR_ADDRESS Address
);

參數

[in] HwDeviceExtension

主機總線適配卡 (HBA) 的硬體裝置擴充功能指標。

[in, out] Address

格式化為 STOR_ADDR_BTL8之記憶體地址結構的指標。 傳回時,這個結構的 Port 成員會包含指派給配接器的埠值。

傳回值

StorPortGetSystemPortNumber 會傳回下列其中一個狀態代碼:

傳回碼 描述
STOR_STATUS_INVALID_DEVICE_STATE
埠號碼值尚未指派給記憶體配接器。
STOR_STATUS_SUCCESS
指出已成功傳回記憶體配接器的埠號碼。
STOR_STATUS_INVALID_PARAMETER
HwDeviceExtensionNULL

-或-

AddressType 成員不是 STOR_ADDRESS_TYPE_BTL8

言論

Address 所指向的地址結構會設定並格式化為 STOR_ADDR_BTL8AddressType 成員必須設定為 STOR_ADDRESS_TYPE_BTL8,且 Length member Address 必須大於或等於 STOR_ADDR_BTL8_ADDRESS_LENGTH

要求

要求 價值
最低支援的用戶端 從 Windows 8 開始提供。
目標平臺 普遍
標頭 storport.h

另請參閱

STOR_ADDRESS

STOR_ADDR_BTL8