由于dll,InnoSetup在安装后挂起 [英] InnoSetup hangs after install due to dll

查看:79
本文介绍了由于dll,InnoSetup在安装后挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在InnoSetup向导中使用自定义DLL.
一切正常.

I am using a custom DLL inside an InnoSetup wizard.
All works well.

除AFTER安装成功完成外,主GUI窗口 关闭(按预期方式),但图标保留在任务栏中.
(安装过程仍然存在,可以很容易地从任务管理器中删除)

Except that AFTER install completes successfully, the main GUI windows closes (as expected) but the icon remains in the task bar.
(the install process still exists and can be easily killed from the task-manager)

我认为DLL留下了一些未发布的资源或引用,以及InnoSetup 最终代码正在等待中. 有关IS正在等待的特定资源的任何提示吗?

I presume the DLL is leaving some unreleased resource or reference, and the InnoSetup finalizing code is waiting on it. Any hints on specific resources that the IS is waiting on ?

谢谢

推荐答案

在进行大量调试和拔发之后,出现死锁的是Delphi单元的最终代码.

After significant debugging and hair-pulling, the deadlock occurs is Delphi unit finalization code.

如果线程在完成代码中启动/终止,则在innosetup时有效的代码将挂起 尝试释放该dll.

If threads are started/terminated in the finalization code, valid-looking code will hang when innosetup tries to release the dll.

我知道DLL_THREAD_ATTACH例程是由Windows序列化的,因此这可能是问题所在. Innosetup本身是用delphi编写的,并且可以通过一个简单的dephi程序进行复制,该程序将调用delphi DLL,该程序将调用delphi DLL,该DLL将单元终止程序中的终止代码线程化

I know the DLL_THREAD_ATTACH routines are serialized by windows, so this is probably the problem. Innosetup itself is written in delp and this can be reproduced by a simple dephi program, which calls a delphi DLL, which calls a delphi DLL which thread termination code in a unit finalization routine

希望这对以后的人有帮助

Hope this helps someone in the future

这篇关于由于dll,InnoSetup在安装后挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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