Plugin directory

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

The code above is only one version of all I tried yesterday.
And it doesn't even work with other plugins in any host, which I noticed painfully yesterday.

The code which works for every plugin is the dirty one: having the loadlibrary in the dllmain on process_attach, and freelibrary on process_detach.

Having loadlibrary in dllmain is strictly forbidden by Microsoft, as it might lead to dependancy deadlocks.

However, it worked for all plugin dlls, despite symptohmPE, which seems to cause such an error...

Yesterday I tried shifting the code to VstPluginMain, but having hosts scan hundreds of these loader dlls which load plugin dlls in VSTPluginMain had strange results, hosts unable to scan all dlls, really weird. It worked when dragndropping loader dlls to vsthost, but not when hosts scan hundreds of dlls...

So I put back the loadlibrary code to dllmain and it worked flawlessly again, despite symptohmPE. There seems to be no workaround with this dirty concept.

Another concept would be to really implement something like a minihost, which I wanted to not do, due to performance (and, being a c++/vst sdk noob, work) reasons...

Post

FYI, I managed to redesign the code, so that Plugins now get loaded withion VSTPluginMain, no more in DLLMain.

Also, I implemented a audioMaster Callback and now intercept the GetDirectory opcode.

This is weird:

Cubase 6.5.1 sends back the dll file path and name (!)

now, nothing more to say about the inventor of the VST sdk ;)

other hosts send back the correct path of the dll, and again others send back NULL.

However, even when intercepting this opcode and sending back the parent dir of the actual plugin being loaded, Symptohm PE does not work.

I now always send NULL in GetDirectory and now Symptohm PE works also.

A plugin never must rely on a proper path being send via opcode GetDirectory, as some hosts don't send anything, other hosts sent a filename/path...

At least, not it's working

Post Reply

Return to “DSP and Plugin Development”