Print Page | Close Window

"Activation Context" exception

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=13210
Printed Date: 28 September 2024 at 7:36pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: "Activation Context" exception
Posted By: mzolotar
Subject: "Activation Context" exception
Date 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?





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net