后台进程中的第三方windows dll确实使用MessageBox [英] third party windows dll in a background process does use MessageBox

查看:63
本文介绍了后台进程中的第三方windows dll确实使用MessageBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在后台进程中使用第三方windows-dll(没有GUI,没有用户干预)。



这个dll确实通过使用MessageBox显示了严重的内部错误,这对我的后台进程来说当然是致命的。



我唯一的丑陋想法是在一个特殊的线程中运行dll并在一定的超时后没有终止时终止它...但我害怕来自杀死一个线程时的副作用。



有没有人知道更好的解决方案?

为什么这个问题很难被投票?



提前谢谢。

布鲁诺

I have to use a third party windows- dll in a background process (no GUI, no user interventions).

This dll does show critical internal error by the use of MessageBox, which of course is "fatal" for my background process.

My only ugly idea is to run the dll in a special thread and kill it when it is not terminated after a certain timeout...but I'm afraid from side effects when killing a thread.

Does anyone know a better solution?
And why this question is so bad to get down voted?

Thank you in advance.
Bruno

推荐答案

我无法相信!如果dll有一些GUI消息,它真的不应该在后台运行。这是一个有问题的设计,导致黑客和问题。 :mad:



在最小化或隐藏窗口中使用dll。



它可能很有趣< a href =http://msdn.microsoft.com/en-us/library/ms173179.aspx>线程同步。
I cant believe it! If the dll has some GUI-messaging it really shouldnt run in the background. It is a problematic design which leads to hacks and problems. :mad:

Use the dll in a minimized or hidden Window.

It may be interesting Thread Synchronization.


这篇关于后台进程中的第三方windows dll确实使用MessageBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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