Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - "Activation Context" exception
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

"Activation Context" exception

 Post Reply Post Reply
Author
Message
mzolotar View Drop Down
Newbie
Newbie


Joined: 20 November 2008
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote mzolotar Quote  Post ReplyReply Direct Link To This Post Topic: "Activation Context" exception
    Posted: 20 January 2009 at 2:01am
Using 12.0.2
Occasionally we get the "the activation context being deactivated is not active for the current thread of execution" message box.

It is not caused by a CodeJock bug - it is our application code, which throws and does not always catch an exception.  There is a number of places in Toolkit code, where a hook calls our application's code and, if it throws, the correct order of ActivationContext deactivation is not followed.

< ="Content-" content="text/; charset=utf-8">< name="ProgId" content="Word.">< name="Generator" content="Microsoft Word 12">< name="Originator" content="Microsoft Word 12"><>

CXTPSkinManagerApiHook::OnHookCallWindowProcW(...)

is one of the places.


To identify the actual cause, we have modified a number of places in CodeJock source, by adding try/catch around the line of code where a hook calls our application code. This has been proven a very useful technic and helped us greately in location the actual troublemaker in our app's code.

The problem is that with each new version of CodeJock we have to modify the code to introduce the same changes again.

I believe it would be extremely helpful if try/catch were made part of the Toolkit code, added to where a hook calls the application code, conditional to some #ifdef. Inside the catch(...) a trace could be added, or just a plain message box.

Thoughts? Opinions? Are we the only ones who ended up doing something like that?


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.