<?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 : How do I shut down SkinManager</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : How do I shut down SkinManager]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 16:45:53 +0000</pubDate>
  <lastBuildDate>Tue, 05 Oct 2021 17:43:30 +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=24221</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[How do I shut down SkinManager : I am trying to use Skinning in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24221&amp;PID=78269&amp;title=how-do-i-shut-down-skinmanager#78269</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24221<br /><strong>Posted:</strong> 05 October 2021 at 5:43pm<br /><br /><div>I am trying to use Skinning in our app and am crashing while shutting down. When my frame window closes I call XTPShutdown. At that time, the ~CXTPSkinManager method gets called. During that call the ~XTP_SKINMANAGER_THREAD_STATE() function gets called but that is on another thread and not the thread on which I called XTPShutdown.</div><div><br></div><div>The call to shutdown returns and my application proceeds to complete its shutdown via common_exit. The loader is unloading DLLs and a call to AfxOleUnlockApp is made. That code asserts and that leads to a message box being displayed. I end up in CXTPSkinManager::CbtFilterHook. This is on the main thread and it is the only thread still running.</div><div><br></div><div>Nothing has set CXTPSkinManager::s_pInstance to nullptr. The manager appears to be a singleton and that is static instance data set when the manager is created. It is not set to null when the manager's destructor was called.</div><div><br></div><div>The result is in CbtFilterHook, this line crashes us:</div><div><br></div><div>pSkinManager-&gt;SetHook(hWnd, szClassName, lpcs, TRUE);</div><div><br></div><div>Shouldn't the manager destructor null out that static pointer?</div><div><br></div><div><br></div><div>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro2010vc160x64UD.dll!00007ffc79a24e68()&nbsp;&nbsp;&nbsp; C++<br>&gt;&nbsp;&nbsp;&nbsp; ToolkitPro2010vc160x64UD.dll!CXTPSkinManager::CbtFilterHook(int code, unsigned __int64 wParam, __int64 lParam) Line 819&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!DispatchHookW()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!__fnHkINLPCBTCREATESTRUCT()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; ntdll.dll!KiUserCallbackDispatcherContinue()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; win32u.dll!NtUserCreateWindowEx()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!VerNtUserCreateWindowEx()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!InternalCreateDialog()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!InternalDialogBox()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!SoftModalMessageBox()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!MessageBoxWorker(struct _MSGBOXDATA *)&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!MessageBoxTimeoutW()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!MessageBoxTimeoutA()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!MessageBoxA()&nbsp;&nbsp;&nbsp; Unknown<br>&nbsp;&nbsp;&nbsp;&nbsp; JUtilD.dll!DisplayMessageBox(const wchar_t * lpszSubSystem, HWND__ * hWnd, const char * szText, const char * szCaption, unsigned int uType) Line 509&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; JUtilD.dll!JThreadMessageBox(const wchar_t * lpszSubSystem, HWND__ * hWnd, const char * szText, const char * szCaption, unsigned int uType) Line 592&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; JUtilD.dll!HRfatalmessageEx(const wchar_t * lpszSubSystem, const char * msg, const char * title) Line 263&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; JUtilD.dll!HRassertMessage(const wchar_t * lpszSubSystem, unsigned long level, const char * lpszMessage, const char * lpszTitle) Line 327&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; JUtilD.dll!HRCrtDbgReport(int reportType, char * lpszMessage, int * retVal) Line 476&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ucrtbased.dll!_VCrtDbgReportA(int nRptType, void * returnAddress, const char * szFile, int nLine, const char * szModule, const char * szFormat, char * arglist) Line 391&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ucrtbased.dll!_CrtDbgReport(int report_type, const char * file_name, int line_number, const char * module_name, const char * format, ...) Line 263&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; mfc140ud.dll!AfxAssertFailedLine(const char * lpszFileName, int nLine) Line 317&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; mfc140ud.dll!AfxOleUnlockApp() Line 62&nbsp;&nbsp;&nbsp; C++<br><br></div><div><br></div>]]>
   </description>
   <pubDate>Tue, 05 Oct 2021 17:43:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24221&amp;PID=78269&amp;title=how-do-i-shut-down-skinmanager#78269</guid>
  </item> 
 </channel>
</rss>