IPnpCallbackRemoteInterfaceNotification::OnRemoteInterfaceArrival 方法 (wudfddi.h)

[警告: UMDF 2 是最新版本的 UMDF,取代了 UMDF 1。 所有新的 UMDF 驱动程序都应使用 UMDF 2 编写。 没有将新功能添加到 UMDF 1,并且对较新版本的 Windows 10 上的 UMDF 1 的支持有限。 通用 Windows 驱动程序必须使用 UMDF 2。 有关详细信息,请参阅 UMDF入门 。]

驱动程序的 OnRemoteInterfaceArrival 事件回调函数在 设备接口 可用时通知驱动程序。

语法

void OnRemoteInterfaceArrival(
  [in] IWDFRemoteInterfaceInitialize *pWdfRemoteInterfaceInit
);

参数

[in] pWdfRemoteInterfaceInit

指向 IWDFRemoteInterfaceInitialize 接口的指针,该接口标识已到达的设备接口。

返回值

没有

言论

基于 UMDF 的驱动程序可以通过调用 IWDFDevice2::RegisterRemoteInterfaceNotification来注册其可选的 OnRemoteInterfaceArrival 事件回调函数。

驱动程序可以使用 IWDFRemoteInterfaceInitialize 接口的方法来确定哪些设备接口已到达。

在驱动程序可以将 I/O 请求发送到设备接口之前,驱动程序必须执行以下作:

  1. 调用 IWDFDevice2::CreateRemoteInterface 来创建远程接口对象。
  2. 调用 IWDFDevice2::CreateRemoteTarget 来创建远程目标对象。
  3. 调用 IWDFRemoteTarget::OpenRemoteInterface 将接口对象连接到远程目标对象,并为 I/O作打开远程目标。
有关使用远程接口对象访问设备接口的详细信息,请参阅 在基于 UMDF 的驱动程序中使用设备接口

要求

要求 价值
终止支持 在 UMDF 2.0 及更高版本中不可用。
目标平台 桌面
最低 UMDF 版本 1.9
标头 wudfddi.h (包括 Wudfddi.h)

另请参阅

IPnpCallbackRemoteInterfaceNotification

IWDFDevice2::CreateRemoteInterface

IWDFDevice2::CreateRemoteTarget

IWDFRemoteInterfaceInitialize

IWDFRemoteTarget::OpenRemoteInterface