Search code examples
windowsdllmanifest

Redirecting dependant DLLs in the manifest for a plugin DLL


I am writing a DLL which is likely to be loaded via a call to LoadLibrary specifying an absolute path to where it has been installed. (The call to LoadLibrary may well be in a third party application, and the customer will have to configure the application to point at my DLL.)

The problem is that my DLL depends on other DLLs which are installed in the same directory as mine - but that directory is not on the DLL search path.

I think I need to associate a manifest with my primary DLL which points at my secondary DLLs ... does anyone have any examples of doing that?

Note: This is not managed code - native only.


Solution

  • For anyone else with the same problem, I eventually solved this by marking all the secondary DLLs as delayload, and then having the delayload helper function load from the directory of the primary DLL.