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