开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜