<?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 : Problem with XtToolkit with MFC shared DLL</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Problem with XtToolkit with MFC shared DLL]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 16:13:50 +0000</pubDate>
  <lastBuildDate>Tue, 23 Aug 2011 10:10:17 +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=18836</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[Problem with XtToolkit with MFC shared DLL : Hi,Judging by the amount of replies,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18836&amp;PID=66000&amp;title=problem-with-xttoolkit-with-mfc-shared-dll#66000</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6992">jojoba</a><br /><strong>Subject:</strong> 18836<br /><strong>Posted:</strong> 23 August 2011 at 10:10am<br /><br />Hi,<br><br>Judging by the amount of replies, it seems that my problem isn't a common one <img src="http://forum.codejock.com/smileys/smiley2.gif" border="0" alt="Wink" title="Wink" />. <br>I have investigated a bit more and I fell upon the following piece of code in XTFunctions.h : <br><br><font face="Courier New, Courier, mono">#if defined(XT_INIT_BY_REGULAR_DLL)<br>//////////////////////////////////////////////////////////////////////<br>// Summary: This member function will initialize the resources for the Xtreme Toolkit.<br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; If using the Xtreme Toolkit as an extension DLL within a regular DLL,<br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; add the following two lines to your stdafx.h file. This will give you<br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; access to the exported function InitXtremeExtDll():<br>// <br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;pre&gt;#define XT_INIT_BY_REGULAR_DLL<br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #include "XTToolkit.h"&lt;/pre&gt;<br>// <br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; You will then need to add XT_INIT_BY_REGULAR_DLL to the Xtreme Toolkit <br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; preprocessor definitions and rebuild it. After you have done this,<br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; locate your CWinApp::InitInstance() method for your regular DLL and make<br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; the following call:<br>// <br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;pre&gt;InitXtremeExtDLL();&lt;/pre&gt;<br>// <br>//&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; This will initialize the resources for the Xtreme Toolkit.<br>extern _XT_EXT_CLASS void WINAPI InitXtremeExtDLL();<br>#endif // defined(XT_INIT_BY_REGULAR_DLL)</font><br><br>As my change implied changing the compilation of the MFC code from an executable to a DLL, I guess the comment "If using the Xtreme Toolkit as an extension DLL within a regular DLL" applies to my case. I therefore did what was suggested : <br><br>- I've added : <br><font face="Courier New, Courier, mono">#define XT_INIT_BY_REGULAR_DLL<br>#include &lt;XTToolkit.h&gt;</font><br>to my precompiled header file.<br><br>- I've recompiled XT4100Libd.dll and XT4100Libd.lib with the following preprocessor definitions : <br><font face="Courier New, Courier, mono">_DEBUG<br>_AFXDLL<br>WIN32<br>_WINDOWS<br>_WIN32<br>_VC80_UPGRADE=0x0710<br>_MBCS<br>_XT_NO_MANAGED_STATE<br>_WINDLL<br>_XT_DLL<br>XT_INIT_BY_REGULAR_DLL</font><br><br>- I've called InitXtremeExtDll() in my app's ::InitInstance() function<br><br>Unfortunately, when recompiling, I get the following error : <br><font face="Courier New, Courier, mono">1&gt;Compiling...<br>1&gt;NomadEdit.cpp<br>1&gt;Automatically linking with XT4100Libd.dll<br>1&gt;.\NomadEdit.cpp(2200) : error C3861: 'InitXtremeExtDLL': identifier not found<br></font><br>And indeed, when I look into the XT code, <font face="Courier New, Courier, mono">InitXtremeExtDLL </font>is declared (provided <font face="Courier New, Courier, mono">XT_INIT_BY_REGULAR_DLL is defined)</font> but never defined, unlike other global functions like _xtAfxChangeWindowFont, etc. Is this a remnant of a code that hasn't been removed ? Do I have an incomplete version of XT Toolkit ? If it was indeed defined, should I use this function ? And more importantly : do you think it's related to my initial problem of AfxGetApp and AfxGetResourceHandle returning NULL ?<br><br>Thank you for your help!<br><br>Jo<br>]]>
   </description>
   <pubDate>Tue, 23 Aug 2011 10:10:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18836&amp;PID=66000&amp;title=problem-with-xttoolkit-with-mfc-shared-dll#66000</guid>
  </item> 
  <item>
   <title><![CDATA[Problem with XtToolkit with MFC shared DLL : Hi, I&amp;#039;m new to both MFCs...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18836&amp;PID=65939&amp;title=problem-with-xttoolkit-with-mfc-shared-dll#65939</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6992">jojoba</a><br /><strong>Subject:</strong> 18836<br /><strong>Posted:</strong> 17 August 2011 at 9:47am<br /><br />Hi, <br><br>I'm new to both MFCs and XtToolkit. I was asked to migrate an MFC application (containing both native and managed code) in which XtToolkit is used towards a new WPF application. The idea is to slowly move the many functionalities from the Win32 MFC code to .net, while the application is still being used by several people. <br>We therefore try to host the current application (the MFC executable) in a newly-created WPF shell and before migrating the functionalities, we try to make sure that each one still works in the new application. <br><br>The MFC code is now compiled into a DLL and we load that DLL from the WPF shell. We had to play a bit with the code in order the ::InitInstance function of our derived class of CWinApp to be called (as described in <a href="http://support.microsoft.com/kb/148791" target="_blank">http://support.microsoft.com/kb/148791</a>) but the application is now properly created, hosted and displayed as before. <br><br>Unfortunately, we get asserts and crashes in XtToolkit whenever we click on a menu option : AfxGetApp and AfxGetResourceHandle both return NULL. Here's an example of the kind of assert we get : <br><br>CXTRegistryManager::CXTRegistryManager(HKEY hKeyBase/*=HKEY_CURRENT_USER*/)<br>{<br>&nbsp;&nbsp;&nbsp; m_strINIFileName = xtAfxData.strINIFileName;<br><br>&nbsp;&nbsp;&nbsp; m_pWinApp = AfxGetApp();<br>&nbsp;&nbsp;&nbsp; ASSERT(m_pWinApp != NULL);<br>...<br><br>From what I understand, the crash occurs whenever an XT object (for example a CXTCoolMenu) traps a Windows message directly. In those cases, both AfxGetApp and AfxGetResourceHandle fail, while they return the proper pointers when called directly from our code. Indeed, I can set a breakpoint in that code and I won't get asserts or crashes when this code is executed during the initialization process (that originates from our code) but the same code will fail when the call originates from trapping a windows message.<br><br>Note that the resources are still properly set for XtToolkit : we still call xtAfxData.InitResources(...); properly, etc. Unless I missed something, we go through the same code path as before. <br><br>Do you have any clue as to what could possibly go wrong in those cases ? Did I miss something ? Do I try to do something illegal ? <br><br>Because of my company's firewall, I can't upload a file so I attached the callstacks at the end of this message.<br><br>Thanks for your help.<br><br>Jonathan <br>------<br><br>The code where the assert is located : <br><br><font face="Courier New, Courier, mono">CXTRegistryManager::CXTRegistryManager(HKEY hKeyBase/*=HKEY_CURRENT_USER*/)<br>{<br>&nbsp;&nbsp;&nbsp; m_strINIFileName = xtAfxData.strINIFileName;<br><br>&nbsp;&nbsp;&nbsp; m_pWinApp = AfxGetApp();<br>&nbsp;&nbsp;&nbsp; ASSERT(m_pWinApp != NULL);<br><br>&nbsp;&nbsp;&nbsp; ASSERT(hKeyBase == HKEY_CURRENT_USER || hKeyBase == HKEY_LOCAL_MACHINE);<br>&nbsp;&nbsp;&nbsp; m_hKeyBase = hKeyBase;<br>}</font><br><br>When called through the following callstack, the ASSERT(m_pWinApp != NULL); is fine :<br><br>&gt;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTRegistryManager::CXTRegistryManager(HKEY__ * hKeyBase=0x80000001)&nbsp; Line 29&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTToolsManager::OnLoad()&nbsp; Line 217 + 0xd bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTToolsManager::Load()&nbsp; Line 277 + 0xd bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTToolsManager::CXTToolsManager()&nbsp; Line 55 + 0x8 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTToolsManager::Get()&nbsp; Line 637 + 0x28 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTFrameImpl::CXTFrameImpl()&nbsp; Line 89 + 0x7 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTFrameWnd::CXTFrameWnd()&nbsp; Line 70 + 0x48 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; Editor_d.dll!CMainFrame::CMainFrame()&nbsp; Line 153 + 0x52 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; Editor_d.dll!CMainFrame::CreateObject()&nbsp; Line 68 + 0x5c bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; mfc90d.dll!CRuntimeClass::CreateObject()&nbsp; Line 142 + 0x8 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; mfc90d.dll!CDocTemplate::CreateNewFrame(CDocument * pDoc=0x56ef5d38, CFrameWnd * pOther=0x00000000)&nbsp; Line 262 + 0xb bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; mfc90d.dll!CSingleDocTemplate::OpenDocumentFile(const char * lpszPathName=0x00000000, int bMakeVisible=1)&nbsp; Line 125 + 0x13 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; mfc90d.dll!CDocManager::OnFileNew()&nbsp; Line 848&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; mfc90d.dll!CWinApp::OnFileNew()&nbsp; Line 22&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; Editor_d.dll!CNomadEditApp::InitEngine()&nbsp; Line 2611&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Managed to Native Transition&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; Editor_d.dll!Dunia::Interop::DuniaInterop::Initialize() Line 292 + 0x1e bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; Dunia.Shell.exe!Dunia.Shell.MainWindow.Views.MainWindow.HostDuniaEditor() Line 94 + 0x11 bytes&nbsp;&nbsp;&nbsp; C#<br>&nbsp;&nbsp;&nbsp;&nbsp; Dunia.Shell.exe!Dunia.Shell.MainWindow.Views.MainWindow.MainWindow_Loaded(object sender = {Dunia.Shell.MainWindow.Views.MainWindow}, System.Windows.RoutedEventArgs e = {System.Windows.RoutedEventArgs}) Line 166 + 0x8 bytes&nbsp;&nbsp;&nbsp; C#<br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) + 0x78 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source = {Dunia.Shell.MainWindow.Views.MainWindow}, System.Windows.RoutedEventArgs args = {System.Windows.RoutedEventArgs}, bool reRaised = false) + 0x1bf bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender = {Dunia.Shell.MainWindow.Views.MainWindow}, System.Windows.RoutedEventArgs args = {System.Windows.RoutedEventArgs}) + 0x79 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs e) + 0x17 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.BroadcastEventHelper.BroadcastEvent(System.Windows.DependencyObject root, System.Windows.RoutedEvent routedEvent = {System.Windows.RoutedEvent}) + 0x132 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(object root) + 0xa9 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!MS.Internal.LoadedOrUnloadedOperation.DoWork() + 0x16 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.Media.MediaContext.FireLoadedPendingCallbacks() + 0x71 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() + 0x30 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget = {System.Windows.Interop.HwndTarget}) + 0x80 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget) + 0x2b bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.Media.MediaContext.Resize(System.Windows.Media.ICompositionTarget resizedCompositionTarget) + 0x3b bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.Interop.HwndTarget.OnResize() + 0x147 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.Interop.HwndTarget.HandleMessage(int msg, System.IntPtr wparam, System.IntPtr lparam) + 0x21a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationCore.dll!System.Windows.Interop.HwndSource.HwndTargetFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled = false) + 0x3a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = 737116, int msg = 5, System.IntPtr wParam = 0, System.IntPtr lParam = 50332672, ref bool handled = false) + 0xbe bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x7a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {Method = Cannot evaluate expression because a native frame is on top of the call stack.}, object args = {MS.Win32.HwndSubclass.DispatcherOperationCallbackParameter}, bool isSingleParameter = true) + 0x8a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler = null) + 0x4a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler) + 0x44 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, bool isSingleParameter) + 0x91 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority priority, System.Delegate method, object arg) + 0x40 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd = 737116, int msg = 5, System.IntPtr wParam = 0, System.IntPtr lParam = 50332672) + 0xdc bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Frames below may be incorrect and/or missing, no symbols loaded for mscorwks.dll&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Native to Managed Transition&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!MS.Win32.HwndSubclass.DefWndProcWrapper(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x78 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Native to Managed Transition&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_InternalCallWinProc@20()&nbsp; + 0x23 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_UserCallWinProcCheckWow@32()&nbsp; + 0xb7 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_CallWindowProcAorW@24()&nbsp; + 0x5e bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_CallWindowProcW@20()&nbsp; + 0x1b bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Managed to Native Transition&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x125 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Native to Managed Transition&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_InternalCallWinProc@20()&nbsp; + 0x23 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_UserCallWinProcCheckWow@32()&nbsp; + 0xa65 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_DispatchClientMessage@24()&nbsp; + 0x51 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!___fnINLPWINDOWPOS@4()&nbsp; + 0x2c bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; ntdll.dll!776500e6() &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_NtUserSetWindowRgn@12()&nbsp; + 0x15 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Managed to Native Transition&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; Microsoft.Windows.Shell.dll!Standard.NativeMethods.SetWindowRgn(System.IntPtr hWnd = 737116, System.IntPtr hRgn = -301715426, bool bRedraw = false) Line 3153 + 0x10 bytes&nbsp;&nbsp;&nbsp; C#<br>&nbsp;&nbsp;&nbsp;&nbsp; Microsoft.Windows.Shell.dll!Microsoft.Windows.Shell.WindowChromeWorker._SetRoundingRegion(Standard.WINDOWPOS? wp = null) Line 942&nbsp;&nbsp;&nbsp; C#<br>&nbsp;&nbsp;&nbsp;&nbsp; Microsoft.Windows.Shell.dll!Microsoft.Windows.Shell.WindowChromeWorker._UpdateFrameState(bool force = true) Line 810 + 0x32 bytes&nbsp;&nbsp;&nbsp; C#<br>&nbsp;&nbsp;&nbsp;&nbsp; Microsoft.Windows.Shell.dll!Microsoft.Windows.Shell.WindowChromeWorker._ApplyNewCustomChrome() Line 259&nbsp;&nbsp;&nbsp; C#<br>&nbsp;&nbsp;&nbsp;&nbsp; Microsoft.Windows.Shell.dll!Microsoft.Windows.Shell.WindowChromeWorker._SetWindow.AnonymousMethod(object sender = {Dunia.Shell.MainWindow.Views.MainWindow}, System.EventArgs e = {System.EventArgs}) Line 182 + 0x8 bytes&nbsp;&nbsp;&nbsp; C#<br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Window.OnSourceInitialized(System.EventArgs e) + 0x7d bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Window.CreateSourceWindowImpl() + 0x1b6 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Window.SafeCreateWindow() + 0x29 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Window.ShowHelper(object booleanBox) + 0x81 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Window.Show() + 0x48 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; Dunia.Shell.exe!Dunia.Shell.App.Application_Startup(object sender = {Dunia.Shell.App}, System.Windows.StartupEventArgs e = {System.Windows.StartupEventArgs}) Line 84 + 0x15 bytes&nbsp;&nbsp;&nbsp; C#<br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Application.OnStartup(System.Windows.StartupEventArgs e) + 0x7a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Application..ctor.AnonymousMethod(object unused) + 0x29 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {Method = Cannot evaluate expression because a native frame is on top of the call stack.}, object args = null, bool isSingleParameter = true) + 0x8a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler = null) + 0x4a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler) + 0x44 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() + 0x5d bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) + 0x38 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x51 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x67 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x45 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0x63 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() + 0x127 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x63 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = 2047844, int msg = 49493, System.IntPtr wParam = 0, System.IntPtr lParam = 0, ref bool handled = false) + 0xbe bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x7a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {Method = Cannot evaluate expression because a native frame is on top of the call stack.}, object args = {MS.Win32.HwndSubclass.DispatcherOperationCallbackParameter}, bool isSingleParameter = true) + 0x8a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler = null) + 0x4a bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler) + 0x44 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, bool isSingleParameter) + 0x91 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority priority, System.Delegate method, object arg) + 0x40 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd = 2047844, int msg = 49493, System.IntPtr wParam = 0, System.IntPtr lParam = 0) + 0xdc bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Native to Managed Transition&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_InternalCallWinProc@20()&nbsp; + 0x23 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_UserCallWinProcCheckWow@32()&nbsp; + 0xb7 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_DispatchMessageWorker@8()&nbsp; + 0xed bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_DispatchMessageW@4()&nbsp; + 0xf bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Managed to Native Transition&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame = {System.Windows.Threading.DispatcherFrame}) + 0xc4 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) + 0x49 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() + 0x4c bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) + 0x1e bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x6f bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) + 0x26 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Application.Run() + 0x19 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; Dunia.Shell.exe!Dunia.Shell.App.Main() + 0x5e bytes&nbsp;&nbsp;&nbsp; C#<br>&nbsp;&nbsp;&nbsp;&nbsp; mscoreei.dll!737f55ab() &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; mscoree.dll!73867f16() &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; mscoree.dll!73864de3() &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; kernel32.dll!76be3677() &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; ntdll.dll!77679f02() &nbsp;&nbsp;&nbsp; <br><br>After clicking on a menu option, the same assert fails with the following callstack : <br><br>&gt;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTRegistryManager::CXTRegistryManager(HKEY__ * hKeyBase=0x80000001)&nbsp; Line 29 + 0x21 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTCoolMenu::IsRecentItem(unsigned int nItem=483)&nbsp; Line 2355 + 0xd bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTCoolMenu::AddRecentItem(unsigned int nItem=483)&nbsp; Line 2376 + 0x29 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTCoolMenu::WindowProc(unsigned int message=273, unsigned int wParam=483, long lParam=0)&nbsp; Line 920&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; XT4100Libd.dll!CXTWindowMap::HookWndProc(HWND__ * hWnd=0x000c41a0, unsigned int message=273, unsigned int wParam=483, long lParam=0)&nbsp; Line 136 + 0x19 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_InternalCallWinProc@20()&nbsp; + 0x23 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_UserCallWinProcCheckWow@32()&nbsp; + 0xb7 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_DispatchMessageWorker@8()&nbsp; + 0xed bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; user32.dll!_DispatchMessageW@4()&nbsp; + 0xf bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Managed to Native Transition&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame = {System.Windows.Threading.DispatcherFrame}) + 0xc4 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) + 0x49 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() + 0x4c bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) + 0x1e bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x6f bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) + 0x26 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; PresentationFramework.dll!System.Windows.Application.Run() + 0x19 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; Dunia.Shell.exe!Dunia.Shell.App.Main() + 0x5e bytes&nbsp;&nbsp;&nbsp; C#<br>&nbsp;&nbsp;&nbsp;&nbsp; &#091;Frames below may be incorrect and/or missing, no symbols loaded for mscorwks.dll&#093;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; mscoreei.dll!737f55ab() &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; mscoree.dll!73867f16() &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; mscoree.dll!73864de3() &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; kernel32.dll!76be3677() &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; ntdll.dll!77679f02() &nbsp;&nbsp;&nbsp; <br><br><br><br>]]>
   </description>
   <pubDate>Wed, 17 Aug 2011 09:47:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18836&amp;PID=65939&amp;title=problem-with-xttoolkit-with-mfc-shared-dll#65939</guid>
  </item> 
 </channel>
</rss>