通过


WdfFdoLockStaticChildListForIteration 函数 (wdffdo.h)

[仅适用于 KMDF]

WdfFdoLockStaticChildListForIteration 方法为从属于指定父设备的静态子列表中检索项准备框架。

语法

VOID WdfFdoLockStaticChildListForIteration(
  [in] WDFDEVICE Fdo
);

参数

[in] Fdo

表示父设备的框架设备对象的句柄。

返回值

没有

注解

如果驱动程序提供无效的对象句柄,则会发生 bug 检查。

使用静态总线枚举的总线驱动程序可以调用 WdfFdoLockStaticChildListForIteration

调用 WdfFdoLockStaticChildListForIteration后,驱动程序可以重复调用 WdfFdoRetrieveNextStaticChild 以获取子列表中的每个子设备的相关信息。

驱动程序调用 WdfFdoRetrieveNextStaticChild后,它必须调用 WdfFdoUnlockStaticChildListFromIteration

如果在调用 WdfFdoLockStaticChildListForIteration后驱动程序对子列表进行更改,框架将存储所有更改,并在驱动程序调用 WdfFdoUnlockStaticChildListFromIteration时通知即插即用(PnP)管理器。

驱动程序可以嵌套对 WdfFdoLockStaticChildListForIterationWdfFdoUnlockStaticChildListFromIteration的调用。 如果驱动程序嵌套对这些方法的调用,框架将存储所有更改,直到上次调用 WdfFdoUnlockStaticChildListFromIteration

有关静态子列表的详细信息,请参阅 静态枚举

例子

有关使用 WdfFdoLockStaticChildListForIteration的代码示例,请参阅 WdfFdoRetrieveNextStaticChild

要求

要求 价值
目标平台 普遍
最低 KMDF 版本 1.0
标头 wdffdo.h (包括 Wdf.h)
图书馆 Wdf01000.sys(请参阅框架库版本控制。
IRQL <= DISPATCH_LEVEL
DDI 符合性规则 DriverCreate(kmdf)KmdfIrql(kmdf)KmdfIrql2(kmdf),KmdfIrqlExplicit(kmdf)

另请参阅

WdfFdoUnlockStaticChildListFromIteration