Click here to Skip to main content
15,913,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: UnmanagedToManaged Bridge called from unmanaged DLL Pin
Mark Salsbery15-Dec-06 5:05
Mark Salsbery15-Dec-06 5:05 
GeneralRe: UnmanagedToManaged Bridge called from unmanaged DLL Pin
Jose Viveiros15-Dec-06 5:18
Jose Viveiros15-Dec-06 5:18 
GeneralRe: UnmanagedToManaged Bridge called from unmanaged DLL Pin
Jose Viveiros15-Dec-06 5:24
Jose Viveiros15-Dec-06 5:24 
GeneralRe: UnmanagedToManaged Bridge called from unmanaged DLL Pin
Mark Salsbery15-Dec-06 6:05
Mark Salsbery15-Dec-06 6:05 
GeneralRe: UnmanagedToManaged Bridge called from unmanaged DLL Pin
Jose Viveiros15-Dec-06 6:21
Jose Viveiros15-Dec-06 6:21 
GeneralRe: UnmanagedToManaged Bridge called from unmanaged DLL Pin
Mark Salsbery15-Dec-06 6:33
Mark Salsbery15-Dec-06 6:33 
GeneralRe: UnmanagedToManaged Bridge called from unmanaged DLL Pin
Jose Viveiros15-Dec-06 6:48
Jose Viveiros15-Dec-06 6:48 
GeneralRe: UnmanagedToManaged Bridge called from unmanaged DLL Pin
Mark Salsbery15-Dec-06 7:41
Mark Salsbery15-Dec-06 7:41 
Jose Viveiros wrote:
I link in the Bridge.lib and include bridge.h. Is this a problem?


Hmm no, it shouldn't be. Calling LoadLibrary from DllMain is a problem - that's why I asked.

1) works:
Unmanaged App -> UnMng2Mng Bridge -> Assembly DLL
2) works:
Unmanaged App -> Unmanaged Dll
3) DoesNot works:
Unmanaged App -> Unmanaged Dll -> UnMng2Mng Bridge -> Assembly DLL

So using method 1 above, you linked using Bridge.lib, correct? If that worked then I would
expect method 3 to work.

Are you doing anything with entry code in your DLLs (DllMain)??

I had problems once with mixed MFC and managed/unmanaged DLLs and found the following article to
be helpful. Although the topic of the article doesn't match the problem, the "Resolution" section
has great info on how to initialize the C runtime (CRT) if you're using it in your DLLs...
You receive linker warnings when you build Managed Extensions for C++ DLL projects[^]

This article has interesting info as well, although it probably doesn't apply to the problem you
are having: Mixed DLL Loading Problem[^]
GeneralRe: UnmanagedToManaged Bridge called from unmanaged DLL Pin
Jose Viveiros15-Dec-06 8:36
Jose Viveiros15-Dec-06 8:36 
QuestionMemory management Pin
BlitzPackage14-Dec-06 7:54
BlitzPackage14-Dec-06 7:54 
AnswerRe: Memory management Pin
Maximilien14-Dec-06 8:12
Maximilien14-Dec-06 8:12 
GeneralRe: Memory management Pin
BlitzPackage14-Dec-06 8:15
BlitzPackage14-Dec-06 8:15 
GeneralRe: Memory management Pin
peterchen14-Dec-06 13:11
peterchen14-Dec-06 13:11 
GeneralRe: Memory management Pin
peterchen14-Dec-06 13:12
peterchen14-Dec-06 13:12 
GeneralRe: Memory management Pin
BlitzPackage14-Dec-06 13:31
BlitzPackage14-Dec-06 13:31 
GeneralRe: Memory management Pin
peterchen14-Dec-06 14:31
peterchen14-Dec-06 14:31 
GeneralRe: Memory management Pin
Maximilien14-Dec-06 14:15
Maximilien14-Dec-06 14:15 
QuestionMFC printing Pin
Milos Djokovic14-Dec-06 6:29
Milos Djokovic14-Dec-06 6:29 
QuestionHow i can create Toolbar in my application?? Pin
Shah Satish14-Dec-06 4:36
Shah Satish14-Dec-06 4:36 
AnswerRe: How i can create Toolbar in my application?? Pin
Mark Salsbery14-Dec-06 6:15
Mark Salsbery14-Dec-06 6:15 
AnswerRe: How i can create Toolbar in my application?? Pin
Hamid_RT14-Dec-06 18:18
Hamid_RT14-Dec-06 18:18 
QuestionChanging Network property programmatically in C++ [modified] Pin
IlyaCher14-Dec-06 4:27
IlyaCher14-Dec-06 4:27 
QuestionError Pin
Alex_Y14-Dec-06 4:24
Alex_Y14-Dec-06 4:24 
AnswerRe: Error Pin
Alex_Y14-Dec-06 5:28
Alex_Y14-Dec-06 5:28 
GeneralRe: Error Pin
toxcct14-Dec-06 6:20
toxcct14-Dec-06 6:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.