THYROModuleManager
Overview
The THYROModuleManager is a subclass of THYModuleManager that can be used with Remoting SDK components. This class allows you to hook up message and channel components that can later be accessed from plugins.
Please refer to this article to get more information about using THYROModuleManager.
Use Cases
Use THYROModuleManager when you need to centralize your RO SDK management. With this class you can easiliy configure your client components only once in a host application and then pass it to plugins that needs access to remote services.
To see this in action you can take a look at the Remoting SDK Client sample that is shipped with Hydra.
Location
- Unit: Hydra.RO.VCL.ModuleManager.pas
- Ancestry: TComponent | THYBaseModuleManager | THYModuleManager | THYROModuleManager
AutoLoad (declared in THYBaseModuleManager)
Gets or sets value that indicates whether module manager will automaticaly load plugin modules from ModulesToLoad
list.
property AutoLoad: Boolean read write
AutoLoading (declared in THYBaseModuleManager)
Gets value that indicates whether module manager performing auto-load operation at the moment.
property AutoLoading: Boolean read
ClientID
Gets client identifier.
property ClientID: TGUID read
ComModuleCreator protected override (declared in THYModuleManager)
Creates COM module
function ComModuleCreator(const aGuid: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aGuid: guid
- aDefaultDomain: ignored
CreateInstance (string, IInterface) override (declared in THYModuleManager)
Creates a new instance of the plugin with specified name.
procedure CreateInstance(const aPluginName: string; out anInstance: IInterface)
Parameters:
- aPluginName: Name of the plugin instance.
- anInstance: Pointer to the new instance of the plugin.
CreateInstance (string): IInterface overload (declared in THYBaseModuleManager)
Creates a new instance of the plugin with specified name.
function CreateInstance(const PluginName: string): IInterface
Parameters:
- PluginName: Name of the plugin instance.
CreateInstance (string, IInterface) overload virtual abstract (declared in THYBaseModuleManager)
Creates a new instance of the plugin with specified name.
procedure CreateInstance(const PluginName: string; out anInstance: IInterface)
Parameters:
- PluginName: Name of the plugin instance.
- anInstance: Pointer to the new instance of the plugin.
CreateManagedPlugin (declared in THYModuleManager)
Creates a new instance of the managed plugin with specified name. Deprecated.
procedure CreateManagedPlugin(const aPluginName: string; out anInstance: OleVariant)
Parameters:
- aPluginName: Name of the plugin instance.
- anInstance: Pointer to the new instance of the plugin.
CreateNonVisualPlugin (declared in THYModuleManager)
Creates a new instance of the non-visual plugin with specified name. This method will automatically case new instance to a IHYVCLNonVisualPlugin.
procedure CreateNonVisualPlugin(const aPluginName: string; out anInstance: IHYVCLNonVisualPlugin)
Parameters:
- aPluginName: Name of the plugin instance.
- anInstance: Pointer to the new instance of the plugin.
CreateVisualPlugin (declared in THYModuleManager)
Creates a new instance of the visual plugin with specified name. This method will automatically case new instance to a IHYVCLVisualPlugin.
procedure CreateVisualPlugin(const aPluginName: string; out anInstance: IHYVCLVisualPlugin; aParentControl: TWinControl)
Parameters:
- aPluginName: Name of the plugin instance.
- anInstance: Pointer to the new instance of the plugin.
- aParentControl: Control that wil lbe used to display plugin content. Can be nil.
CreateWrapper protected override (declared in THYModuleManager)
Creates a new instance of the Delphi plugin wrapper from cross-paltform plugin instance.
function CreateWrapper(aPlugin: IDispatch; aDescriptor: THYPluginDescriptor): IInterface
Parameters:
- aPlugin: Cross-platform plugin instance
- aDescriptor: Plugin descriptor
CustomImplementer (declared in THYBaseModuleManager)
Gets or sets reference to a object that will receive QueryInterface
calls if module manager unable to process them.
property CustomImplementer: IInterface read write
EnforceActionsSecurity (TActionList) overload (declared in THYModuleManager)
Checks privilages of each action in the specified action list and changes actions state.
procedure EnforceActionsSecurity(const anActionList: TActionList)
Parameters:
- anActionList: Reference to the action list that holds THYHydraAction items.
EnforceActionsSecurity (IHYVCLPlugin) overload (declared in THYModuleManager)
Checks privilages of actions from action list of the specified plugin and changes actions state.
procedure EnforceActionsSecurity(const aPlugin: IHYVCLPlugin)
Parameters:
- aPlugin: Reference to a plugin instance.
EnforceSecurity (declared in THYBaseModuleManager)
Gets or sets value that indicates whether module manager will perform security checks when it creates a new instance of the plugin.
property EnforceSecurity: Boolean read write
Factories protected (declared in THYModuleManager)
Gets reference to the plugin factory with specified idex.
property Factories[Index: Integer]: THYBasePluginFactory read
FactoryByName protected (declared in THYModuleManager)
Searches for a plugin factory with given name. If factory can not be found throws EHYException.
function FactoryByName(const aPluginName: string): THYBasePluginFactory
Parameters:
- aPluginName: Name of the plugin factory.
FactoryCount protected (declared in THYModuleManager)
Gets number of factories.
property FactoryCount: Integer read
FindFactory protected (declared in THYModuleManager)
Searches for a plugin factory with given name. If factory can not be found returns nil.
function FindFactory(const aPluginName: string): THYBasePluginFactory
Parameters:
- aPluginName: Name of the plugin factory.
FindModule (string): THYBaseModule (declared in THYBaseModuleManager)
Searches for a plugin module with given name. If module can not be found returns nil.
function FindModule(const aFileName: string): THYBaseModule
Parameters:
- aFileName: Path to the plugin module file.
FindModule (string): THYModule reintroduce (declared in THYModuleManager)
Searches for a plugin module with given name. If module can not be found returns nil.
function FindModule(const aFileName: string): THYModule
Parameters:
- aFileName:
FindPluginDescriptor (declared in THYModuleManager)
Searches for a plugin descriptor with given name. If descriptor can not be found returns nil.
function FindPluginDescriptor(const aPluginName: string): THYPluginDescriptor
Parameters:
- aPluginName: Name of the plugin.
FMXModuleCreator protected override (declared in THYModuleManager)
Creates FMX module
function FMXModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: ignored
GetForm protected (declared in THYModuleManager)
Returns reference to a parent form.
function GetForm: TForm
GetHostParameters protected (declared in THYModuleManager)
Returns a list of host-defined parameters.
function GetHostParameters: TStrings
GetInstances protected (declared in THYModuleManager)
Returns a reference to a plugin instance with specified index.
function GetInstances(Index: Integer): IHYVCLPlugin
Parameters:
- Index: Index of the instance.
GetMenuController protected (declared in THYModuleManager)
Returns reference to the associated menu controller.
function GetMenuController: IHYVCLMenuController
GetModuleFileNames (declared in THYBaseModuleManager)
Seaches for files with specified search pattern and fills aList
with file names.
function GetModuleFileNames(aList: TStrings; const aSearchPath: string): Integer
Parameters:
- aList: List that will be filled with file names.
- aSearchPath: Search pattern. For example
*.dll
.
GetToolbarController protected (declared in THYModuleManager)
Returns reference to the associated toolbar controller.
function GetToolbarController: IHYVCLToolbarController
HasPrivilege virtual (declared in THYBaseModuleManager)
Checks whether specified privilages is supported by this application. This method will use associated UserProfile
or (if its not available) will trigger a OnPrivilageCheck
event.
function HasPrivilege(const aPrivilege: string): Boolean
Parameters:
- aPrivilege: User defined privilage.
HostParameters (declared in THYModuleManager)
Gets or sets the list of host-defined parameters.
property HostParameters: TStrings read write
InstanceCount (declared in THYModuleManager)
Gets number of plugin instance that was created by module manager.
property InstanceCount: Integer read
Instances (declared in THYModuleManager)
Gets a reference to a plugin instance with specified index.
property Instances[Index: Integer]: IHYVCLPlugin read
JavaModuleCreator protected override (declared in THYModuleManager)
Creates Java module
function JavaModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: ignored
LoadComModule (declared in THYBaseModuleManager)
Loads COM module
function LoadComModule(const aGuid: string): Integer
Parameters:
- aGuid: guid
LoadJavaModule (declared in THYBaseModuleManager)
Loads Java module
function LoadJavaModule(const aFileName: string): Integer
Parameters:
- aFileName: Path to the plugin module.
LoadManagedModule (string, THYClrDomain): Integer overload (declared in THYBaseModuleManager)
Loads managed module
function LoadManagedModule(const aFileName: string; const aDefaultDomain: THYClrDomain): Integer
Parameters:
- aFileName: Path to the plugin module.
- aDefaultDomain: Defines default domain.
LoadManagedModule (string, Boolean): Integer overload (declared in THYBaseModuleManager)
Loads managed module
function LoadManagedModule(const aFileName: string; const InNewAppDomain: Boolean): Integer
Parameters:
- aFileName: Path to the plugin module.
- InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain.
LoadModule (string, THYClrDomain): Integer overload (declared in THYBaseModuleManager)
Loads a plugin module with specified path, type of the plugin will be detected automatically.
function LoadModule(const aFileName: string; const aDefaultDomain: THYClrDomain): Integer
Parameters:
- aFileName: Path to the plugin module.
- aDefaultDomain: Defines default domain. Affects only managed plugin modules.
LoadModule (string, Boolean): Integer overload (declared in THYBaseModuleManager)
Loads a plugin module with specified path, type of the plugin will be detected automatically.
function LoadModule(const aFileName: string; const InNewAppDomain: Boolean): Integer
Parameters:
- aFileName: Path to the plugin module.
- InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
LoadModules (THYClrDomain) overload (declared in THYBaseModuleManager)
Loads all plugin modules from the ModulesToLoad
list, type of the plugins will be detected automatically.
procedure LoadModules(const aDefaultDomain: THYClrDomain)
Parameters:
- aDefaultDomain: Defines default domain. Affects only managed plugin modules.
LoadModules (array of string, THYClrDomain) overload (declared in THYBaseModuleManager)
Loads all plugin modules from the ModulesToLoad
list, type of the plugins will be detected automatically.
procedure LoadModules(const aFileNames: array of string; const aDefaultDomain: THYClrDomain)
Parameters:
- aFileNames: Array of strings that holds file pathes.
- aDefaultDomain: Defines default domain. Affects only managed plugin modules.
LoadModules (array of string, Boolean) overload (declared in THYBaseModuleManager)
Loads all plugin modules that fits into specified search pattern, type of the plugins will be detected automatically.
procedure LoadModules(const aFileNames: array of string; const InNewAppDomain: Boolean)
Parameters:
- aFileNames: Search pattern. For example
*.dll
. - InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
LoadModules (TStrings, THYClrDomain) overload (declared in THYBaseModuleManager)
Loads all plugin modules from the ModulesToLoad
list, type of the plugins will be detected automatically.
procedure LoadModules(const aFileNames: TStrings; const aDefaultDomain: THYClrDomain)
Parameters:
- aFileNames: List of strings that holds file pathes.
- aDefaultDomain: Defines default domain. Affects only managed plugin modules.
LoadModules (TStrings, Boolean) overload (declared in THYBaseModuleManager)
Loads all plugin modules that fits into specified search pattern, type of the plugins will be detected automatically.
procedure LoadModules(const aFileNames: TStrings; const InNewAppDomain: Boolean)
Parameters:
- aFileNames: Search pattern. For example
*.dll
. - InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
LoadModules (string, THYClrDomain): Integer overload (declared in THYBaseModuleManager)
Loads all plugin modules from the ModulesToLoad
list, type of the plugins will be detected automatically.
function LoadModules(const aSearchPath: string; const aDefaultDomain: THYClrDomain): Integer
Parameters:
- aSearchPath: Search pattern. For example
*.dll
. - aDefaultDomain: Defines default domain. Affects only managed plugin modules.
LoadModules (string, Boolean): Integer overload (declared in THYBaseModuleManager)
Loads all plugin modules that fits into specified search pattern, type of the plugins will be detected automatically.
function LoadModules(const aSearchPath: string; const InNewAppDomain: Boolean): Integer
Parameters:
- aSearchPath: Search pattern. For example
*.dll
. - InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
LoadModules (Boolean) overload (declared in THYBaseModuleManager)
Loads all plugin modules from the ModulesToLoad
list, type of the plugins will be detected automatically.
procedure LoadModules(const InNewAppDomain: Boolean)
Parameters:
- InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
LoadSilverlightModule (declared in THYBaseModuleManager)
Loads Silverlight module
function LoadSilverlightModule(const aFileName: string): Integer
Parameters:
- aFileName: Path to the plugin module.
LoadUnmanagedCrossPlatformModule (declared in THYBaseModuleManager)
Loads unmanaged crossplatform module
function LoadUnmanagedCrossPlatformModule(const aFileName: string): Integer
Parameters:
- aFileName: Path to the plugin module.
LoadUnmanagedModule (declared in THYBaseModuleManager)
Loads unmanaged module
function LoadUnmanagedModule(const aFileName: string): Integer
Parameters:
- aFileName: Path to the plugin module.
LoadVCLModule (declared in THYModuleManager)
Loads a Delphi VCL plugin or unmanaged cross-platform plugin module with specified path.
function LoadVCLModule(const aFileName: string): Integer
Parameters:
- aFileName: Path to the plugin module.
ManagedModuleCreator protected override (declared in THYModuleManager)
Creates managed module
function ManagedModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: Defines default domain
MenuController (declared in THYModuleManager)
Gets or sets reference to the associated menu controller.
property MenuController: THYBaseMenuController read write
ModuleByFileName (string): THYBaseModule (declared in THYBaseModuleManager)
Searches for a plugin module with given file name. If module can not be found throws EHYException.
function ModuleByFileName(const aFileName: string): THYBaseModule
Parameters:
- aFileName: File name of the plugin module.
ModuleByFileName (string): THYModule reintroduce (declared in THYModuleManager)
Searches for a plugin module with given file name. If module can not be found throws EHYException.
function ModuleByFileName(const aFileName: string): THYModule
Parameters:
- aFileName:
ModuleByName (declared in THYModuleManager)
Searches for a plugin module with given name. If module can not be found throws EHYException.
function ModuleByName(const aName: string): THYModule
Parameters:
- aName: Name of the plugin module.
ModuleCount (declared in THYBaseModuleManager)
Gets number of the loaded plugin modules.
property ModuleCount: Integer read
Modules (declared in THYBaseModuleManager)
Gets reference to a plugin module with specified index.
property Modules[Index: Integer]: THYBaseModule read
Modules (declared in THYModuleManager)
Gets reference to a plugin module with specified index.
property Modules[Index: Integer]: THYModule read
ModulesToLoad (declared in THYBaseModuleManager)
List that holds pathes to plugin modules. This list can be used by AutoLoad
feature or by calling LoadModules
method.
property ModulesToLoad: TStrings read write
OnAfterCreateInstance (declared in THYModuleManager)
Gets or sets event handler that is fired after new plugin instance is created.
property OnAfterCreateInstance: THYAfterCreateInstanceEvent read write
delegate: procedure OnAfterCreateInstance(Sender: THYModuleManager; const aPluginName: string; const anInstance: IInterface)
OnAfterLoadModule (declared in THYModuleManager)
Gets or sets event handler that fired after plugin module was loaded.
property OnAfterLoadModule: THYLoadedModuleEvent read write
delegate: procedure OnAfterLoadModule(Sender: THYModuleManager; aModule: THYModule)
OnAfterUnloadModule (declared in THYModuleManager)
Gets or sets event handler that fired after plugin module was unloaded.
property OnAfterUnloadModule: THYUnloadingModuleEvent read write
delegate: procedure OnAfterUnloadModule(Sender: THYModuleManager; const aFileName: string)
OnBeforeCreateInstance (declared in THYModuleManager)
Gets or sets event handler that is fired before new plugin instance is created.
property OnBeforeCreateInstance: THYBeforeCreateInstanceEvent read write
delegate: procedure OnBeforeCreateInstance(Sender: THYModuleManager; const aPluginName: string)
OnBeforeLoadModule (declared in THYModuleManager)
Gets or sets event handler that fired before plugin module is loaded.
property OnBeforeLoadModule: THYLoadingModuleEvent read write
delegate: procedure OnBeforeLoadModule(Sender: THYModuleManager; const aFileName: string; var Continue: Boolean)
OnBeforeUnloadModule (declared in THYModuleManager)
Gets or sets event handler that fired before plugin module is loaded.
property OnBeforeUnloadModule: THYLoadedModuleEvent read write
delegate: procedure OnBeforeUnloadModule(Sender: THYModuleManager; aModule: THYModule)
OnGetAutomationObject (declared in THYModuleManager)
Gets or sets event handler that fired whenever Silverlight plugin requests for an instance of an object. Plese refer to this article for more information.
property OnGetAutomationObject: THYGetAutomationObjectEvent read write
delegate: procedure OnGetAutomationObject(Sender: THYModuleManager; const ProgId: string; const Flags: THYGetAutomationObjectFlags; var Disp: IDispatch)
OnGetHostForm (declared in THYModuleManager)
Gets or sets event handler that is triggered whenever plugin requests for a host parent form.
property OnGetHostForm: THYGetHostFormEvent read write
delegate: procedure OnGetHostForm(Sender: THYModuleManager; var Form: TForm)
OnLoadModuleError (declared in THYModuleManager)
Gets or sets event handler that is triggered when error occurs while plugin module being loaded.
property OnLoadModuleError: THYLoadModuleErrorEvent read write
delegate: procedure OnLoadModuleError(Sender: THYModuleManager; anError: Exception; var RaiseException: Boolean)
OnNotifySilverlightError (declared in THYModuleManager)
Gets or sets event handler that is triggered whenever error occurs in Silverlight plugin.
property OnNotifySilverlightError: THYNotifySilverlightErrorEvent read write
delegate: procedure OnNotifySilverlightError(Sender: THYModuleManager; const Error: string; const Source: string; const Line: Integer; const Column: Integer)
OnPluginMessage (declared in THYModuleManager)
Gets or sets event handler that fired when plugin sends message to a host. Deprecated.
property OnPluginMessage: THYPluginMessageEvent read write
delegate: procedure OnPluginMessage(const Sender: IHYVCLPlugin; aMessageID: Integer; const aMessageData: Pointer)
OnPrivilegeCheck (declared in THYModuleManager)
Gets or sets event handler that fired whenever privilage check is performed.
property OnPrivilegeCheck: THYCustomPrivilegeCheckEvent read write
delegate: procedure OnPrivilegeCheck(Sender: THYModuleManager; const aPrivilege: string; var HasPrivilege: Boolean)
PluginDescriptorByName (declared in THYModuleManager)
Searches for a plugin descriptor with given name. If descriptor can not be found throws EHYException.
function PluginDescriptorByName(const aPluginName: string): THYPluginDescriptor
Parameters:
- aPluginName: Name of the plugin descriptor.
PluginDescriptorCount (declared in THYModuleManager)
Gets number of the loaded plugin descriptors.
property PluginDescriptorCount: Integer read
PluginDescriptors (declared in THYModuleManager)
The reference to a plugin descriptor with specified index.
property PluginDescriptors[Index: Integer]: THYPluginDescriptor read
PluginInstanceCount (declared in THYModuleManager)
Gets the number of instances created from specified plugin module.
property PluginInstanceCount[aModule: THYModule]: Integer read
QueryInterface protected reintroduce stdcall (declared in THYBaseModuleManager)
function QueryInterface(const IID: TGUID; out Obj: ): HResult
Parameters:
- IID:
- Obj:
ReleaseInstance (declared in THYModuleManager)
Releases a specififed instance of the plugin.
procedure ReleaseInstance(var anInstance: )
Parameters:
- anInstance: Reference to a plugin instance.
ResolveInterfacesToOwner (declared in THYBaseModuleManager)
Gets or sets value which is used to indicate whether module manager will try to resolve interfaces from its owner or from CustomImplementer
.
property ResolveInterfacesToOwner: Boolean read write
ROChannel
Gets or sets reference to a channel component.
property ROChannel: TROTransportChannel read write
ROMessage
Gets or sets reference to a message component.
property ROMessage: TROMessage read write
SendMessage protected (declared in THYModuleManager)
Receives message from a plugin instance and triggers OnPluginMessage
event handler. Deprecated.
procedure SendMessage(const Sender: IHYVCLPlugin; aMessageID: Integer; const aMessageData: Pointer)
Parameters:
- Sender: Reference to an instance of a plugin which sends the message.
- aMessageID: Custom message identifier.
- aMessageData: Pointer to a custom message data.
SetHostParameters protected (declared in THYModuleManager)
Assigns specified string list to a host parameters list.
procedure SetHostParameters(Value: TStrings)
Parameters:
- Value: Reference to a string list.
SilverlightModuleCreator protected override (declared in THYModuleManager)
Creates Silverlight module
function SilverlightModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: ignored
ToolbarController (declared in THYModuleManager)
Gets or sets reference to a toolbar controller.
property ToolbarController: THYBaseToolbarController read write
TryLoadModule (string, THYClrDomain): Integer overload (declared in THYBaseModuleManager)
Loads a plugin module with specified path, type of the plugin will be detected automatically. If succeeds returns index of the module otherwise -1.
function TryLoadModule(const aFileName: string; const aDefaultDomain: THYClrDomain): Integer
Parameters:
- aFileName: Path to the plugin module.
- aDefaultDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
TryLoadModule (string, Boolean): Integer overload (declared in THYBaseModuleManager)
Loads a plugin module with specified path, type of the plugin will be detected automatically. If succeeds returns index of the module otherwise -1.
function TryLoadModule(const aFileName: string; const InNewAppDomain: Boolean): Integer
Parameters:
- aFileName: Path to the plugin module.
- InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
UnloadModule (THYBaseModule) override (declared in THYModuleManager)
Unloads specific plugin module
procedure UnloadModule(aModule: THYBaseModule)
Parameters:
- aModule: The plugin module
UnloadModule (Integer) overload (declared in THYBaseModuleManager)
Unloads plugin module with specified index.
procedure UnloadModule(Index: Integer)
Parameters:
- Index: Index of the plugin module.
UnloadModule (string) overload (declared in THYBaseModuleManager)
Unloads plugin module with specified file name.
procedure UnloadModule(const aFileName: string)
Parameters:
- aFileName: Index of the plugin module.
UnloadModules (declared in THYBaseModuleManager)
Unloads all plugin modules.
procedure UnloadModules
UnmanagedCrossPlatformModuleCreator protected override (declared in THYModuleManager)
Creates unmanaged cross platform module
function UnmanagedCrossPlatformModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: ignored
UserProfile (declared in THYModuleManager)
Gets or sets reference to the user profile.
property UserProfile: THYUserProfile read write
VCLModuleCreator protected override (declared in THYModuleManager)
Creates VCL module
function VCLModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: ignored
AutoLoad (declared in THYBaseModuleManager)
Gets or sets value that indicates whether module manager will automaticaly load plugin modules from ModulesToLoad
list.
property AutoLoad: Boolean read write
AutoLoading (declared in THYBaseModuleManager)
Gets value that indicates whether module manager performing auto-load operation at the moment.
property AutoLoading: Boolean read
ClientID
Gets client identifier.
property ClientID: TGUID read
CustomImplementer (declared in THYBaseModuleManager)
Gets or sets reference to a object that will receive QueryInterface
calls if module manager unable to process them.
property CustomImplementer: IInterface read write
EnforceSecurity (declared in THYBaseModuleManager)
Gets or sets value that indicates whether module manager will perform security checks when it creates a new instance of the plugin.
property EnforceSecurity: Boolean read write
Factories protected (declared in THYModuleManager)
Gets reference to the plugin factory with specified idex.
property Factories[Index: Integer]: THYBasePluginFactory read
FactoryCount protected (declared in THYModuleManager)
Gets number of factories.
property FactoryCount: Integer read
HostParameters (declared in THYModuleManager)
Gets or sets the list of host-defined parameters.
property HostParameters: TStrings read write
InstanceCount (declared in THYModuleManager)
Gets number of plugin instance that was created by module manager.
property InstanceCount: Integer read
Instances (declared in THYModuleManager)
Gets a reference to a plugin instance with specified index.
property Instances[Index: Integer]: IHYVCLPlugin read
MenuController (declared in THYModuleManager)
Gets or sets reference to the associated menu controller.
property MenuController: THYBaseMenuController read write
ModuleCount (declared in THYBaseModuleManager)
Gets number of the loaded plugin modules.
property ModuleCount: Integer read
Modules (declared in THYBaseModuleManager)
Gets reference to a plugin module with specified index.
property Modules[Index: Integer]: THYBaseModule read
Modules (declared in THYModuleManager)
Gets reference to a plugin module with specified index.
property Modules[Index: Integer]: THYModule read
ModulesToLoad (declared in THYBaseModuleManager)
List that holds pathes to plugin modules. This list can be used by AutoLoad
feature or by calling LoadModules
method.
property ModulesToLoad: TStrings read write
PluginDescriptorCount (declared in THYModuleManager)
Gets number of the loaded plugin descriptors.
property PluginDescriptorCount: Integer read
PluginDescriptors (declared in THYModuleManager)
The reference to a plugin descriptor with specified index.
property PluginDescriptors[Index: Integer]: THYPluginDescriptor read
PluginInstanceCount (declared in THYModuleManager)
Gets the number of instances created from specified plugin module.
property PluginInstanceCount[aModule: THYModule]: Integer read
ResolveInterfacesToOwner (declared in THYBaseModuleManager)
Gets or sets value which is used to indicate whether module manager will try to resolve interfaces from its owner or from CustomImplementer
.
property ResolveInterfacesToOwner: Boolean read write
ROChannel
Gets or sets reference to a channel component.
property ROChannel: TROTransportChannel read write
ROMessage
Gets or sets reference to a message component.
property ROMessage: TROMessage read write
ToolbarController (declared in THYModuleManager)
Gets or sets reference to a toolbar controller.
property ToolbarController: THYBaseToolbarController read write
UserProfile (declared in THYModuleManager)
Gets or sets reference to the user profile.
property UserProfile: THYUserProfile read write
ComModuleCreator protected override (declared in THYModuleManager)
Creates COM module
function ComModuleCreator(const aGuid: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aGuid: guid
- aDefaultDomain: ignored
CreateInstance (string, IInterface) override (declared in THYModuleManager)
Creates a new instance of the plugin with specified name.
procedure CreateInstance(const aPluginName: string; out anInstance: IInterface)
Parameters:
- aPluginName: Name of the plugin instance.
- anInstance: Pointer to the new instance of the plugin.
CreateInstance (string): IInterface overload (declared in THYBaseModuleManager)
Creates a new instance of the plugin with specified name.
function CreateInstance(const PluginName: string): IInterface
Parameters:
- PluginName: Name of the plugin instance.
CreateInstance (string, IInterface) overload virtual abstract (declared in THYBaseModuleManager)
Creates a new instance of the plugin with specified name.
procedure CreateInstance(const PluginName: string; out anInstance: IInterface)
Parameters:
- PluginName: Name of the plugin instance.
- anInstance: Pointer to the new instance of the plugin.
CreateManagedPlugin (declared in THYModuleManager)
Creates a new instance of the managed plugin with specified name. Deprecated.
procedure CreateManagedPlugin(const aPluginName: string; out anInstance: OleVariant)
Parameters:
- aPluginName: Name of the plugin instance.
- anInstance: Pointer to the new instance of the plugin.
CreateNonVisualPlugin (declared in THYModuleManager)
Creates a new instance of the non-visual plugin with specified name. This method will automatically case new instance to a IHYVCLNonVisualPlugin.
procedure CreateNonVisualPlugin(const aPluginName: string; out anInstance: IHYVCLNonVisualPlugin)
Parameters:
- aPluginName: Name of the plugin instance.
- anInstance: Pointer to the new instance of the plugin.
CreateVisualPlugin (declared in THYModuleManager)
Creates a new instance of the visual plugin with specified name. This method will automatically case new instance to a IHYVCLVisualPlugin.
procedure CreateVisualPlugin(const aPluginName: string; out anInstance: IHYVCLVisualPlugin; aParentControl: TWinControl)
Parameters:
- aPluginName: Name of the plugin instance.
- anInstance: Pointer to the new instance of the plugin.
- aParentControl: Control that wil lbe used to display plugin content. Can be nil.
CreateWrapper protected override (declared in THYModuleManager)
Creates a new instance of the Delphi plugin wrapper from cross-paltform plugin instance.
function CreateWrapper(aPlugin: IDispatch; aDescriptor: THYPluginDescriptor): IInterface
Parameters:
- aPlugin: Cross-platform plugin instance
- aDescriptor: Plugin descriptor
EnforceActionsSecurity (TActionList) overload (declared in THYModuleManager)
Checks privilages of each action in the specified action list and changes actions state.
procedure EnforceActionsSecurity(const anActionList: TActionList)
Parameters:
- anActionList: Reference to the action list that holds THYHydraAction items.
EnforceActionsSecurity (IHYVCLPlugin) overload (declared in THYModuleManager)
Checks privilages of actions from action list of the specified plugin and changes actions state.
procedure EnforceActionsSecurity(const aPlugin: IHYVCLPlugin)
Parameters:
- aPlugin: Reference to a plugin instance.
FactoryByName protected (declared in THYModuleManager)
Searches for a plugin factory with given name. If factory can not be found throws EHYException.
function FactoryByName(const aPluginName: string): THYBasePluginFactory
Parameters:
- aPluginName: Name of the plugin factory.
FindFactory protected (declared in THYModuleManager)
Searches for a plugin factory with given name. If factory can not be found returns nil.
function FindFactory(const aPluginName: string): THYBasePluginFactory
Parameters:
- aPluginName: Name of the plugin factory.
FindModule (string): THYBaseModule (declared in THYBaseModuleManager)
Searches for a plugin module with given name. If module can not be found returns nil.
function FindModule(const aFileName: string): THYBaseModule
Parameters:
- aFileName: Path to the plugin module file.
FindModule (string): THYModule reintroduce (declared in THYModuleManager)
Searches for a plugin module with given name. If module can not be found returns nil.
function FindModule(const aFileName: string): THYModule
Parameters:
- aFileName:
FindPluginDescriptor (declared in THYModuleManager)
Searches for a plugin descriptor with given name. If descriptor can not be found returns nil.
function FindPluginDescriptor(const aPluginName: string): THYPluginDescriptor
Parameters:
- aPluginName: Name of the plugin.
FMXModuleCreator protected override (declared in THYModuleManager)
Creates FMX module
function FMXModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: ignored
GetForm protected (declared in THYModuleManager)
Returns reference to a parent form.
function GetForm: TForm
GetHostParameters protected (declared in THYModuleManager)
Returns a list of host-defined parameters.
function GetHostParameters: TStrings
GetInstances protected (declared in THYModuleManager)
Returns a reference to a plugin instance with specified index.
function GetInstances(Index: Integer): IHYVCLPlugin
Parameters:
- Index: Index of the instance.
GetMenuController protected (declared in THYModuleManager)
Returns reference to the associated menu controller.
function GetMenuController: IHYVCLMenuController
GetModuleFileNames (declared in THYBaseModuleManager)
Seaches for files with specified search pattern and fills aList
with file names.
function GetModuleFileNames(aList: TStrings; const aSearchPath: string): Integer
Parameters:
- aList: List that will be filled with file names.
- aSearchPath: Search pattern. For example
*.dll
.
GetToolbarController protected (declared in THYModuleManager)
Returns reference to the associated toolbar controller.
function GetToolbarController: IHYVCLToolbarController
HasPrivilege virtual (declared in THYBaseModuleManager)
Checks whether specified privilages is supported by this application. This method will use associated UserProfile
or (if its not available) will trigger a OnPrivilageCheck
event.
function HasPrivilege(const aPrivilege: string): Boolean
Parameters:
- aPrivilege: User defined privilage.
JavaModuleCreator protected override (declared in THYModuleManager)
Creates Java module
function JavaModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: ignored
LoadComModule (declared in THYBaseModuleManager)
Loads COM module
function LoadComModule(const aGuid: string): Integer
Parameters:
- aGuid: guid
LoadJavaModule (declared in THYBaseModuleManager)
Loads Java module
function LoadJavaModule(const aFileName: string): Integer
Parameters:
- aFileName: Path to the plugin module.
LoadManagedModule (string, THYClrDomain): Integer overload (declared in THYBaseModuleManager)
Loads managed module
function LoadManagedModule(const aFileName: string; const aDefaultDomain: THYClrDomain): Integer
Parameters:
- aFileName: Path to the plugin module.
- aDefaultDomain: Defines default domain.
LoadManagedModule (string, Boolean): Integer overload (declared in THYBaseModuleManager)
Loads managed module
function LoadManagedModule(const aFileName: string; const InNewAppDomain: Boolean): Integer
Parameters:
- aFileName: Path to the plugin module.
- InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain.
LoadModule (string, THYClrDomain): Integer overload (declared in THYBaseModuleManager)
Loads a plugin module with specified path, type of the plugin will be detected automatically.
function LoadModule(const aFileName: string; const aDefaultDomain: THYClrDomain): Integer
Parameters:
- aFileName: Path to the plugin module.
- aDefaultDomain: Defines default domain. Affects only managed plugin modules.
LoadModule (string, Boolean): Integer overload (declared in THYBaseModuleManager)
Loads a plugin module with specified path, type of the plugin will be detected automatically.
function LoadModule(const aFileName: string; const InNewAppDomain: Boolean): Integer
Parameters:
- aFileName: Path to the plugin module.
- InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
LoadModules (THYClrDomain) overload (declared in THYBaseModuleManager)
Loads all plugin modules from the ModulesToLoad
list, type of the plugins will be detected automatically.
procedure LoadModules(const aDefaultDomain: THYClrDomain)
Parameters:
- aDefaultDomain: Defines default domain. Affects only managed plugin modules.
LoadModules (array of string, THYClrDomain) overload (declared in THYBaseModuleManager)
Loads all plugin modules from the ModulesToLoad
list, type of the plugins will be detected automatically.
procedure LoadModules(const aFileNames: array of string; const aDefaultDomain: THYClrDomain)
Parameters:
- aFileNames: Array of strings that holds file pathes.
- aDefaultDomain: Defines default domain. Affects only managed plugin modules.
LoadModules (array of string, Boolean) overload (declared in THYBaseModuleManager)
Loads all plugin modules that fits into specified search pattern, type of the plugins will be detected automatically.
procedure LoadModules(const aFileNames: array of string; const InNewAppDomain: Boolean)
Parameters:
- aFileNames: Search pattern. For example
*.dll
. - InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
LoadModules (TStrings, THYClrDomain) overload (declared in THYBaseModuleManager)
Loads all plugin modules from the ModulesToLoad
list, type of the plugins will be detected automatically.
procedure LoadModules(const aFileNames: TStrings; const aDefaultDomain: THYClrDomain)
Parameters:
- aFileNames: List of strings that holds file pathes.
- aDefaultDomain: Defines default domain. Affects only managed plugin modules.
LoadModules (TStrings, Boolean) overload (declared in THYBaseModuleManager)
Loads all plugin modules that fits into specified search pattern, type of the plugins will be detected automatically.
procedure LoadModules(const aFileNames: TStrings; const InNewAppDomain: Boolean)
Parameters:
- aFileNames: Search pattern. For example
*.dll
. - InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
LoadModules (string, THYClrDomain): Integer overload (declared in THYBaseModuleManager)
Loads all plugin modules from the ModulesToLoad
list, type of the plugins will be detected automatically.
function LoadModules(const aSearchPath: string; const aDefaultDomain: THYClrDomain): Integer
Parameters:
- aSearchPath: Search pattern. For example
*.dll
. - aDefaultDomain: Defines default domain. Affects only managed plugin modules.
LoadModules (string, Boolean): Integer overload (declared in THYBaseModuleManager)
Loads all plugin modules that fits into specified search pattern, type of the plugins will be detected automatically.
function LoadModules(const aSearchPath: string; const InNewAppDomain: Boolean): Integer
Parameters:
- aSearchPath: Search pattern. For example
*.dll
. - InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
LoadModules (Boolean) overload (declared in THYBaseModuleManager)
Loads all plugin modules from the ModulesToLoad
list, type of the plugins will be detected automatically.
procedure LoadModules(const InNewAppDomain: Boolean)
Parameters:
- InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
LoadSilverlightModule (declared in THYBaseModuleManager)
Loads Silverlight module
function LoadSilverlightModule(const aFileName: string): Integer
Parameters:
- aFileName: Path to the plugin module.
LoadUnmanagedCrossPlatformModule (declared in THYBaseModuleManager)
Loads unmanaged crossplatform module
function LoadUnmanagedCrossPlatformModule(const aFileName: string): Integer
Parameters:
- aFileName: Path to the plugin module.
LoadUnmanagedModule (declared in THYBaseModuleManager)
Loads unmanaged module
function LoadUnmanagedModule(const aFileName: string): Integer
Parameters:
- aFileName: Path to the plugin module.
LoadVCLModule (declared in THYModuleManager)
Loads a Delphi VCL plugin or unmanaged cross-platform plugin module with specified path.
function LoadVCLModule(const aFileName: string): Integer
Parameters:
- aFileName: Path to the plugin module.
ManagedModuleCreator protected override (declared in THYModuleManager)
Creates managed module
function ManagedModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: Defines default domain
ModuleByFileName (string): THYBaseModule (declared in THYBaseModuleManager)
Searches for a plugin module with given file name. If module can not be found throws EHYException.
function ModuleByFileName(const aFileName: string): THYBaseModule
Parameters:
- aFileName: File name of the plugin module.
ModuleByFileName (string): THYModule reintroduce (declared in THYModuleManager)
Searches for a plugin module with given file name. If module can not be found throws EHYException.
function ModuleByFileName(const aFileName: string): THYModule
Parameters:
- aFileName:
ModuleByName (declared in THYModuleManager)
Searches for a plugin module with given name. If module can not be found throws EHYException.
function ModuleByName(const aName: string): THYModule
Parameters:
- aName: Name of the plugin module.
PluginDescriptorByName (declared in THYModuleManager)
Searches for a plugin descriptor with given name. If descriptor can not be found throws EHYException.
function PluginDescriptorByName(const aPluginName: string): THYPluginDescriptor
Parameters:
- aPluginName: Name of the plugin descriptor.
QueryInterface protected reintroduce stdcall (declared in THYBaseModuleManager)
function QueryInterface(const IID: TGUID; out Obj: ): HResult
Parameters:
- IID:
- Obj:
ReleaseInstance (declared in THYModuleManager)
Releases a specififed instance of the plugin.
procedure ReleaseInstance(var anInstance: )
Parameters:
- anInstance: Reference to a plugin instance.
SendMessage protected (declared in THYModuleManager)
Receives message from a plugin instance and triggers OnPluginMessage
event handler. Deprecated.
procedure SendMessage(const Sender: IHYVCLPlugin; aMessageID: Integer; const aMessageData: Pointer)
Parameters:
- Sender: Reference to an instance of a plugin which sends the message.
- aMessageID: Custom message identifier.
- aMessageData: Pointer to a custom message data.
SetHostParameters protected (declared in THYModuleManager)
Assigns specified string list to a host parameters list.
procedure SetHostParameters(Value: TStrings)
Parameters:
- Value: Reference to a string list.
SilverlightModuleCreator protected override (declared in THYModuleManager)
Creates Silverlight module
function SilverlightModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: ignored
TryLoadModule (string, THYClrDomain): Integer overload (declared in THYBaseModuleManager)
Loads a plugin module with specified path, type of the plugin will be detected automatically. If succeeds returns index of the module otherwise -1.
function TryLoadModule(const aFileName: string; const aDefaultDomain: THYClrDomain): Integer
Parameters:
- aFileName: Path to the plugin module.
- aDefaultDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
TryLoadModule (string, Boolean): Integer overload (declared in THYBaseModuleManager)
Loads a plugin module with specified path, type of the plugin will be detected automatically. If succeeds returns index of the module otherwise -1.
function TryLoadModule(const aFileName: string; const InNewAppDomain: Boolean): Integer
Parameters:
- aFileName: Path to the plugin module.
- InNewAppDomain: Defines whether plugin module will be loaded in a separate AppDomain. Affects only managed plugin modules.
UnloadModule (THYBaseModule) override (declared in THYModuleManager)
Unloads specific plugin module
procedure UnloadModule(aModule: THYBaseModule)
Parameters:
- aModule: The plugin module
UnloadModule (Integer) overload (declared in THYBaseModuleManager)
Unloads plugin module with specified index.
procedure UnloadModule(Index: Integer)
Parameters:
- Index: Index of the plugin module.
UnloadModule (string) overload (declared in THYBaseModuleManager)
Unloads plugin module with specified file name.
procedure UnloadModule(const aFileName: string)
Parameters:
- aFileName: Index of the plugin module.
UnloadModules (declared in THYBaseModuleManager)
Unloads all plugin modules.
procedure UnloadModules
UnmanagedCrossPlatformModuleCreator protected override (declared in THYModuleManager)
Creates unmanaged cross platform module
function UnmanagedCrossPlatformModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: ignored
VCLModuleCreator protected override (declared in THYModuleManager)
Creates VCL module
function VCLModuleCreator(const aFileName: string; const aDefaultDomain: THYClrDomain): THYBaseModule
Parameters:
- aFileName: filename
- aDefaultDomain: ignored
OnAfterCreateInstance (declared in THYModuleManager)
Gets or sets event handler that is fired after new plugin instance is created.
property OnAfterCreateInstance: THYAfterCreateInstanceEvent read write
delegate: procedure OnAfterCreateInstance(Sender: THYModuleManager; const aPluginName: string; const anInstance: IInterface)
OnAfterLoadModule (declared in THYModuleManager)
Gets or sets event handler that fired after plugin module was loaded.
property OnAfterLoadModule: THYLoadedModuleEvent read write
delegate: procedure OnAfterLoadModule(Sender: THYModuleManager; aModule: THYModule)
OnAfterUnloadModule (declared in THYModuleManager)
Gets or sets event handler that fired after plugin module was unloaded.
property OnAfterUnloadModule: THYUnloadingModuleEvent read write
delegate: procedure OnAfterUnloadModule(Sender: THYModuleManager; const aFileName: string)
OnBeforeCreateInstance (declared in THYModuleManager)
Gets or sets event handler that is fired before new plugin instance is created.
property OnBeforeCreateInstance: THYBeforeCreateInstanceEvent read write
delegate: procedure OnBeforeCreateInstance(Sender: THYModuleManager; const aPluginName: string)
OnBeforeLoadModule (declared in THYModuleManager)
Gets or sets event handler that fired before plugin module is loaded.
property OnBeforeLoadModule: THYLoadingModuleEvent read write
delegate: procedure OnBeforeLoadModule(Sender: THYModuleManager; const aFileName: string; var Continue: Boolean)
OnBeforeUnloadModule (declared in THYModuleManager)
Gets or sets event handler that fired before plugin module is loaded.
property OnBeforeUnloadModule: THYLoadedModuleEvent read write
delegate: procedure OnBeforeUnloadModule(Sender: THYModuleManager; aModule: THYModule)
OnGetAutomationObject (declared in THYModuleManager)
Gets or sets event handler that fired whenever Silverlight plugin requests for an instance of an object. Plese refer to this article for more information.
property OnGetAutomationObject: THYGetAutomationObjectEvent read write
delegate: procedure OnGetAutomationObject(Sender: THYModuleManager; const ProgId: string; const Flags: THYGetAutomationObjectFlags; var Disp: IDispatch)
OnGetHostForm (declared in THYModuleManager)
Gets or sets event handler that is triggered whenever plugin requests for a host parent form.
property OnGetHostForm: THYGetHostFormEvent read write
delegate: procedure OnGetHostForm(Sender: THYModuleManager; var Form: TForm)
OnLoadModuleError (declared in THYModuleManager)
Gets or sets event handler that is triggered when error occurs while plugin module being loaded.
property OnLoadModuleError: THYLoadModuleErrorEvent read write
delegate: procedure OnLoadModuleError(Sender: THYModuleManager; anError: Exception; var RaiseException: Boolean)
OnNotifySilverlightError (declared in THYModuleManager)
Gets or sets event handler that is triggered whenever error occurs in Silverlight plugin.
property OnNotifySilverlightError: THYNotifySilverlightErrorEvent read write
delegate: procedure OnNotifySilverlightError(Sender: THYModuleManager; const Error: string; const Source: string; const Line: Integer; const Column: Integer)
OnPluginMessage (declared in THYModuleManager)
Gets or sets event handler that fired when plugin sends message to a host. Deprecated.
property OnPluginMessage: THYPluginMessageEvent read write
delegate: procedure OnPluginMessage(const Sender: IHYVCLPlugin; aMessageID: Integer; const aMessageData: Pointer)
OnPrivilegeCheck (declared in THYModuleManager)
Gets or sets event handler that fired whenever privilage check is performed.
property OnPrivilegeCheck: THYCustomPrivilegeCheckEvent read write
delegate: procedure OnPrivilegeCheck(Sender: THYModuleManager; const aPrivilege: string; var HasPrivilege: Boolean)