如何避免上下文菜单处理程序应用程序阻塞资源管理器?

发布于 2024-08-18 20:52:02 字数 270 浏览 2 评论 0原文

我创建了一个应用程序,可以通过从 IContextMenu 和 IShellExtInit 派生的上下文菜单来调用该应用程序。我注册了 DLL,当我右键单击时,应用程序就会被调用。

但是,问题是在我的应用程序结束之前,我无法访问该资源管理器中的任何其他文件。资源管理器被有效阻止,直到我的应用程序完成为止。

相同的行为并未反映在其他此类应用程序(如 WinZip、WinRar 等)中。

如何避免我的应用程序阻止资源管理器?

任何朝这个方向的指示都会非常有帮助。

I have created an application for which can be invoked through context menu by deriving from IContextMenu and IShellExtInit. I register the DLL and when I right click the application gets invoked.

But, the problem is till my application gets over, I cannot access any other file in that explorer. Explorer is effectively blocked till my application finishes.

The same behaviour is not reflected in other such applications like WinZip, WinRar etc.

How to avoid the my application from blocking the explorer?

Any pointers in that direction will be quite helpful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝咒 2024-08-25 20:52:02

我找到了解决方案。当资源管理器调用我的 DLL 时,我应该生成一个进程,以便我的进程可以单独继续,而资源管理器可以继续执行它,而不会阻塞我的逻辑。

感谢保罗·贝茨最初的建议。

I found the solution. I should spawn a process when explorer invokes my DLL so that my process can continue seperately while explorer can continue it's execution without getting blocked on my logic.

Thanks to Paul Betts for his initial advice.

作妖 2024-08-25 20:52:02

将调试器附加到资源管理器并在调用堆栈中查找包含您的 DLL 的线程,然后查看它被阻止的原因

Attach the debugger to Explorer and look for a thread that has your DLL in the call stack, then see what it's blocked on

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文