IDeviceBroker::OpenDeviceFromInterfacePath 方法

重要

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

尝试代表客户端打开设备接口实例。 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 错误代码。