My project is a plug-in (Windows DLL) that is loaded by a host executable not under my control. My DLL wants to load some additional libs. I do this with private assemblies; there's a great answer at how can a Win32 App plugin load its DLL in its own directory for how to do this. But if I add /delayload dependentlib.dll
on the main DLL's link line to avoid loading the assembly til it's needed (I have to do this for various reasons), Windows no longer searches my private assemblies -- seems like it ignores the manifest I compiled in. Instead it looks for the delay-loaded DLL in the usual search path. (I use sysinternals procmon to check this.)
Is this a known bug, or is there any other way to delay-load an assembly? I'd rather not go the LoadLibrary + GetProcAddress route where I have to know all the symbols I care about in the dependent lib.