mfc >> Problem loading and unloading dynamically a extension dll (MFC 7.0)

by Leandro Becker » Wed, 26 Nov 2003 22:58:50 GMT

Hi

I'm using a extension dll in a MFC exe dinamically.
This is causing problems with deserialization of objects !

HMODULE h = AfxLoadLibrary(_T("my.dll"));
// uses it
AfxFreeLibrary(h);

After this point, the m_pModuleState->m_classList of the exe CWinApp object
is NULL and all CRuntimeClass information are lost !

Someone have a tip ?

--
Leandro Gustavo Biss Becker
http://go.to/leandrobecker




mfc >> Problem loading and unloading dynamically a extension dll (MFC 7.0)

by Dave Harris » Thu, 27 Nov 2003 00:21:44 GMT


"Leandro Becker" < XXXX@XXXXX.COM > wrote (abridged):

Try:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=eaqB3H1IDHA.2240 %40TK2MSFTNGP11.phx.gbl&rnum=1&prev=/groups%3Fselm%3DeaqB3H1IDHA.2240%2540TK2MSFTNGP11.phx.gbl

-- Dave Harris





mfc >> Problem loading and unloading dynamically a extension dll (MFC 7.0)

by Leandro Becker » Thu, 27 Nov 2003 04:27:28 GMT

Thank you, I've done an earlier workaround but this is better.



http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=eaqB3H1IDHA.2240 %40TK2MSFTNGP11.phx.gbl&rnum=1&prev=/groups%3Fselm%3DeaqB3H1IDHA.2240%2540TK2MSFTNGP11.phx.gbl




Similar Threads

1. Dynamically Loading/Unloading extension DLLs (MFC) - VC 2003 causes application loss of CRuntime classes

2. Help loading view dynamically from an Extension DLL.

3. Strange MFC Extension DLL Loading Behavior

4. Delay load an MFC extension dll

I have an MFC application with many mfc extension dlls.  I would like to 
delay load some of the nonessential dlls.  

Is this possible?  

5. Unloading a dynamically loaded assembly - CSharp/C#

6. unloading dynamically loaded libraries

7. problem loading regular MFC dll written in VC++7 but loading from

8. Problem in using a MFC Dll(VC 6.0) in ATL (VC 7.0)

hi all ,
  i am trying to use a mfc dll(VC6.0) in my atl (VC 7.0) project ..
mfc dll contains many classes , now some r working fine , but some functions 
in some classes are causing problems ..
like see this one function  which is causing problem .
DllExport const CEventStatusStringArray& operator=(const 
CEventStatusStringArray& rhs);
n error is :
DM error LNK2001: unresolved external symbol "public: class 
CEventStatusStringArray const & __thiscall 
CEventStatusStringArray::operator=(class CEventStatusStringArray const &)" 
(??4CEventStatusStringArray@@QAEABV0@ABV0@@Z)

pls help 

-- 
amit bharadwaj
VC++(ATL,MFC) developer