VST dll's internal details

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hiya,

i'm writing a preset management tool for tracktion, which incorporates a VST plugin database. One thing it does is scan the installed plugins directory for all the DLL files, and compare it to the imported presets to make sure that all the required plugins are installed.

However, if people rename their plugins, things won't be so straightforward. It would therefore be useful to access the plugin's own internal name/uid - but to do that i need to actually load the dll.

I don't wish to do ANY kind of audio processing; i literally just need to obtain the internal details. Can anyone suggest the minimum i would need to implement in order to retrieve such information.

I was told that by simply loading the DLL and asking for anything it may make a load of requests to my program. is this something i need to worry about? surely i don't need a load of useless code JUST to keep the dll happy?

any help would be appreciated.
Kick, punch, it's all in the mind.

Post

If you have access to the .NET Framework, you could use it to scan for the DLL in a directory. For more information, see at http://msdn.microsoft.com/

Post

The file name is definately in there. You can load the file into memory without actually executing any code in the dll.
I opened a plugin I wrote in a hex editor - and the file name (+ null termination) is in there right before the string 'main', followed by a load of zero padding.

Perhaps there are some magic numbers around that area that are used when dll's are loaded by the windows api?

Post

You basicly need to write a mini-host:

1) load the DLL
2) find the "main" function
3) call the main function (provide a audiomaster-callback function)

Then you can get a pointer to the VST plugin which has a unique "ID" (four bytes) stored within it's structure. These ID is also used in the presets, so you actually compare the presets ID to the plugins ID. This is the only reliable way I know.

Cheers,
Mike

Post

The main problem i'm having is in identifying which plugins are present in a system when importing RackFilters in Tracktion (kindof modular VST routing presets), but i've decided against loading the DLLs -it'll take too long for a process that won't actually be using them. Maybe in a future update of the program i will - and i'd certainly like to get a bulletproof DLL identification system involved, but i haven't even reached alpha stage yet ;) so i'll go with my workaround. Basically, i'll just tell the user that they haven't got it if it's not found, but they have the option of saying "yes i do, i've renamed it, it's this DLL file" and then the program's happy.

Thanks for your help though, when i take it further i'll take it all on board.
Kick, punch, it's all in the mind.

Post Reply

Return to “DSP and Plugin Development”