c# - Debug Assertion Failed on \$InstallDir\VC\atlmfc\src\mfc\olelock.cpp line 62 on MFC programming -



c# - Debug Assertion Failed on \$InstallDir\VC\atlmfc\src\mfc\olelock.cpp line 62 on MFC programming -

i have phone call sample mfc view in c# application, using visual studio 2012. utilize c++/cli project , phone call c++ class c#. have utilize line of code

afx_manage_state(afxgetstaticmodulestate());

this phone call resource handle of mfc dll resource instead of default resource (exe file on c#). mfc view runs ok, appears exception (as c message box):

debug assertion failed on \$installdir\vc\atlmfc\src\mfc\olelock.cpp line 62

here source code checked on install dir:

void afxapi afxoleunlockapp() { afx_module_state* pmodulestate = afxgetmodulestate(); assert(pmodulestate->m_nobjectcount != 0); if (interlockeddecrement(&pmodulestate->m_nobjectcount) == 0) { // allow application shut downwards when objects have // been released ::afxoleonreleaseallobjects(); } }

how can avoid assertion? give thanks support.

this assertion says called afxoleunlockapp more afxolelockapp called.

set breakpoints specific functions. check calls lock/unlock. there objects freed more once...

c# c wpf mfc

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -