WdfFdoLockStaticChildListForIteration 函式 (wdffdo.h)

[僅適用於 KMDF]

WdfFdoLockStaticChildListForIteration 方法會準備架構,以從屬於指定父裝置的靜態子清單中擷取專案。

語法

void WdfFdoLockStaticChildListForIteration(
  [in] WDFDEVICE Fdo
);

參數

[in] Fdo

表示父裝置之架構裝置物件的句柄。

傳回值

備註

如果驅動程式提供無效的物件句柄,就會發生錯誤檢查。

使用靜態總線列舉的總線驅動程式可以呼叫 WdfFdoLockStaticChildListForIteration

呼叫 WdfFdoLockStaticChildListForIteration 之後,驅動程式可以重複呼叫 WdfFdoRetrieveNextStaticChild ,以取得子清單中每個子裝置的相關信息。

驅動程式呼叫 WdfFdoRetrieveNextStaticChild 之後,它必須呼叫 WdfFdoUnlockStaticChildListFromIteration

如果驅動程式在呼叫 WdfFdoLockStaticChildListForIteration 之後對子清單進行變更,架構會儲存所有變更,並在驅動程式呼叫 WdfFdoUnlockStaticChildListFromIteration 時通知 隨插即用 (PnP) 管理員。

驅動程式可以巢狀呼叫 WdfFdoLockStaticChildListForIterationWdfFdoUnlockStaticChildListFromIteration。 如果驅動程式巢狀呼叫這些方法,架構會儲存所有變更,直到最後一次呼叫 WdfFdoUnlockStaticChildListFromIteration 為止。

如需靜態子清單的詳細資訊,請參閱 靜態列舉

範例

如需使用 WdfFdoLockStaticChildListForIteration 的程式代碼範例,請參閱 WdfFdoRetrieveNextStaticChild

規格需求

需求
目標平台 Universal
最小 KMDF 版本 1.0
標頭 wdffdo.h (包含 Wdf.h)
程式庫 Wdf01000.sys (請參閱 Framework Library Versioning.)
IRQL <= DISPATCH_LEVEL
DDI 合規性規則 DriverCreate (kmdf) KmdfIrql (kmdf) KmdfIrql2 (kmdf) 、 KmdfIrqlExplicit (kmdf)

另請參閱

WdfFdoUnlockStaticChildListFromIteration