Smart DLL loading
Posted on 1998-10-05
Microsoft Visual C++ 5.0
also Borland C++ Builder 3
I would like to load DLL dynamically but still use classes exported from that DLL.
(something between statically and dynamically loading DLL)
I would like a lib that would allow use of exported stuff but won't automatically load
I would load it later IF I have it and if not I would set flag so I won't use any of
Another use of this: I have plug-in modules I would like to comunicate with through
classes - so I won't know actual DLL name at compile time. Also DLL name could
change at compile time.
/** DLL **/
__declspec(dllexport) class ThisIsIt
virtual int DoSomething();
int MainFunction(int data);
/** EXE **/
class UseThisIsIt : public ThisIsIt
return -1; // Error indicator
Once again: I would like to load this DLL dynamically and use it this way.