IDeviceBroker::OpenDeviceFromInterfacePath 方法

重要

这些接口不受支持,不应使用。 请改用 设备访问 API 中的 API C++编程参考

尝试代表客户端打开设备接口实例。 IID = 8604b268-34A6-4b1A-A59F-CDBD8379FD98。

语法

HRESULT OpenDeviceFromInterfacePath(
  [in]  PCWSTR pszDeviceInterfacePath,
  [in]  DWORD  desiredAccess,
  [in]  DWORD  shareMode,
  [in]  DWORD  flagsAndAttributes,
  [out] Handle *phDevice
);

参数

pszDeviceInterfacePath [in]

要打开的设备接口实例。

desiredAccess [in]

要传递给打开的所需访问权限。

shareMode [in]

要传递给打开的共享模式。

flagsAndAttributes [in]

要传递给打开的标志和属性。

*phDevice [out]

如果打开成功,生成的句柄。

返回值

如果此函数成功,则返回S_OK。 否则,它将返回 HRESULT 错误代码。