Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more:
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 !!!
Posted
Updated 18-Feb-11 20:23pm
v2
Comments
Ryan Zahra 18-Feb-11 9:57am    
Do you really need to convert the dll from vc 6 to vs 2008?
What I mean is that you could still use the dll from vs 2008 :)
Albert Holguin 29-Mar-11 19:29pm    
if i remember correctly, there's a bug with loading a vc6 dll dynamically... it doesn't work... only static binding works
ab4rum 18-Feb-11 10:21am    
Thanks Ryan. Yes you are correct. But i already have a bit huge code that has already been developed into VC 6 DLL. By converting, what i expecting to avoiding re-inventing the wheel, and more specifically the time & effort.
Albert Holguin 29-Mar-11 19:32pm    
what's the actual error that you're getting?

1 solution

Mixing MFC versions is hell on earth. Use static linking or change the code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900