在DLL中使用shellexecuteex [英] Using shellexecuteex in a DLL

查看:80
本文介绍了在DLL中使用shellexecuteex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在dll中调用sdbinst.exe程序。当我将程序编译为exe时,sdbinst.exe可以正常启动。但是当我将其编译为dll时,sdbinst.exe程序将会死锁。 exe或dll他们调用sdbinst.exe的代码是完全一样的。死锁代码是ShellExecuteEx。我使用OD来跟随ShellExecuteEx,然后在DLL中使用将在USER32.MsgWaitForMultipleObjects中死锁,我不知道这是什么原因造成的。希望可以有人帮帮我。谢谢!



我尝试了什么:



我试过用过其他API而不是 ShellExecuteEx ,但在这种情况下程序将无法正常工作

解决方案

查看有关的各种警告 ShellExecuteEx函数(Windows) [< a href =https://msdn.microsoft.com/en-us/library/windows/desktop/bb762154(v=vs.85).aspx\"target =_ blanktitle =New Window> ^ ]。

I want to call the sdbinst.exe program in the dll. When I compile the program to an exe, sdbinst.exe can start normally. But when I compile it as dll, the sdbinst.exe program will deadlock. Exe or dll they call sdbinst.exe the code is exactly the same. The deadlock code is ShellExecuteEx. I used OD to follow ShellExecuteEx, then used in the dll will deadlock in USER32.MsgWaitForMultipleObjects, I do not know this is What causes it. Hope someone can help me. Thanks!

What I have tried:

I have tried using other APIs instead of ShellExecuteEx, but in that case the program will not work

解决方案

See the various warnings about deadlocks at ShellExecuteEx function (Windows)[^].


这篇关于在DLL中使用shellexecuteex的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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