I have two plugins using third-party libraries in my project. Both work fine separately, if the other plugin is disabled. If they both are enabled, the second loaded plugin would crashe with error which means it can’t find its dlls:
__delayLoadHelper2() [D:\a_work\1\s\src\vctools\delayimp\delayhlp.cpp:312]
In the StartupModule() I add dlls path for delay loaded dll like this:
FPlatformProcess::PushDllDirectory(*PluginBinariesDir); // “MyPlugin1/Source/ThirdParty/Binaries/Win64”
and for another pluign
FPlatformProcess::PushDllDirectory(*PluginBinariesDir); // “MyPlugin2/Source/ThirdParty/Binaries/Win64”
But it looks like PushDllDirectory(…) overrides previous path rather than push new path to the array. For example, if I load MyPlugin1 first and then load MyPlugin2, and if I copy all dlls to the MyPlugin2’s binaries directory, the project would load without crash.
So, do I do something wrong and need to use another function, or is it a bug which should be reported?