共用方式為


StorPortInvokeAcpiMethod 函式 (storport.h)

StorPortInvokeAcpiMethod 例程會執行存儲設備的 ACPI 方法。

語法

ULONG StorPortInvokeAcpiMethod(
  [in]            PVOID         HwDeviceExtension,
  [in, optional]  PSTOR_ADDRESS Address,
  [in]            ULONG         MethodName,
  [in, optional]  PVOID         InputBuffer,
  [in]            ULONG         InputBufferLength,
  [in, optional]  PVOID         OutputBuffer,
  [in]            ULONG         OutputBufferLength,
  [out, optional] PULONG        BytesReturned
);

參數

[in] HwDeviceExtension

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

[in, optional] Address

目標裝置的位址。 這個參數是選擇性的。 如果 Address 設定為 NULL,配接器就是目標。

[in] MethodName

ACPI 方法的四位元組名稱。 例如,(ULONG) 'DDS_') 會將 AHCI 控制器的 ACPI 方法命名為_SDD或 'Set Device Data'。

[in, optional] InputBuffer

方法之輸入數據的指標。

[in] InputBufferLength

InputBuffer 中緩衝區的長度,以位元組為單位,

[in, optional] OutputBuffer

方法輸出數據的指標。

[in] OutputBufferLength

OutputBuffer 中緩衝區的長度,以位元組為單位,

[out, optional] BytesReturned

OutputBuffer 中傳回之數據長度的指標,以位元組為單位

傳回值

StorPortInvokeAcpiMethod 例程會傳回下列其中一個狀態代碼:

傳回碼 描述
STOR_STATUS_INVALID_UNSUCCESSFUL
一般錯誤狀況存在。
STOR_STATUS_INVALID_PARAMETER
HwDeviceExtensionInputBuffer或 outputBuffer 為 NULL。

-或-

位址 是指不存在的目標。

STOR_STATUS_NOT_IMPLEMENTED
ACPI 方法未實作。
STOR_STATUS_INSUFFICIENT_RESOURCES
沒有足夠的資源可執行 方法,或 OutputBufferLength 不足以處理傳回的數據。
STOR_STATUS_INVALID_IRQL
目前的 IRQL > PASSIVE_LEVEL。
STOR_STATUS_SUCCESS
方法已成功執行。

言論

StorPortInvokeAcpiMethod 可讓迷你埠驅動程式叫用針對記憶體控制器和記憶體 LUN 定義的 ACPI 方法。 方法名稱是四個字節的字元字串,在 MethodName中佔用 ULONG 值。

要求

要求 價值
最低支援的用戶端 適用於 Windows 8 和更新版本的 Windows。
目標平臺 普遍
標頭 storport.h (包括 Storport.h)
IRQL PASSIVE_LEVEL