IHYCrossPlatformPlugin
Overview
The IHYCrossPlatformPlugin is a base cross-platform plugin interface. This interface is an ancestor of all plugin interfaces that support cross-platform interaction. The Hydra framework uses the IHYCrossPlatformPlugin interface to define and manage plugins in a cross-platform environment.
In the Hydra framework, this interface is implemented by both managed and unmanaged plugins.
Use Case
Basically, you can use this interface to manage plugins inside your managed host. The following example shows how to load and run the plugin:
private IHYCrossPlatformPlugin fCurrentPlugin;
private void RunPlugin(string FileName, string InstanceName)
{
if (fCurrentPlugin != null)
{
pnl_Host.UnhostPlugin();
fCurrentPlugin = null;
}
LoadedModule Module = moduleManager1.LoadModule(FileName);
fCurrentPlugin = moduleManager1.CreateInstance(InstanceName);
pnl_Host.HostPlugin(fCurrentPlugin as IBasePlugin);
if (fCurrentPlugin is IHYCrossPlatformNonVisualPlugin)
(fCurrentPlugin as IHYCrossPlatformNonVisualPlugin).Start();
}
Location
- Reference: Hydra.fx
- Namespace: Hydra
- Platforms: Island
-
Ancestry:
- IDispatch | IHYCrossPlatformInterface | IHYCrossPlatformPlugin Island-Ubuntu
- __struct_IDispatch | IHYCrossPlatformInterface | IHYCrossPlatformPlugin Island-Windows
- IDispatch | IHYCrossPlatformInterface | IHYCrossPlatformPlugin Island-Ubuntu
Required Methods
get_Host stdcall
Gets the reference to the plugin host interface.
method get_Host(out aResult: IHYCrossPlatformHost): HRESULT
HRESULT get_Host(out IHYCrossPlatformHost aResult)
func get_Host(_ aResult: IHYCrossPlatformHost) -> HRESULT
Function get_Host(<OutAttribute> ByRef aResult As IHYCrossPlatformHost) As HRESULT
Parameters:
- aResult: result
set_Host stdcall
Sets the reference to the plugin host interface.
method set_Host(value: IHYCrossPlatformHost): HRESULT
HRESULT set_Host(IHYCrossPlatformHost value)
func set_Host(_ value: IHYCrossPlatformHost) -> HRESULT
Function set_Host(value As IHYCrossPlatformHost) As HRESULT
Parameters:
- value: host