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. call from one dll to another dll

call from one dll to another dll

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
6 Posts 2 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
    Raghunandan S
    wrote on last edited by
    #1

    Hi All, I have a non mfc dll(does not contain the CWinApp) which needs to talk to 2nd dll which uses mfc as a shared dll.I want to make a call to the 2nd dll from the 1st one inorder to display a dialog box. I'm using LoadLibrary to load the 2nd dll from the 1st one and using GetProcAddress to get the address of the function which creates an object of dialog box and calls DoModal on it.But when I make a call in this manner, the code is crashing at ASSERT((p = pMap->LookupPermanent(m_hWnd)) != NULL || (p = pMap->LookupTemporary(m_hWnd)) != NULL); in Wincore.cpp Can anyone please tell me what the problem is. Thanks in advance Raghu

    N 1 Reply Last reply
    0
    • R Raghunandan S

      Hi All, I have a non mfc dll(does not contain the CWinApp) which needs to talk to 2nd dll which uses mfc as a shared dll.I want to make a call to the 2nd dll from the 1st one inorder to display a dialog box. I'm using LoadLibrary to load the 2nd dll from the 1st one and using GetProcAddress to get the address of the function which creates an object of dialog box and calls DoModal on it.But when I make a call in this manner, the code is crashing at ASSERT((p = pMap->LookupPermanent(m_hWnd)) != NULL || (p = pMap->LookupTemporary(m_hWnd)) != NULL); in Wincore.cpp Can anyone please tell me what the problem is. Thanks in advance Raghu

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      have u called AFX_MANAGE_STATE(AfxGetStaticModuleState()); in the first line of the function which creates the dialog? nave

      R 1 Reply Last reply
      0
      • N Naveen

        have u called AFX_MANAGE_STATE(AfxGetStaticModuleState()); in the first line of the function which creates the dialog? nave

        R Offline
        R Offline
        Raghunandan S
        wrote on last edited by
        #3

        yes i have done that

        N 1 Reply Last reply
        0
        • R Raghunandan S

          yes i have done that

          N Offline
          N Offline
          Naveen
          wrote on last edited by
          #4

          Ensure u have called AfxEnableControlContainer(); Enable3dControls(); nave

          R 1 Reply Last reply
          0
          • N Naveen

            Ensure u have called AfxEnableControlContainer(); Enable3dControls(); nave

            R Offline
            R Offline
            Raghunandan S
            wrote on last edited by
            #5

            from where should these functions be called

            N 1 Reply Last reply
            0
            • R Raghunandan S

              from where should these functions be called

              N Offline
              N Offline
              Naveen
              wrote on last edited by
              #6

              i think u can do it from dll attach of the extension dll nave

              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