gpt4 book ai didi

wia - 相当于 WIA DeviceDlg 的 WPD

转载 作者:行者123 更新时间:2023-12-03 18:36:28 30 4
gpt4 key购买 nike

我正在为当前使用 Windows Image Acquisition (WIA) 的应用程序添加 Windows 可移植设备 (WPD) 支持。 WIA 通过 IWiaItem::DeviceDlg 提供了一个方便的图片选择对话框。

我找不到 WPD 等效项。有没有,如果没有,允许用户选择项目的首选技术是什么?我不必自己编写对话,对吗?

最佳答案

MS 的响应:

[T]here is no dedicated dialog for picture selection (outside of WIA). Instead, you should use the regular file open dialog which supports WPD device navigation. There will be some magic that needs to be done to start the dialog at the correct folder within the device. You might have to write code to find the folder(s) with pictures.

The magic path to pass to the File Open dialog is: ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\<device instance id>

The device instance id can be derived from the PnP Device Path via SetupApi calls (SetupDi*).

Further, the above path can include additional path elements to identify a specific folder on the device. These are different for every device model, but would look something like: ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\Store0\Pictures

关于wia - 相当于 WIA DeviceDlg 的 WPD,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/464965/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com