-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathWindows.ServiceManager.Types.pas
60 lines (48 loc) · 2.16 KB
/
Windows.ServiceManager.Types.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
unit Windows.ServiceManager.Types;
interface
uses
System.SysUtils;
type
ECustomServiceManagerException = class(Exception);
ENotActive = class(ECustomServiceManagerException);
EServiceNotFound = class(ECustomServiceManagerException);
EOSNotSupported = class(ECustomServiceManagerException);
EOperationNotAllowedWhileActive = class(ECustomServiceManagerException);
ELockingNotAllowed = class(ECustomServiceManagerException);
EServiceStateUnknown = class(ECustomServiceManagerException);
EServiceCannotBeContinued = class(ECustomServiceManagerException);
EServiceCannotBePaused = class(ECustomServiceManagerException);
EServiceCannotBeStopped = class(ECustomServiceManagerException);
EServiceDidNotRespond = class(ECustomServiceManagerException);
EServiceServiceStartTypeUnknown = class(ECustomServiceManagerException);
ECannotSetTransitionalState = class(ECustomServiceManagerException);
EServiceAccessDiffers = class(ECustomServiceManagerException);
TErrorInfo = record
ErrorCode: Integer;
ExceptionClass: ExceptClass;
ErrorMessage: string;
end;
{ The states a service can be in. }
TServiceState = (ssStopped,
ssStartPending,
ssStopPending,
ssRunning,
ssContinuePending,
ssPausePending,
ssPaused);
{ Enumeration of the standard "controls" a service can accept. The shutdown control, if not
accepted is ignored. The shutdown control can only be sent when a shutdown occurs. }
TServiceAccept = (saStop,
saPauseContinue,
saShutdown);
{ The set of "controls" a service can accept. }
TServiceAccepts = set of TServiceAccept;
{ The service startup enumeration determines how a service is started. ssAutomatic will start the
service automatically at startup. ssManual will allow applications and other services to start
this service manually and ssDisabled will disallow the service to be started altogether (but it
will be kept in the service database). }
TServiceStartup = (ssAutomatic,
ssManual,
ssDisabled);
implementation
end.