We've built a VST plugin that depends on several other dll's that we supply with the plugin installer. To make sure that our plugin picks up the right dll's, we have modified the VSTPluginMain (for Win32 only) in juce_VST_Wrapper.cpp like this:
extern "C" __declspec (dllexport) AEffect* VSTPluginMain (audioMasterCallback audioMaster)
AEffect* effect = pluginEntryPoint (audioMaster);
where getPreviousPath and setHadronPath contain calls to GetDllDirectoryA and SetDllDirectoryA respectively.
This works really well, but I just wonder if there is a smarter way of doing this, and in particular one that doesn't involve modifying the Juce source.