<?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 : using skinframe in DLL, crash when exits</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : using skinframe in DLL, crash when exits]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 20:39:45 +0000</pubDate>
  <lastBuildDate>Fri, 17 Jul 2009 17:41:06 +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=12732</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[using skinframe in DLL, crash when exits : I had this exact same problem.The...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=51068&amp;title=using-skinframe-in-dll-crash-when-exits#51068</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 12732<br /><strong>Posted:</strong> 17 July 2009 at 5:41pm<br /><br />I had this exact same problem.&nbsp;The problem is that CJ is grabbing and storing the module state data pointer and accessing it after your ocx (dll) unloads. I debugged this some time ago (june last year) and I put this comment in my code:<DIV>&nbsp;</DIV><DIV><FONT color=#008000 size=2><FONT color=#008000 size=2><P>CodeJock is loading an image file. When that happens CJ creates some CCmdTarget object</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// and that object grabs and stores the module state data pointer. Later when unloading, the CJ object accesses it. The issue</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// is that the list control DLL can unload before the CJ (toolkitpro) DLL.</P><DIV><FONT color=#000000>It appears to me that CJ thinks it is grabbing its own module state data. There is no reason I know of for CJ to store your (or my) OCX module state data. To avoid the crash in my app, I had to swap out my OCX module state data with that of my application since it is one of the last modules to unload.</FONT></DIV></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Fri, 17 Jul 2009 17:41:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=51068&amp;title=using-skinframe-in-dll-crash-when-exits#51068</guid>
  </item> 
  <item>
   <title><![CDATA[using skinframe in DLL, crash when exits : Hi,  Such things need to debug...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=44277&amp;title=using-skinframe-in-dll-crash-when-exits#44277</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12732<br /><strong>Posted:</strong> 07 January 2009 at 3:02pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Such things need to debug :( Please try reproduce it again .</DIV>]]>
   </description>
   <pubDate>Wed, 07 Jan 2009 15:02:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=44277&amp;title=using-skinframe-in-dll-crash-when-exits#44277</guid>
  </item> 
  <item>
   <title><![CDATA[using skinframe in DLL, crash when exits : The crash happens after the OCX...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=44196&amp;title=using-skinframe-in-dll-crash-when-exits#44196</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 12732<br /><strong>Posted:</strong> 06 January 2009 at 8:38am<br /><br />The crash happens after the OCX has unloaded. It's so weird!<DIV>&nbsp;</DIV><DIV>I've tried to make a sample project where this would happen, but it doesn't. Here's the structure:</DIV><DIV>&nbsp;</DIV><DIV>EXE initializes OCX. Then a member function is called where a dialog is shown (the OCX is dependent on ToolkitPro). In this dialog we run the code above, displaying a menu. As soon as this menu has been shown (nothing more), we get a crash when we press "Cancel" in this dialog (effectively exiting the application).</DIV><DIV>&nbsp;</DIV><DIV>It's crazy. But if we use a normal menu, the problem goes away.</DIV>]]>
   </description>
   <pubDate>Tue, 06 Jan 2009 08:38:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=44196&amp;title=using-skinframe-in-dll-crash-when-exits#44196</guid>
  </item> 
  <item>
   <title><![CDATA[using skinframe in DLL, crash when exits : Hi, Looks like right core. What...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=44174&amp;title=using-skinframe-in-dll-crash-when-exits#44174</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12732<br /><strong>Posted:</strong> 06 January 2009 at 1:45am<br /><br />Hi,<DIV>Looks like right core. What lines give crush ?</DIV>]]>
   </description>
   <pubDate>Tue, 06 Jan 2009 01:45:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=44174&amp;title=using-skinframe-in-dll-crash-when-exits#44174</guid>
  </item> 
  <item>
   <title><![CDATA[using skinframe in DLL, crash when exits : I&amp;#039;m encountering a similar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=44132&amp;title=using-skinframe-in-dll-crash-when-exits#44132</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 12732<br /><strong>Posted:</strong> 05 January 2009 at 6:52am<br /><br />I'm encountering a similar problem, but with no skinning at all. Is there a similar principle for commandbars and menus?<DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>We get the crash after this code has been executed:</DIV><DIV>&nbsp;</DIV><DIV>CXTPCommandBars* pCommandBars = (CXTPCommandBars*)CXTPCommandBars::CreateObject();</DIV><DIV>if (pCommandBars)</DIV><DIV>{</DIV><DIV>&nbsp;&nbsp;&nbsp; pCommandBars-&gt;SetSite(this);</DIV><DIV>&nbsp;&nbsp;&nbsp; CXTPPopupBar *pPopupBar = CXTPPopupBar::CreatePopupBar(pCommandBars);</DIV><DIV>&nbsp;&nbsp;&nbsp; CXTPControlButton *pButton = (CXTPControlButton*)pPopupBar-&gt;GetControls()-&gt;Add(xtpControlButton, 1000);</DIV><DIV>&nbsp;&nbsp;&nbsp; pButton-&gt;SetCaption("Test");</DIV><DIV>&nbsp;&nbsp;&nbsp; pCommandBars-&gt;TrackPopupMenu(pPopupBar, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_VERTICAL, point.x, point.y, this);</DIV><DIV>&nbsp;&nbsp;&nbsp; pPopupBar-&gt;InternalRelease();</DIV><DIV>&nbsp;&nbsp;&nbsp; pCommandBars-&gt;InternalRelease();</DIV><DIV>}</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 05 Jan 2009 06:52:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=44132&amp;title=using-skinframe-in-dll-crash-when-exits#44132</guid>
  </item> 
  <item>
   <title><![CDATA[using skinframe in DLL, crash when exits : Hello,  Remove all objects in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=43001&amp;title=using-skinframe-in-dll-crash-when-exits#43001</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12732<br /><strong>Posted:</strong> 20 November 2008 at 2:01am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>Remove all objects in ExitInstance of your dll:</DIV><DIV>&nbsp;</DIV><DIV>XTPSkinManager()-&gt;LoadSkin(NULL, NULL);</DIV><DIV>XTPSkinManager()-&gt;RemoveAll();</DIV>]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 02:01:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=43001&amp;title=using-skinframe-in-dll-crash-when-exits#43001</guid>
  </item> 
  <item>
   <title><![CDATA[using skinframe in DLL, crash when exits : Hi,  I want to use skinframe...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=42993&amp;title=using-skinframe-in-dll-crash-when-exits#42993</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4430">lyonwhl</a><br /><strong>Subject:</strong> 12732<br /><strong>Posted:</strong> 19 November 2008 at 8:28pm<br /><br />Hi,<DIV>&nbsp;&nbsp; I want to use skinframe to decorate my own dialog in regular MFC DLL. Everything is ok in runtime&nbsp;. But when the main application exits, it crashes. The error happends in the file "afxwinl.inl" ,line 37 "{ &nbsp;return afxAmbientActCtx; }", and the tip is "0x0000005 clashing happens&nbsp;when reading 0x1003c770". </DIV><DIV>&nbsp;&nbsp; On&nbsp;the other hand, if the main application call the own dialog directly, there is no problem.</DIV><DIV>&nbsp;&nbsp; By the way, if the main application use my own dialog firstly and DLL use it later, no error happens. </DIV><DIV>&nbsp;&nbsp; I&nbsp; appreciate any help.</DIV>]]>
   </description>
   <pubDate>Wed, 19 Nov 2008 20:28:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12732&amp;PID=42993&amp;title=using-skinframe-in-dll-crash-when-exits#42993</guid>
  </item> 
 </channel>
</rss>