DragDropHandlers IShellExtInit::Initialize 和 NETHOOD UNC 路径
我在 HKCR\Folder\shellex\DragDropHandlers 下注册了一个 shell 扩展,我需要在目标文件夹上调用 GetVolumePathName()+GetVolumeInformation() (PIDL 在 IShellExtInit::Initialize)
问题是,当将某些内容放在“Nethood 快捷方式”(My Network Places\sharename
)上时,传递给 Initialize 的 PIDL 会引用Nethood 快捷方式而不是 UNC 路径! (在 PIDL 上调用 SHGetPathFromIDList 返回 "%USERPROFILE%\NetHood\SHARE on MACHINE"
而不是像您期望的那样 "\\MACHINE\SHARE"
)
我也尝试创建PIDL 的 IShellItem 并使用各种 SIGDN 值调用 IShellItem::GetDisplayName,但它们都不返回 UNC 路径。
如何从该 PIDL 获取 UNC 路径?
I have a shell extension registered under HKCR\Folder\shellex\DragDropHandlers and I need to call GetVolumePathName()+GetVolumeInformation() on the target folder (PIDL passed to you in IShellExtInit::Initialize)
The problem is that when something is dropped on a "Nethood shortcut" (My Network Places\sharename
) the PIDL passed to Initialize refers to the Nethood shortcut and not the UNC path! (Calling SHGetPathFromIDList on the PIDL returns "%USERPROFILE%\NetHood\SHARE on MACHINE"
and not "\\MACHINE\SHARE"
like you would expect)
I also tried creating a IShellItem of the PIDL and calling IShellItem::GetDisplayName with various SIGDN values but none of them return the UNC path.
How can I get the UNC path from this PIDL?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)