<?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 : CXTPCommandBarsFrameHook causing aborts</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : CXTPCommandBarsFrameHook causing aborts]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 09 Apr 2026 12:45:09 +0000</pubDate>
  <lastBuildDate>Sun, 03 Aug 2025 12:08:07 +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=24587</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[CXTPCommandBarsFrameHook causing aborts : Happened to do a simpler test....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24587&amp;PID=79246&amp;title=cxtpcommandbarsframehook-causing-aborts#79246</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24587<br /><strong>Posted:</strong> 03 August 2025 at 12:08pm<br /><br />Happened to do a simpler test. Just edit the mdi doc and right click the app icon in app bar and choose close.]]>
   </description>
   <pubDate>Sun, 03 Aug 2025 12:08:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24587&amp;PID=79246&amp;title=cxtpcommandbarsframehook-causing-aborts#79246</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPCommandBarsFrameHook causing aborts : Our app is crashing in a specific...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24587&amp;PID=79245&amp;title=cxtpcommandbarsframehook-causing-aborts#79245</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24587<br /><strong>Posted:</strong> 01 August 2025 at 1:32pm<br /><br /><div>Our app is crashing in a specific workflow because CXTPCommandBarsFrameHook:RedrawRibbonBar is being called after CXTPCommandBarsFrameHook::~CXTPCommandBarsFrameHook has been called.</div><div><br></div><div>The workflow is as follows. We are an MDI app and we call EnableFrameTheme on the CXTPRibbonBar. The ribbon bar pointer is stored in CXTPCommandBarsFrameHook.</div><div><br></div><div>The user modifies a document. Then the user right clicks the app icon in the Windows App Bar and clicks the Close entry the OS shows. The user is prompted to save the file and clicks "No". The app starts to shut&nbsp; down.</div><div><br></div><div>CXTPCommandBarsFrameHook::GetAutoHideBar gets called. SHAppBarMessage is called and that eventually leads to the CXTPCommandBarsFrameHook destructor.&nbsp;</div><div><br></div><div>This leads to a crash, for example, in RedrawFrame because GetFramePaintManager() call returns a null pointer.&nbsp;</div><div><br></div><div>&gt;&nbsp; &nbsp; ToolkitPro2410vc170x64U.dll!CXTPCommandBarsFrameHook::RedrawFrame() Line 642&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64U.dll!CXTPCommandBarsFrameHook::OnHookMessage(HWND__ * hWnd, unsigned int nMessage, unsigned __int64 &amp; wParam, __int64 &amp; lParam, __int64 &amp; lResult) Line 1285&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64U.dll!CXTPHookManager::CHookSink::OnHookMessage(HWND__ * hWnd, unsigned int nMessage, unsigned __int64 &amp; wParam, __int64 &amp; lParam, __int64 &amp; lResult) Line 322&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64U.dll!CXTPHookManager::HookWndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 443&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,__int64 (*)(struct tagWND *,unsigned int,unsigned __int64,__int64),struct HWND__ *,enum _WM_VALUE,unsigned __int64,__int64,void *,int)&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;user32.dll!DispatchClientMessage()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;user32.dll!__fnDWORD()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ntdll.dll!KiUserCallbackDispatcherContinue()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;win32u.dll!NtUserMessageCall()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;user32.dll!SendMessageWorker()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;user32.dll!SendMessageW()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;&#091;Inline Frame&#093; mfc140u.dll!CWnd::SendMessageW(unsigned int) Line 32&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;mfc140u.dll!CFrameWnd::NotifyFloatingWindows(unsigned long dwFlags) Line 570&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;mfc140u.dll!CFrameWnd::OnActivate(unsigned int nState, CWnd * pWndOther, int bMinimized) Line 1082&nbsp; &nbsp; C++<br><br></div><div>In debug the crash can occur elsewhere as m_pRibbonbar is accessed in RedrawRibbonBar because it is not null (it is 0xdddddddddddddddd - debug poison pill). In that case&nbsp;CXTPCommandBarsFrameHook::GetAutoHideBar is still on the stack.</div><div><br></div><div><br></div><div>Fortunately, I can duplicate this with the MFC\Xtreme ToolkitPro&nbsp; 24.1.0\Samples\CommandBars\CommandBarsSample</div><div><br></div><div>Just run the sample and in the MDI window type some text. Then right click the icon in the app/task bar and choose close. Then just say No when prompted to save the file.</div><div><br></div><div>I am trying to build that sample using Dynamic Unicode Release but I get a build failure due to a "missing file", which of course the IDE knows the name of but as is typical of Microsoft programming the IDE is keeping the name of said file to itself.&nbsp;</div><div><br></div><div>Here is the call stack for that sample built with static unicode release (I turned on debug info).</div><div><br></div><div>&gt;&nbsp; &nbsp; CommandBarsSample.exe!CXTPCommandBarsFrameHook::RedrawFrame() Line 642&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;CommandBarsSample.exe!CXTPCommandBarsFrameHook::OnHookMessage(HWND__ * hWnd, unsigned int nMessage, unsigned __int64 &amp; wParam, __int64 &amp; lParam, __int64 &amp; lResult) Line 1285&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;CommandBarsSample.exe!CXTPHookManager::CHookSink::OnHookMessage(HWND__ * hWnd, unsigned int nMessage, unsigned __int64 &amp; wParam, __int64 &amp; lParam, __int64 &amp; lResult) Line 322&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;CommandBarsSample.exe!CXTPHookManager::HookWndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 443&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,__int64 (*)(struct tagWND *,unsigned int,unsigned __int64,__int64),struct HWND__ *,enum _WM_VALUE,unsigned __int64,__int64,void *,int)&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;user32.dll!DispatchClientMessage()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;user32.dll!__fnDWORD()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ntdll.dll!KiUserCallbackDispatcherContinue()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;win32u.dll!NtUserGetMessage()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;user32.dll!GetMessageW()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;CommandBarsSample.exe!AfxInternalPumpMessage() Line 153&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;CommandBarsSample.exe!CWinThread::Run() Line 629&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;CommandBarsSample.exe!AfxWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 61&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;&#091;Inline Frame&#093; CommandBarsSample.exe!invoke_main() Line 118&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;CommandBarsSample.exe!__scrt_common_main_seh() Line 288&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;kernel32.dll!BaseThreadInitThunk()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ntdll.dll!RtlUserThreadStart()&nbsp; &nbsp; Unknown<br></div><div><br></div><div>I really need a fix for this, both in debug and release.</div>]]>
   </description>
   <pubDate>Fri, 01 Aug 2025 13:32:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24587&amp;PID=79245&amp;title=cxtpcommandbarsframehook-causing-aborts#79245</guid>
  </item> 
 </channel>
</rss>