Delay load DLL to clean up 64bit folders?

Having not really taken an interest in compilers/linkers in the past I dont really know what I’m talking about here, a little google knowledge can be dangerous! :wink:

Would it not be possible to /delayload DLLs in the 64bit version of Xojo (and apps it makes) so that the DLLs can be loaded from a subfolder rather than linking them at runtime and having them picked up from next to the app?

When the delay load happens, it looks next to the exe and in all standard windows dll locations (as it does now) when this isnt found and error is raised, this error can be trapped and the DLL can be loaded from any path using LoadLibrary allowing the DLL to be loaded from “Xojo Resources”

It seems that this is possible in VS and LLVM, is there a particular reason this isnt done?


dlls are not “linked” until runtime (hence the name dynamic link library)

The OS requires the Windows C runtimes to be there, OR in one of its well defined locations - none of which we control or can influence :frowning:
We really did try

The DLLS for plugins the APP eventually explicitly loads using LoadLibrary so we DO fully control the loading of those
Hence why we CAN put them elsewhere
And we can make sure they are not loaded right up front (which is already done as far as I know)

So depending on WHICH dll’s you’re referring to
Some - no
Some - yes

vcruntime or msvc dll’s we have no choice about where they go as the OS determines where they must be
they have to be installed on the system OR right next to the exe itself
others like plugin dll’s, we do have options about, because we control how & when they load (unlike the others where we dont)