混合DLL加载问题-将VC 6.0 DLL转换为VS 2008 [英] Mixed DLL Loading problem - Converting VC 6.0 DLL into VS 2008
问题描述
大家好,
有人可以帮助我解决我的问题吗?
我面临混合DLL加载问题. My Parent程序已成功从VC 6.0转换为VS 2008,/clr(混合模式).但是,我的安全DLL项目(VC 6.0 MFC扩展DLL)面临问题.登录ID和我从Security_DLL获得的密码对话框.然后关注其他与安全性相关的功能.
虽然,Security_DLL成功转换了&使用/clr从VC 6.0编译到VC 9.0(带有警告C4747),从父程序调用时,它会引发Loader Lock错误.
我已经尝试了以下补救措施:
1).在所有#include之后将 #pragma unmanaged 应用于DLL中的每个文件. (警告C4747与此选项一起消失)
2).将DllMain()注释为DLL
3).但是,在将/NOENTRY切换到DLL的项目属性时得到了一个惊人的解决方案
4).连同/NOENTRY 开关&将 #pragma非托管选项应用于DLL,我可以启动调试并运行我的主父程序,但是登录ID&然后没有显示来自Security_DLL的密码对话框.在调试此类行为时,意识到在FindResource()期间DlgCore.cpp MFC文件中的CDialog :: DoModal()失败了.
如何使用/clr选项&将DLL从VC 6.0转换为VS 2008.加载到我的父母编中.现在哪个处于混合模式?
预先非常感谢!!!
Hi Everybody,
Can anybody pls help me for my problem.
I m facing a Mixed DLL Loading problem. My Parent program has successfully been converted from VC 6.0 to VS 2008, /clr (Mixed mode). However, facing problem for my security DLL project, which was VC 6.0 MFC Extension DLL. Login ID & Password dialog I got from Security_DLL. And then following to other security related functions.
Although, Security_DLL successfully convert & compiled from VC 6.0 to VC 9.0 with /clr (with warning C4747), it is raising Loader Lock error, while calling from my parent program.
I already tried following remedies:
1). Applying #pragma unmanaged after all #include to every file into DLL. (warning C4747 vanish with this option)
2). Commenting DllMain() into DLL
3). However, got an astonishing solution while giving /NOENTRY switch into project properties of DLL
4). Along with /NOENTRY switch & #pragma unmanaged option applied into DLL, I could start debug and run my main parent program, but Login ID & Password dialog which was coming from Security_DLL, was then didn’t displaying. While debugging for such behavior, realized that CDialog::DoModal() in DlgCore.cpp MFC file failed during FindResource()
How could I convert DLL from VC 6.0 to VS 2008, with /clr option, & load into my parent prog. Which is now in Mixed mode ?
Many thanks in advance !!!
推荐答案
混合MFC版本实在是地狱.使用静态链接或更改代码.
Mixing MFC versions is hell on earth. Use static linking or change the code.
这篇关于混合DLL加载问题-将VC 6.0 DLL转换为VS 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!