How to autodestroy a plug-in


This is the scenario:

A host opens a plug-in. Such plug-in -i the constructor- checks the license and it is expired. How can the plug-in can autodestroy or tell to the host that is invalid?

Thank you,


It can’t.

Best thing to do in that case is to just not process any audio, and show a UI that explains that the plugin’s not valid.


OK, thank you Jules


Hi Again,

I have another question related with this post: If the license code that is hosted in audioprocessor constructor code does not allow to open its editor, how can I avoid the host open a generic UI editor?
AudioProcessor::hasEditor could help me?
If so, can I change the answer of this method dinamically in function of license authorization granting?

Thank you in advance (as usual :wink:



The generic UI is a fallback for plugins that don’t bring their own editor, so you can’t disable it. Quite a few hosts also allow to switch between generic and effect UI.
What you could do is return 0 in getNumParameters() resulting in the generic UI not showing any sliders.



Personally, I’d just stop it making any noise, and wouldn’t worry about the UI.


Thank you ckk, thank you Jules



You might consider using the GUI for some advertising. Remind the user to buy the stuff! They obviously just forgot.