Imagine that we have a solution with two projects: MakeDll (a dll application) that creates a dll and UseDll (an exe application) that uses a dll. Now I know that there are two ways, one is pleasant, the other is not. The nice way is that UseDll communicates statically with MakeDll.lib and just dllimports functions and classes and uses them. An unpleasant way is to use LoadLibrary and GetProcAddress, which I can not even imagine how to do this with overloaded functions or class members, in other words, nothing but the external "C" functions.
My questions are the following (all regarding the first option)
- What exactly does MakeDll.lib contain?
- When is the MakeDll.dll file loaded into my application and when is it downloaded? Can i control this?
- If I change MakeDll.dll, can I use the new version (if it is a superset of the old one in terms of interface) without using UseDll.exe? A special case is when a polymorphic class is exported and a new virtual function is added.
Thanks in advance.
PS I am using MS Visual Studio 2008
source
share