Loading a VST DLL


Hello all.
I tried using some of williamk’s code to bring in a VST effect

// Load VST //
			String errorMessage;
			PluginDescription PlugDesc;
			PlugDesc.pluginFormatName = T("vst");
			PlugDesc.fileOrIdentifier =T("C:\\Audio\\VST\\dblue_Glitch_v1_3.dll");
			AudioProcessorGraph::Node* node = 0;
			AudioPluginInstance* instance= AudioPluginFormatManager::getInstance()->createPluginInstance (PlugDesc, errorMessage);
			node = processorGraph.addNode(instance);

and it breaks on the last line, the content of errorMessage is “this plug-in file no longer exists”.
I’m assuming that I need to actually load this file into my program some how, and not just access it where it is? The file is there, I have checked in the File Explorer… or might it be a windows file access privilege issue?


Step into it and see how far it gets in loading the plugin… you’ll be able to see if it finds the file or not, then whether it loads it successfully or not, etc.

(I seem to be spending a lot of my time recently telling people to step into things and look at what’s actually happening… Come on, folks, you’ve got the whole codebase in front of you, it’s not so scary to look inside these things, is it!?)


Sorry…I’m just a programmer used to people falling over themselves telling me how things work (the lazy sort).

I got all sulky and then mum came to help me.

She figured out in ten minutes that AudioPluginFormatManager::getInstance()->addDefaultFormats() wasn’t going to do anything if I hadn’t defined JUCE_PLUGINHOST_VST and either rebuilt the Juce library or used the amalgamated code.

Then she dried my tears and gave me a glass of milk and some biscuits and sent me to bed.

Mums are good like that.


Ah yes, mums always know best.