Nov 3, 2012 at 10:44 AM
Edited Nov 3, 2012 at 10:47 AM
I assume that you use the Framework..?
The Plugin (root) class Open() method receives a reference to the Host (IVstHost). If you use one of the Plugin base classes that will be stored in Host property.
That reference also implements the IExtensible interface which contains a method called GetInstance<T>().
To get a reference to any of the IVstHostXxxx interfaces use the GetInstance method on the Host reference. These host interfaces represent the supported features (functionality) of the host that is running your plugin. Also note that the Framework implements
all of the IVstHostXxxx interfaces and you should never have to (unless you go into deep customization - which is possible).
IVstHostSequencer hostSequencer = this.Host.GetInterface<IVstHostSequencer>();
if (hostSequencer != null)
// use the hostSequencer interface here.
It is good practice to check for null on the return value. The host might not support all features and to indicate that null can be returned (although most interface-requests will always return a valid reference).
Hope it helps.