Losing reference between dlls
Hi guys. I've got a weird situation that I don't know how to handle. You see, I'm using a few dinamically linked libraries and I don't know why but the memory reference for a variable in another dll was lost. And it caused an unhandled exception. To illustrate my problem, I'll try to write a short version of it.
Consider I have this class in my main program (MyApp.exe):
When I debugged it and traced it inside the MyApp::create(), I found that mMyDll1 was initialized correctly. But when I traced into MyDll::create(), I found out that the this pointer of gMyDll1 object was null (thus the exception). How can this possible? I'm quite sure that the mMyDll1 wasn't deleted.
gMyDll1 = new MyDll();
gMyDll1->create(); //exception here. it calls the methods that is defined inside a dll called MyDll.dll
Can anybody help me here? Thanks a lot in advance.