[Overview][Resource strings][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'daemonapp' (#fcl)

# TCustomDaemonApplication

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Custom daemon application class

## Declaration

Source position: daemonapp.pp line 328

`type TCustomDaemonApplication = class(TCustomApplication)`
`protected`
`procedure SysStartUnInstallDaemons;`
`procedure SysEndUnInstallDaemons;`
`procedure SysStartInstallDaemons;`
`procedure SysEndInstallDaemons;`
`procedure SysStartRunDaemons;`
`procedure SysEndRunDaemons;`
`procedure CreateDaemonController(); virtual;`
`procedure CreateServiceMapper(); virtual;`
`procedure CreateDaemonInstance(); virtual;`
`procedure RemoveController(); virtual;`
`procedure SetupLogger;`
`procedure StopLogger;`
`procedure DoRun; override;`
`property SysData: TObject; [rw]`
`public`
`procedure ShowException(); override;` |  | Show an exception
`function CreateDaemon();` |  | Create daemon instance
`procedure StopDaemons();` |  | Stop all daemons
`procedure InstallDaemons;` |  | Install all daemons.
`procedure RunDaemons;` |  | Run all daemons.
`procedure UnInstallDaemons;` |  | Uninstall all daemons
`procedure CreateForm(); virtual;` |  | Create a component
`property OnRun: TNotifyEvent; [rw]`
`property Logger: TEventLog; [r]` |  | Event logging instance used for logging messages
`property GUIMainLoop: TGuiLoopEvent; [rw]` |  | GUI main loop callback
`property GuiHandle: THandle; [rw]` |  | Handle of GUI loop main application window handle
`property RunMode: TDaemonRunMode; [r]` |  | Application mode
`end;`

## Inheritance

`TCustomDaemonApplication` |  | Custom daemon application class
`TCustomApplication` |  | Ancestor class for TApplication classes.
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

## Description

TCustomDaemonApplication is a TCustomApplication descendent which is the main application instance for a daemon. It handles the command-line and decides what to do when the application is started, depending on the command-line options given to the application, by calling the various methods.

It creates the necessary TDaemon instances by checking the TCustomDaemonMapperClass instance that contains the daemon maps.

## See also

TCustomApplication |  | Ancestor class for TApplication classes.
TCustomDaemonMapperClass |  | Class of TCustomDaemonMapper

The latest version of this document can be found at lazarus-ccr.sourceforge.net .