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. Possibly weird question

Possibly weird question

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

    Ok Let's say i have two functions contained in a DLL and an .EXE that calls them. Then I decide to update this DLL, and add another, third function to it. Is there any way to make the .EXE aware of this new function without replacing the whole .EXE? Can I get a list of functions dynamically from the DLL and use them form the exe? Any help or pointers would be really appreciated. Regards, Venet. Donec eris felix, multos numerabis amicos.

    T 1 Reply Last reply
    0
    • V Venet

      Ok Let's say i have two functions contained in a DLL and an .EXE that calls them. Then I decide to update this DLL, and add another, third function to it. Is there any way to make the .EXE aware of this new function without replacing the whole .EXE? Can I get a list of functions dynamically from the DLL and use them form the exe? Any help or pointers would be really appreciated. Regards, Venet. Donec eris felix, multos numerabis amicos.

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      While you can get the exported function table by examining .dll executable file (which uses PE format), you can't answer very important question: what are the parameters and what's the return type. Even if you could, how could .exe get the advantage of new function - at the moment you write .exe you have no idea what new function will be doing and when should you call it. Tomasz Sowinski -- http://www.shooltz.com

      *** Vodka. Connecting people. ***

      V 1 Reply Last reply
      0
      • T Tomasz Sowinski

        While you can get the exported function table by examining .dll executable file (which uses PE format), you can't answer very important question: what are the parameters and what's the return type. Even if you could, how could .exe get the advantage of new function - at the moment you write .exe you have no idea what new function will be doing and when should you call it. Tomasz Sowinski -- http://www.shooltz.com

        *** Vodka. Connecting people. ***

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

        Well I do know the function name and exact parameters. I'm actually writing the .DLL and .EXE. My Idea was to have some kind of small database in the actual DLL that will keep list of the functions it provides along with the parameters, and maybe .exe will call say GetSupportedFunctions() and will know exactly what functions are there and waht parameters they take. Deciding when to call what function, shouldn't be a problem! However my problem is figuring out, how to call these functions. Or is this possible at all? Regards, Venet. Donec eris felix, multos numerabis amicos.

        T 1 Reply Last reply
        0
        • V Venet

          Well I do know the function name and exact parameters. I'm actually writing the .DLL and .EXE. My Idea was to have some kind of small database in the actual DLL that will keep list of the functions it provides along with the parameters, and maybe .exe will call say GetSupportedFunctions() and will know exactly what functions are there and waht parameters they take. Deciding when to call what function, shouldn't be a problem! However my problem is figuring out, how to call these functions. Or is this possible at all? Regards, Venet. Donec eris felix, multos numerabis amicos.

          T Offline
          T Offline
          Tomasz Sowinski
          wrote on last edited by
          #4

          Venet wrote: However my problem is figuring out, how to call these functions. Getting the address of function is easy when you have function name (GetProcAddress). But you need to call the function with right parameters, and this would be quite difficult. I guess you'd have to code this part in assembly language. I still can't see why would you like your .exe to invoke functions unknown when you develop the .exe itself. Enlighten me please :) Tomasz Sowinski -- http://www.shooltz.com

          *** Vodka. Connecting people. ***

          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