How to autodestroy a plug-in


#1

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,
Gabriel


#2

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.


#3

OK, thank you Jules
Gabriel


#4

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:

Gabriel


#5

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.

Chris


#6

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


#7

Thank you ckk, thank you Jules

Gabriel


#8

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


#9

Haha!
Hilarious!