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. MFC DLL question

MFC DLL question

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
4 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.
  • F Offline
    F Offline
    FredrickNorge
    wrote on last edited by
    #1

    I am curently loading a dll like this static HMODULE hMod ; hMod = LoadLibrary("Updater.dll");exit(1); if(!hMod) { AfxMessageBox("not found !!!!!"); exit(1); } FreeLibrary(hMod); The mfc app loads the mfc dll and exits, but is it possible to define some sort of return value in the mfc dll that the mfc app closes while the dll continue processing?

    D J 2 Replies Last reply
    0
    • F FredrickNorge

      I am curently loading a dll like this static HMODULE hMod ; hMod = LoadLibrary("Updater.dll");exit(1); if(!hMod) { AfxMessageBox("not found !!!!!"); exit(1); } FreeLibrary(hMod); The mfc app loads the mfc dll and exits, but is it possible to define some sort of return value in the mfc dll that the mfc app closes while the dll continue processing?

      D Offline
      D Offline
      Don Box
      wrote on last edited by
      #2

      Plzz describe u'r question clearly.

      1 Reply Last reply
      0
      • F FredrickNorge

        I am curently loading a dll like this static HMODULE hMod ; hMod = LoadLibrary("Updater.dll");exit(1); if(!hMod) { AfxMessageBox("not found !!!!!"); exit(1); } FreeLibrary(hMod); The mfc app loads the mfc dll and exits, but is it possible to define some sort of return value in the mfc dll that the mfc app closes while the dll continue processing?

        J Offline
        J Offline
        Joan M
        wrote on last edited by
        #3

        As far as I know a DLL must be used from another application. If you load that DLL from the scope of your app, and then you close your app, this should make the DLL not to continue working. I can only think on create a service and activate it from your app, this service should control that DLL. Of course this can be a service or another process, but not the program that will be closed. Hope this helps.

        https://www.robotecnik.com freelance robots, PLC and CNC programmer.

        F 1 Reply Last reply
        0
        • J Joan M

          As far as I know a DLL must be used from another application. If you load that DLL from the scope of your app, and then you close your app, this should make the DLL not to continue working. I can only think on create a service and activate it from your app, this service should control that DLL. Of course this can be a service or another process, but not the program that will be closed. Hope this helps.

          F Offline
          F Offline
          FredrickNorge
          wrote on last edited by
          #4

          yes, makes sence. thanks

          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