TServiceApplication = class(TComponent)
class PASCALIMPLEMENTATION TServiceApplication : public System::Classes::TComponent
TServiceApplication encapsulates a Windows NT service application.
TServiceApplication encapsulates a Windows NT application type known as a service. TServiceApplication provides the fundamental behavior of this type of application. Each Service project automatically declares an Application variable of type TServiceApplication as the instance of the application. The Application variable is added to a project by selecting File | New from the menu of the IDE main window and selecting Service Application in the New Items dialog.
TServiceApplication contains TService objects, each of which encapsulates a Windows NT service. The service application object provides methods to create service objects and to install, register, dispatch, and uninstall services.
When the service application is run using the /INSTALL switch, it registers the services it contains. When run using the /UNINSTALL switch, it unregisters its services. Unless the application is run with the /SILENT switch, the service application shows a confirmation message after successfully installing or uninstalling its services.
Note: Do not add the Forms or Httpapp units to the uses list of the project (Delphi) or includ the unit header for these units in the project source (C++). Those units declare conflicting Application variables of types TApplication and TWebApplication, respectively.