...
Source file src/pkg/cmd/vendor/golang.org/x/sys/windows/service.go
1
2
3
4
5
6
7 package windows
8
9 const (
10 SC_MANAGER_CONNECT = 1
11 SC_MANAGER_CREATE_SERVICE = 2
12 SC_MANAGER_ENUMERATE_SERVICE = 4
13 SC_MANAGER_LOCK = 8
14 SC_MANAGER_QUERY_LOCK_STATUS = 16
15 SC_MANAGER_MODIFY_BOOT_CONFIG = 32
16 SC_MANAGER_ALL_ACCESS = 0xf003f
17 )
18
19
20
21 const (
22 SERVICE_KERNEL_DRIVER = 1
23 SERVICE_FILE_SYSTEM_DRIVER = 2
24 SERVICE_ADAPTER = 4
25 SERVICE_RECOGNIZER_DRIVER = 8
26 SERVICE_WIN32_OWN_PROCESS = 16
27 SERVICE_WIN32_SHARE_PROCESS = 32
28 SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS
29 SERVICE_INTERACTIVE_PROCESS = 256
30 SERVICE_DRIVER = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER
31 SERVICE_TYPE_ALL = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS
32
33 SERVICE_BOOT_START = 0
34 SERVICE_SYSTEM_START = 1
35 SERVICE_AUTO_START = 2
36 SERVICE_DEMAND_START = 3
37 SERVICE_DISABLED = 4
38
39 SERVICE_ERROR_IGNORE = 0
40 SERVICE_ERROR_NORMAL = 1
41 SERVICE_ERROR_SEVERE = 2
42 SERVICE_ERROR_CRITICAL = 3
43
44 SC_STATUS_PROCESS_INFO = 0
45
46 SC_ACTION_NONE = 0
47 SC_ACTION_RESTART = 1
48 SC_ACTION_REBOOT = 2
49 SC_ACTION_RUN_COMMAND = 3
50
51 SERVICE_STOPPED = 1
52 SERVICE_START_PENDING = 2
53 SERVICE_STOP_PENDING = 3
54 SERVICE_RUNNING = 4
55 SERVICE_CONTINUE_PENDING = 5
56 SERVICE_PAUSE_PENDING = 6
57 SERVICE_PAUSED = 7
58 SERVICE_NO_CHANGE = 0xffffffff
59
60 SERVICE_ACCEPT_STOP = 1
61 SERVICE_ACCEPT_PAUSE_CONTINUE = 2
62 SERVICE_ACCEPT_SHUTDOWN = 4
63 SERVICE_ACCEPT_PARAMCHANGE = 8
64 SERVICE_ACCEPT_NETBINDCHANGE = 16
65 SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 32
66 SERVICE_ACCEPT_POWEREVENT = 64
67 SERVICE_ACCEPT_SESSIONCHANGE = 128
68
69 SERVICE_CONTROL_STOP = 1
70 SERVICE_CONTROL_PAUSE = 2
71 SERVICE_CONTROL_CONTINUE = 3
72 SERVICE_CONTROL_INTERROGATE = 4
73 SERVICE_CONTROL_SHUTDOWN = 5
74 SERVICE_CONTROL_PARAMCHANGE = 6
75 SERVICE_CONTROL_NETBINDADD = 7
76 SERVICE_CONTROL_NETBINDREMOVE = 8
77 SERVICE_CONTROL_NETBINDENABLE = 9
78 SERVICE_CONTROL_NETBINDDISABLE = 10
79 SERVICE_CONTROL_DEVICEEVENT = 11
80 SERVICE_CONTROL_HARDWAREPROFILECHANGE = 12
81 SERVICE_CONTROL_POWEREVENT = 13
82 SERVICE_CONTROL_SESSIONCHANGE = 14
83
84 SERVICE_ACTIVE = 1
85 SERVICE_INACTIVE = 2
86 SERVICE_STATE_ALL = 3
87
88 SERVICE_QUERY_CONFIG = 1
89 SERVICE_CHANGE_CONFIG = 2
90 SERVICE_QUERY_STATUS = 4
91 SERVICE_ENUMERATE_DEPENDENTS = 8
92 SERVICE_START = 16
93 SERVICE_STOP = 32
94 SERVICE_PAUSE_CONTINUE = 64
95 SERVICE_INTERROGATE = 128
96 SERVICE_USER_DEFINED_CONTROL = 256
97 SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL
98 SERVICE_RUNS_IN_SYSTEM_PROCESS = 1
99 SERVICE_CONFIG_DESCRIPTION = 1
100 SERVICE_CONFIG_FAILURE_ACTIONS = 2
101
102 SC_ENUM_PROCESS_INFO = 0
103 )
104
105 type SERVICE_STATUS struct {
106 ServiceType uint32
107 CurrentState uint32
108 ControlsAccepted uint32
109 Win32ExitCode uint32
110 ServiceSpecificExitCode uint32
111 CheckPoint uint32
112 WaitHint uint32
113 }
114
115 type SERVICE_TABLE_ENTRY struct {
116 ServiceName *uint16
117 ServiceProc uintptr
118 }
119
120 type QUERY_SERVICE_CONFIG struct {
121 ServiceType uint32
122 StartType uint32
123 ErrorControl uint32
124 BinaryPathName *uint16
125 LoadOrderGroup *uint16
126 TagId uint32
127 Dependencies *uint16
128 ServiceStartName *uint16
129 DisplayName *uint16
130 }
131
132 type SERVICE_DESCRIPTION struct {
133 Description *uint16
134 }
135
136 type SERVICE_STATUS_PROCESS struct {
137 ServiceType uint32
138 CurrentState uint32
139 ControlsAccepted uint32
140 Win32ExitCode uint32
141 ServiceSpecificExitCode uint32
142 CheckPoint uint32
143 WaitHint uint32
144 ProcessId uint32
145 ServiceFlags uint32
146 }
147
148 type ENUM_SERVICE_STATUS_PROCESS struct {
149 ServiceName *uint16
150 DisplayName *uint16
151 ServiceStatusProcess SERVICE_STATUS_PROCESS
152 }
153
154 type SERVICE_FAILURE_ACTIONS struct {
155 ResetPeriod uint32
156 RebootMsg *uint16
157 Command *uint16
158 ActionsCount uint32
159 Actions *SC_ACTION
160 }
161
162 type SC_ACTION struct {
163 Type uint32
164 Delay uint32
165 }
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
View as plain text