I have A.DLL that depends on B.DLL. A.DLL contains some initialization code (DllMain) that registers stuff with B.DLL.
I also have executable E.EXE that does not directly reference any A.DLL symbols but it uses A.DLL's stuff through generic interfaces obtained from B.DLL.
The problem is that A.DLL is never loaded into E.EXE's process because none of its exported symbols are imports of E.EXE.
Can I force A.DLL to be loaded into the process without actually referencing A.DLL's symbols in E.EXE and without inverting the dependency (or creating a dependency loop) between A.DLL and B.DLL, and without using explicit LoadLibrary() call?
EDIT: The problem has been produced on Windows with Visual Studio but portability is a concern, thus LoadLibrary() is not usable.
LoadLibrary(). It's a single line of code! - David HeffernanLoadLibraryand indeed withLoadLibraryyou can control which DLL you load. You can't with implicit linking. - David Heffernan