问题:
在Win7下编译的程序在XP上无法运行,或者在xp下编译的程序在vista、win7下无法运行。
错误异常
0xC015000F: 正被停用的激活上下文不是最近激活的。
0xC015000F: The activation context being deactivated is not the most recently activated one.
在Win7下编译的程序在XP上无法运行,或者在xp下编译的程序在vista、win7下无法运行。
错误异常
0xC015000F: 正被停用的激活上下文不是最近激活的。
0xC015000F: The activation context being deactivated is not the most recently activated one.
解决方法:
CWinAppEx::InitInstance();
afxAmbientActCtx = FALSE;
afxAmbientActCtx = FALSE;
或:
CWinApp::InitInstance();
afxAmbientActCtx = FALSE;
afxAmbientActCtx = FALSE;
按理说禁用Activation Context不是标准的作法,但这样做确实能解决问题。没有更好的办法之前,这样用一下也无妨。