<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : CXTPResourceImage crashes application</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : CXTPResourceImage crashes application]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 12 May 2026 23:11:40 +0000</pubDate>
  <lastBuildDate>Tue, 27 May 2014 09:12:58 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=19512</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[CXTPResourceImage crashes application : I was asked how I solved this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19512&amp;PID=72514&amp;title=cxtpresourceimage-crashes-application#72514</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 19512<br /><strong>Posted:</strong> 27 May 2014 at 9:12am<br /><br />I was asked how I solved this problem. I locked and loaded our active X DLLs into the process. I don't unload them until our main DLL unloads from the process.<br>]]>
   </description>
   <pubDate>Tue, 27 May 2014 09:12:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19512&amp;PID=72514&amp;title=cxtpresourceimage-crashes-application#72514</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPResourceImage crashes application : We have a number of MFC modules...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19512&amp;PID=67654&amp;title=cxtpresourceimage-crashes-application#67654</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 19512<br /><strong>Posted:</strong> 21 February 2012 at 11:39am<br /><br />We have a number of MFC modules loaded into our app. Some of these are for active x controls and these DLLs can get unloaded at any time (say when the last object served by the DLL is released).<DIV>&nbsp;</DIV><DIV>I have found that the <FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P>CXTPToolTipContext::</FONT></FONT>DrawBackground method does this:<FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas></P></DIV><P>CXTPResourceImage* pImage = pImages-&gt;LoadFile(_T(</FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"TOOLTIPFRAME"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>));</P><DIV></DIV><DIV>If the first tooltip to display comes from one of our ActiveX controls, the resource image CodeJock creates grabs and stores the module state data pointer of the ActiveX control. That would be fine except that the CXTPResourceImages (the pImages in the above call) is stored in static data in CodeJock. Once loaded, the image remains loaded. Later when we are shutting down and the command bars object (ribbon bar in the frame) is destroyed, the CodeJock code removes all the images. But this is occuring during shutdown and this is the frame so many of the DLLs loaded by the OS have already been unloaded. The result is that the image for the "TOOLTIPFRAME", which has stored a module state data pointer that is no longer in the process crashes the application.</DIV><DIV>&nbsp;</DIV><DIV>Since CodeJock is loading its own image and storing it in static data until the frame is destroyed, should CodeJock not make sure it is the CodeJock (or&nbsp;the application's)&nbsp;module state data pointer being stored in the resource image object?</DIV></FONT></FONT>]]>
   </description>
   <pubDate>Tue, 21 Feb 2012 11:39:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19512&amp;PID=67654&amp;title=cxtpresourceimage-crashes-application#67654</guid>
  </item> 
 </channel>
</rss>