Has MFC dialog boxes gone multi threaded??
-
First of all Merry Christmas! I noticed something weird in Visual Studio 2005. I haven't test my code in previous versions so I cannot confirm whether its merrit of VS2005 or else. Ok, I have a dialog box application with 2 modeless dialog boxes which are created before the main dialog box in the application. I noticed there are 2 extra threads in the application with names "ThreadStartRoutine" and CRpcThreadCache::RpcWorkerThreadEntry" both at location _KiFastSystemCallRet@0 as shown in debug mode. These 2 threads are created during the creation of the main dialog box in DoModal() function. I traced the exact creation point to Line 306 at dlgcore.cpp: hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate, pParentWnd->GetSafeHwnd(), AfxDlgProc); Which is inside this function: BOOL CWnd::CreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate, CWnd* pParentWnd, HINSTANCE hInst) My question is what are these 2 threads for? and why are they created? Any insight appreciated!! Rob
-
First of all Merry Christmas! I noticed something weird in Visual Studio 2005. I haven't test my code in previous versions so I cannot confirm whether its merrit of VS2005 or else. Ok, I have a dialog box application with 2 modeless dialog boxes which are created before the main dialog box in the application. I noticed there are 2 extra threads in the application with names "ThreadStartRoutine" and CRpcThreadCache::RpcWorkerThreadEntry" both at location _KiFastSystemCallRet@0 as shown in debug mode. These 2 threads are created during the creation of the main dialog box in DoModal() function. I traced the exact creation point to Line 306 at dlgcore.cpp: hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate, pParentWnd->GetSafeHwnd(), AfxDlgProc); Which is inside this function: BOOL CWnd::CreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate, CWnd* pParentWnd, HINSTANCE hInst) My question is what are these 2 threads for? and why are they created? Any insight appreciated!! Rob
My guess would be that the
CRpc*
stuff is related to Remote Procedure Call support in the MFC libraries. I'm pretty sure I've seen this before with MFC 7.1 apps. The other function, I have no idea.
Software Zen:
delete this; // [Fold With Us!](http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx)[[^](http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx "New Window")]
-
First of all Merry Christmas! I noticed something weird in Visual Studio 2005. I haven't test my code in previous versions so I cannot confirm whether its merrit of VS2005 or else. Ok, I have a dialog box application with 2 modeless dialog boxes which are created before the main dialog box in the application. I noticed there are 2 extra threads in the application with names "ThreadStartRoutine" and CRpcThreadCache::RpcWorkerThreadEntry" both at location _KiFastSystemCallRet@0 as shown in debug mode. These 2 threads are created during the creation of the main dialog box in DoModal() function. I traced the exact creation point to Line 306 at dlgcore.cpp: hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate, pParentWnd->GetSafeHwnd(), AfxDlgProc); Which is inside this function: BOOL CWnd::CreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate, CWnd* pParentWnd, HINSTANCE hInst) My question is what are these 2 threads for? and why are they created? Any insight appreciated!! Rob