Unit u_svc |
---------------------------------------------------- // u_svc // Delphi unit to control Windows services // Feedback / latest version: // http://www.chamisplace.com/tips/delphi/services/ // (C) Chami.com // ----------------------------------------------------
Classes |
Functions |
ServiceGetStatus - ------------------------------------- get service status // return status code if successful -1 if not // return codes: SERVICE_STOPPED SERVICE_RUNNING SERVICE_PAUSED // following return codes are used to indicate that the service is in the middle of getting to one of the above states: SERVICE_START_PENDING SERVICE_STOP_PENDING SERVICE_CONTINUE_PENDING SERVICE_PAUSE_PENDING // sMachine: machine name, ie: \\SERVER empty = local machine // sService service name, ie: Alerter //
ServiceGetStrCode - ------------------------------------- convert status codes returned by ServiceGetStatus() to string values //
ServiceRunning - ------------------------------------- return TRUE if the specified service is running, defined by the status code SERVICE_RUNNING.
ServiceStart - ------------------------------------- start service // return TRUE if successful // sMachine: machine name, ie: \\SERVER empty = local machine // sService service name, ie: Alerter //
ServiceStop - ------------------------------------- stop service // return TRUE if successful // sMachine: machine name, ie: \\SERVER empty = local machine // sService service name, ie: Alerter //
ServiceStopped - ------------------------------------- return TRUE if the specified service was stopped, defined by the status code SERVICE_STOPPED.
Types |
Constants |
Variables |
Functions |
Types |
Constants |
Variables |