Access violation in MFC dll (loadlibrary) loaded in C++/CLI Wrapper
I'm loading a MFC dll to my CLI wrapper with
HINSTANCE m_keyManagerLib;
m_keyManagerLib = LoadLib开发者_JS百科rary("dll");
in destr:
FreeLibrary(m_keyManagerLib);
When I load the dll again I get some access violation errors:
First-chance exception at 0x76fdc518 in TestKeyManagerApp.exe: 0xC0000005: Access violation reading location 0xfffffff8.
First-chance exception at 0x75219673 in TestKeyManagerApp.exe: Microsoft C++ exception: CMemoryException at memory location 0x0030e1cc..
'TestKeyManagerApp.exe': Unloaded 'C:\projects\KeyManagerServer\TestKeyManagerApp\bin\Debug\dll\KeyManagerServerD.dll'
additional infos:
- load the CLI wrapper into C# program and started there
- MFC dll
- Use MFC in a Shared DLL
referenced to: Access violation in MFC dll (wrapped in C++/CLI) started from C# program
Thank you in advance for your help!
greets leon22
精彩评论