"0XC015000F activation context that is being deactivated is not recently activated" error resolution

Source: Internet
Author: User
Tags win32

Program in Windows XP and Windows7 32 system run well, today installed a Windows7 64-bit system (note, the program itself or 32-bit developed), the runtime appears "0XC015000F is being deactivated activation context is not recently activated" this error, After looking for a long time to solve, the following summary is as follows:

There are more methods on the web that use Afxambientactctx = FALSE after calling cwinapp::initinstance (); I do not have this problem when I adopt this method. However, there are some code in my program because the variable is set to False, resulting in no execution, so there are other problems, so give up the method.

The way I do this is to throw all the MFC exceptions in Debug and not allow MFC to handle the exception, so that it does not cause crash, as follows: In VS2008, the "Debug" menu-> "exceptions"-> "Win32 exceptions", Then throw these exceptions all on the check. But that should also throw out other exceptions, such as memory crossing the line. Your code is best measured on other machines to handle these anomalies.


When I make a mistake, it's like this:

This should be "Strrecord.format" ("%04d-%02d-%02d%02d:%02d:%02d%s", Systime.wyear, Systime.wmonth, Systime.wday, SysTime.wHour, Systime.wminute, Systime.wsecond, pstatus); ”


Accidentally written "Strrecord.format ("%s ", Systime.wyear, Systime.wmonth, Systime.wday, Systime.whour, Systime.wminute, Systime.wsecond, pstatus); ”


This prompts the above error.


The error of seeing someone on the internet is as follows:

scanf ("%d,%d,&a,&b")
Change into
scanf ("%d,%d", &a,&b)

Namely: this should be scanf ("%d,%d", &a,&b) The result is written scanf ("%d,%d,&a,&b").


In VS2010, the Debug menu-> "Exceptions"-> "Win32 exceptions" selects all options, interrupts when executed, and then in the call stack, finds the first line of code from the top down, There should be a problem statement.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.