DoModal() 问题,Windows XP 与 Windows 7
我有一个桌面应用程序,它已经在 Windows XP 下运行了 10 多年。当在 Windows 7 下运行时,同一个 .exe 会在执行 DoModal() 调用时终止。现在Windows 7的这个称呼有什么不同吗? DoModal() 永远不会返回,所以我无法测试返回代码。
I have a desktop application which is has been running for over 10 years under Windows XP. The same .exe, when run under Windows 7, dies when the DoModal() call is executed. Is there something different in this call now is Windows 7? DoModal() never returns, so I can't test the return code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来这个问题已经快两年没有得到解答了。
我也遇到了同样的问题。我最终发现,通过减少项目设置(链接器:系统)中的堆栈保留大小和堆栈提交大小设置,我能够让 doModal 在 windows-7 下工作。
我的初始设置分别是 512 MB 和 256 MB。我将它们减少到 64 MB 和 32 MB,这使得应用程序开始运行。
It appears that this problem has not been answered for nearly two years.
I had the very same problem. I finally discovered that by reducing the Stack Reserve size and Stack Commit size settings in my project settings (linker:system) I was able to get doModal to work under windows-7.
My initial settings were 512 MB and 256 MB respectively. I reduced them to 64 MB and 32 MB and that made the app start working.