使用COleDropTarget拖动n Drop无法在提升模式下工作 [英] Drag n Drop not working on elevated mode with COleDropTarget

查看:77
本文介绍了使用COleDropTarget拖动n Drop无法在提升模式下工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在开发一个不支持在管理模式下拖放的应用程序。之前我使用的是COleDropTarget,但现在我已经移植了代码以使用窗口消息。但是现在无法确定是否允许使用
OnDragEnter处理的丢弃是另一个要求,因为在WM_DROPFILES之前没有生成消息(据我所知)。 


  ;

我已经按照这个  代码项目示例  作为参考
for COleDropTarget。


请帮忙。


提前致谢。


解决方案

作为安全措施Windows不允许从未升级的源拖放到提升的收件人。




您可以使用<修改UIPI消息阻止a href ="https://msdn.microsoft.com/en-us/library/windows/desktop/dd388202(v=vs.85).aspx">
ChangeWindowMessageFilterEx




参见
https://blogs.msdn.microsoft.com/patricka/2010/01/28/q-why-doesnt-drag-and-drop-work-when-my-application-is-running-elevated -a强制性完整性控制和 - UIPI /


Hi,

I am working on an application which doesn't support drag 'n' drop in admin mode. Earlier I was using COleDropTarget but now I have ported the code to use window messages. But another requirement to determine if drop should be allowed which was handled with OnDragEnter before is not possible now because no message is generated before WM_DROPFILES (as far as I know). 

 

I have followed this Code project example as a reference for COleDropTarget.

Please help.

Thanks in advance.

解决方案

As a security measure Windows does not permit drag and drop from an unelevated source to an elevated recipient.

You can modify UIPI message blocking with ChangeWindowMessageFilterEx


See https://blogs.msdn.microsoft.com/patricka/2010/01/28/q-why-doesnt-drag-and-drop-work-when-my-application-is-running-elevated-a-mandatory-integrity-control-and-uipi/


这篇关于使用COleDropTarget拖动n Drop无法在提升模式下工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆