TMGApplicationService
This component provides simple access to all loaded dll's and all defined interfaces.
Functions
function RegisterDll(DllPath:string):boolean; Registers the Dll specified in the DLLPath variable.
procedure UnRegisterdll(fdll : TMGIDllServicesIntf); Unregisters the Dll with the interface fDLL.
procedure NotifyClients(Proc,Event:string; value:variant); Sends an Event (Not a Delphi Event!!) to all clients which are registered for the TMGProcServer with its ProcName property set to the value of proc. The name of the Event is Event and its value is value.
function ProcExists(ProcName:string; var Proc:TMGIProcServerIntf):boolean;virtual; Finds out if a Server with the ProcName property set to Procname exists. If it finds one the INterface is returned in Proc
function CanCloseQuery:boolean;virtual; Asks each registered server if the Application can be closed. If the result is false one of the Servers is not ready.
function GetServerProperty(Proc,Prop:string):variant;virtual; Sets a Property (not a Delphi Property) in a TMGProcServer component.
procedure SetServerProperty(Proc,Prop:string; value:variant);virtual; Retrieves the value of a Property from the coresponding TMGProcServer
Properties
property DllList : TMGDllList Gives you access to a list of all registered dll's.
property Servers : TMGGroupList Gives you access to all registered Servers devided up in different groups.
property Procs[index:variant] : TMGIProcServerIntf Gives you access to all registered Servers.
property DllPaths : TStrings Strings in this list are pathes to directories that include dll's which should be registered automatically at the application startup. A Path can be followed by a ';' and the extension of the dlls without a point.
Events
property OnCreate : TNotifyEvent Is called on Application Startup
property OnDestroy : TNotifyEvent Is called on Application Shutdown
property OnRegisterServer : TMGAppRegisterEvent Is called each time a new server is registered.
property OnUnRegisterServer : TMGAppRegisterEvent Is called each time a server is unregistered.
property OnRegisterClient : TMGAppRegisterEvent Is called each time a new client is registered.
property OnUnRegisterClient : TMGAppRegisterEvent Is called each time a client is unregistered.
property OnProcEnabledChange : TMGAppEnabledEvent Is called each time a server changes its Enabled Property.