Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Has MFC dialog boxes gone multi threaded??

Has MFC dialog boxes gone multi threaded??

Scheduled Pinned Locked Moved C / C++ / MFC
c++questioncsharpvisual-studiodebugging
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Robert Buldoc
    wrote on last edited by
    #1

    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

    G V 2 Replies Last reply
    0
    • R Robert Buldoc

      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

      G Offline
      G Offline
      Gary R Wheeler
      wrote on last edited by
      #2

      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")]

      1 Reply Last reply
      0
      • R Robert Buldoc

        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

        V Offline
        V Offline
        vipinasda
        wrote on last edited by
        #3

        Why is it of concern to you? let the library do anything as long as it accomplishes the things you want. Vipin - MVP

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups