Print Page | Close Window

VC++ wth ActiveX and DetachDispatch

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=5189
Printed Date: 22 November 2024 at 7:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: VC++ wth ActiveX and DetachDispatch
Posted By: jfstephe
Subject: VC++ wth ActiveX and DetachDispatch
Date Posted: 02 October 2006 at 12:15pm
First off I think the implied (and explicit at times) scope of the activex forum is too narrow.
The 'general' ActiveX section mentions VB - activex can be used in anything - what about VC++ - I know you've got MFC but MFC and COM are different kettles of fish.
 
Anywho, the main reason for this post is to say that if you use events, in a VC++ project with activex, and the handlers take lpdispatch parameters make sure you DetachDispatch() the parameter item (taskpanelGroupItem for example) before you exit the function else you will at some time finish with an access violation.
 
Problem and solution in one :-).



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