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


Properties


Host

The reference to the plugin host interface.

property Host: IHYCrossPlatformHost read write