Don't terminate a cpp_quote statement with a semicolon. New versions of WIDL will...
[reactos.git] / reactos / include / reactos / idl / svcctl.idl
1 /*
2 * Service Control Manager (SCM) interface definition
3 */
4
5 #include "include/reactos/idl/wtypes.idl"
6
7 const unsigned int MAX_SERVICE_NAME_LENGTH = 255;
8 const unsigned short SC_MAX_DEPEND_SIZE = 4 * 1024;
9 const unsigned short SC_MAX_NAME_LENGTH = MAX_SERVICE_NAME_LENGTH + 1;
10 const unsigned short SC_MAX_PATH_LENGTH = 32 * 1024;
11 const unsigned short SC_MAX_PWD_SIZE = 514;
12 const unsigned short SC_MAX_COMPUTER_NAME_LENGTH = 1024;
13 const unsigned short SC_MAX_ACCOUNT_NAME_LENGTH = 2 * 1024;
14 const unsigned short SC_MAX_COMMENT_LENGTH = 128;
15 const unsigned short SC_MAX_ARGUMENT_LENGTH = 1024;
16 const unsigned short SC_MAX_ARGUMENTS = 1024;
17
18 typedef unsigned long SECURITY_INFORMATION;
19 typedef [handle] LPSTR SVCCTL_HANDLEA;
20 typedef [handle] LPWSTR SVCCTL_HANDLEW;
21 typedef [context_handle] unsigned long SC_RPC_HANDLE;
22 typedef SC_RPC_HANDLE* LPSC_RPC_HANDLE;
23 typedef [context_handle] PVOID SC_RPC_LOCK;
24 typedef SC_RPC_LOCK* LPSC_RPC_LOCK;
25 typedef [context_handle] unsigned long SC_NOTIFY_RPC_HANDLE;
26 typedef SC_NOTIFY_RPC_HANDLE* LPSC_NOTIFY_RPC_HANDLE;
27 typedef [range(0, 1024 * 4)] DWORD BOUNDED_DWORD_4K;
28 typedef BOUNDED_DWORD_4K* LPBOUNDED_DWORD_4K;
29 typedef [range(0, 1024 * 8)] DWORD BOUNDED_DWORD_8K;
30 typedef BOUNDED_DWORD_4K* LPBOUNDED_DWORD_8K;
31 typedef [range(0, 1024 * 256)] DWORD BOUNDED_DWORD_256K;
32 typedef BOUNDED_DWORD_4K* LPBOUNDED_DWORD_256K;
33
34 cpp_quote("#if 0")
35
36 typedef struct _SERVICE_STATUS {
37 DWORD dwServiceType;
38 DWORD dwCurrentState;
39 DWORD dwControlsAccepted;
40 DWORD dwWin32ExitCode;
41 DWORD dwServiceSpecificExitCode;
42 DWORD dwCheckPoint;
43 DWORD dwWaitHint;
44 } SERVICE_STATUS, *LPSERVICE_STATUS;
45
46 typedef struct _SERVICE_STATUS_PROCESS {
47 DWORD dwServiceType;
48 DWORD dwCurrentState;
49 DWORD dwControlsAccepted;
50 DWORD dwWin32ExitCode;
51 DWORD dwServiceSpecificExitCode;
52 DWORD dwCheckPoint;
53 DWORD dwWaitHint;
54 DWORD dwProcessId;
55 DWORD dwServiceFlags;
56 } SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
57
58 typedef struct _ENUM_SERVICE_STATUSA {
59 [string, range(0, 8 * 1024)] LPSTR lpServiceName;
60 [string, range(0, 8 * 1024)] LPSTR lpDisplayName;
61 SERVICE_STATUS ServiceStatus;
62 } ENUM_SERVICE_STATUSA, *LPENUM_SERVICE_STATUSA;
63
64 typedef struct _ENUM_SERVICE_STATUSW {
65 [string, range(0, 8 * 1024)] LPWSTR lpServiceName;
66 [string, range(0, 8 * 1024)] LPWSTR lpDisplayName;
67 SERVICE_STATUS ServiceStatus;
68 } ENUM_SERVICE_STATUSW, *LPENUM_SERVICE_STATUSW;
69
70 typedef struct _ENUM_SERVICE_STATUS_PROCESSA {
71 [string, range(0, 8 * 1024)] LPSTR lpServiceName;
72 [string, range(0, 8 * 1024)] LPSTR lpDisplayName;
73 SERVICE_STATUS_PROCESS ServiceStatusProcess;
74 } ENUM_SERVICE_STATUS_PROCESSA, *LPENUM_SERVICE_STATUS_PROCESSA;
75
76 typedef struct _ENUM_SERVICE_STATUS_PROCESSW {
77 [string, range(0, 8 * 1024)] LPWSTR lpServiceName;
78 [string, range(0, 8 * 1024)] LPWSTR lpDisplayName;
79 SERVICE_STATUS_PROCESS ServiceStatusProcess;
80 } ENUM_SERVICE_STATUS_PROCESSW, *LPENUM_SERVICE_STATUS_PROCESSW;
81
82 typedef struct _QUERY_SERVICE_CONFIGA {
83 DWORD dwServiceType;
84 DWORD dwStartType;
85 DWORD dwErrorControl;
86 [string, range(0, 8 * 1024)] LPSTR lpBinaryPathName;
87 [string, range(0, 8 * 1024)] LPSTR lpLoadOrderGroup;
88 DWORD dwTagId;
89 [string, range(0, 8 * 1024)] LPSTR lpDependencies;
90 [string, range(0, 8 * 1024)] LPSTR lpServiceStartName;
91 LPSTR lpDisplayName;
92 } QUERY_SERVICE_CONFIGA, *LPQUERY_SERVICE_CONFIGA;
93
94 typedef struct _QUERY_SERVICE_CONFIGW {
95 DWORD dwServiceType;
96 DWORD dwStartType;
97 DWORD dwErrorControl;
98 [string, range(0, 8 * 1024)] LPWSTR lpBinaryPathName;
99 [string, range(0, 8 * 1024)] LPWSTR lpLoadOrderGroup;
100 DWORD dwTagId;
101 [string, range(0, 8 * 1024)] LPWSTR lpDependencies;
102 [string, range(0, 8 * 1024)] LPWSTR lpServiceStartName;
103 LPWSTR lpDisplayName;
104 } QUERY_SERVICE_CONFIGW, *LPQUERY_SERVICE_CONFIGW;
105
106 typedef struct _QUERY_SERVICE_LOCK_STATUSA {
107 DWORD fIsLocked;
108 [string, range(0, 8 * 1024)] LPSTR lpLockOwner;
109 DWORD dwLockDuration;
110 } QUERY_SERVICE_LOCK_STATUSA, *LPQUERY_SERVICE_LOCK_STATUSA;
111
112 typedef struct _QUERY_SERVICE_LOCK_STATUSW {
113 DWORD fIsLocked;
114 [string, range(0, 8 * 1024)] LPWSTR lpLockOwner;
115 DWORD dwLockDuration;
116 } QUERY_SERVICE_LOCK_STATUSW, *LPQUERY_SERVICE_LOCK_STATUSW;
117
118 typedef [v1_enum] enum _SC_ACTION_TYPE {
119 SC_ACTION_NONE = 0,
120 SC_ACTION_RESTART = 1,
121 SC_ACTION_REBOOT = 2,
122 SC_ACTION_RUN_COMMAND = 3,
123 } SC_ACTION_TYPE;
124
125 typedef struct _SC_ACTION {
126 SC_ACTION_TYPE Type;
127 DWORD Delay;
128 } SC_ACTION, *LPSC_ACTION;
129
130 typedef [v1_enum] enum _SC_ENUM_TYPE {
131 SC_ENUM_PROCESS_INFO = 0,
132 } SC_ENUM_TYPE;
133
134 typedef struct _SERVICE_DESCRIPTIONA {
135 [string, range(0, 8 * 1024)] LPSTR lpDescription;
136 } SERVICE_DESCRIPTIONA, *LPSERVICE_DESCRIPTIONA;
137
138 typedef struct _SERVICE_DESCRIPTIONW {
139 [string, range(0, 8 * 1024)] LPWSTR lpDescription;
140 } SERVICE_DESCRIPTIONW, *LPSERVICE_DESCRIPTIONW;
141
142 typedef struct _SERVICE_FAILURE_ACTIONSA {
143 DWORD dwResetPeriod;
144 [string, range(0, 8 * 1024)] LPSTR lpRebootMsg;
145 [string, range(0, 8 * 1024)] LPSTR lpCommand;
146 [range(0, 1024)] DWORD cActions;
147 [size_is(cActions)] SC_ACTION* lpsaActions;
148 } SERVICE_FAILURE_ACTIONSA, *LPSERVICE_FAILURE_ACTIONSA;
149
150 typedef struct _SERVICE_FAILURE_ACTIONSW {
151 DWORD dwResetPeriod;
152 [string, range(0, 8 * 1024)] LPWSTR lpRebootMsg;
153 [string, range(0, 8 * 1024)] LPWSTR lpCommand;
154 [range(0, 1024)] DWORD cActions;
155 [size_is(cActions)] SC_ACTION* lpsaActions;
156 } SERVICE_FAILURE_ACTIONSW, *LPSERVICE_FAILURE_ACTIONSW;
157
158 cpp_quote("#endif")
159
160 typedef struct _SERVICE_DELAYED_AUTO_START_INFO {
161 BOOL fDelayedAutoStart;
162 } SERVICE_DELAYED_AUTO_START_INFO, *LPSERVICE_DELAYED_AUTO_START_INFO;
163
164 typedef struct _SERVICE_FAILURE_ACTIONS_FLAG {
165 BOOL fFailureActionsOnNonCrashFailures;
166 } SERVICE_FAILURE_ACTIONS_FLAG, *LPSERVICE_FAILURE_ACTIONS_FLAG;
167
168 typedef struct _SERVICE_SID_INFO {
169 DWORD dwServicesSidType;
170 } SERVICE_SID_INFO, *LPSERVICE_SID_INFO;
171
172 typedef struct _SERVICE_RPC_REQUIRED_PRIVILEGES_INFO {
173 [range(0, 1024 * 4)] DWORD cbRequiredPrivileges;
174 [size_is(cbRequiredPrivileges)] PBYTE pRequiredPrivileges;
175 } SERVICE_RPC_REQUIRED_PRIVILEGES_INFO, *LPSERVICE_RPC_REQUIRED_PRIVILEGES_INFO;
176
177 typedef struct _SERVICE_PRESHUTDOWN_INFO {
178 DWORD dwPreshutdownTimeout;
179 } SERVICE_PRESHUTDOWN_INFO, *LPSERVICE_PRESHUTDOWN_INFO;
180
181 typedef struct _SC_RPC_CONFIG_INFOA {
182 DWORD dwInfoLevel;
183 [switch_is(dwInfoLevel)] union {
184 [case(1)] LPSERVICE_DESCRIPTIONA psd;
185 [case(2)] LPSERVICE_FAILURE_ACTIONSA psfa;
186 [case(3)] LPSERVICE_DELAYED_AUTO_START_INFO psda;
187 [case(4)] LPSERVICE_FAILURE_ACTIONS_FLAG psfaf;
188 [case(5)] LPSERVICE_SID_INFO pssid;
189 [case(6)] LPSERVICE_RPC_REQUIRED_PRIVILEGES_INFO psrp;
190 [case(7)] LPSERVICE_PRESHUTDOWN_INFO psps;;
191 };
192 } SC_RPC_CONFIG_INFOA, *LPSC_RPC_CONFIG_INFOA;
193
194 typedef struct _SC_RPC_CONFIG_INFOW {
195 DWORD dwInfoLevel;
196 [switch_is(dwInfoLevel)] union {
197 [case(1)] LPSERVICE_DESCRIPTIONW psd;
198 [case(2)] LPSERVICE_FAILURE_ACTIONSW psfa;
199 [case(3)] LPSERVICE_DELAYED_AUTO_START_INFO psda;
200 [case(4)] LPSERVICE_FAILURE_ACTIONS_FLAG psfaf;
201 [case(5)] LPSERVICE_SID_INFO pssid;
202 [case(6)] LPSERVICE_RPC_REQUIRED_PRIVILEGES_INFO psrp;
203 [case(7)] LPSERVICE_PRESHUTDOWN_INFO psps;
204 };
205 } SC_RPC_CONFIG_INFOW, *LPSC_RPC_CONFIG_INFOW;
206
207 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 {
208 ULONGLONG ullThreadId;
209 DWORD dwNotifyMask;
210 UCHAR CallbackAddressArray[16];
211 UCHAR CallbackParamAddressArray[16];
212 SERVICE_STATUS_PROCESS ServiceStatus;
213 DWORD dwNotificationStatus;
214 DWORD dwSequence;
215 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1;
216
217 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 {
218 ULONGLONG ullThreadId;
219 DWORD dwNotifyMask;
220 UCHAR CallbackAddressArray[16];
221 UCHAR CallbackParamAddressArray[16];
222 SERVICE_STATUS_PROCESS ServiceStatus;
223 DWORD dwNotificationStatus;
224 DWORD dwSequence;
225 DWORD dwNotificationTriggered;
226 [string, range(0, 64 * 1024)] PWSTR pszServiceNames;
227 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2;
228
229 typedef struct _SC_RPC_NOTIFY_PARAMS {
230 DWORD dwInfoLevel;
231 [switch_is(dwInfoLevel)] union {
232 [case(1)] PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 pStatusChangeParam1;
233 [case(2)] PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 pStatusChangeParam2;
234 };
235 } SC_RPC_NOTIFY_PARAMS, *LPSC_RPC_NOTIFY_PARAMS;
236
237 typedef struct _SC_RPC_NOTIFY_PARAMS_LIST {
238 BOUNDED_DWORD_4K cElements;
239 [size_is(cElements)] SC_RPC_NOTIFY_PARAMS NotifyParamsArray[];
240 } SC_RPC_NOTIFY_PARAMS_LIST, *PSC_RPC_NOTIFY_PARAMS_LIST;
241
242 cpp_quote("#if 0")
243
244 #if 0
245 typedef
246 [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSA {
247 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA psrInParams;
248 } SC_RPC_SERVICE_CONTROL_IN_PARAMSA, *LPSC_RPC_SERVICE_CONTROL_IN_PARAMSA;
249
250 typedef
251 [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSW {
252 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW psrInParams;
253 } SC_RPC_SERVICE_CONTROL_IN_PARAMSW, *LPSC_RPC_SERVICE_CONTROL_IN_PARAMSW;
254
255 typedef
256 [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSA {
257 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
258 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSA, *LPSC_RPC_SERVICE_CONTROL_OUT_PARAMSA;
259
260 typedef
261 [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSW {
262 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
263 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSW, *LPSC_RPC_SERVICE_CONTROL_OUT_PARAMSW;
264 #endif
265
266 typedef [v1_enum] enum _SC_STATUS_TYPE {
267 SC_STATUS_PROCESS_INFO = 0,
268 } SC_STATUS_TYPE;
269
270 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA {
271 DWORD dwReason;
272 [string, range(0, SC_MAX_COMMENT_LENGTH)] LPSTR pszComment;
273 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA, *LPSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA;
274
275 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW {
276 DWORD dwReason;
277 [string, range(0, SC_MAX_COMMENT_LENGTH)] LPWSTR pszComment;
278 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW, *LPSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW;
279
280 typedef struct _SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS {
281 SERVICE_STATUS_PROCESS ServiceStatus;
282 } SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS, *LPSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS;
283
284 typedef SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 SERVICE_NOTIFY_STATUS_CHANGE_PARAMS, *LPSERVICE_NOTIFY_STATUS_CHANGE_PARAMS;
285
286 cpp_quote("#endif")
287
288 typedef struct _STRING_PTRSA {
289 [string, range(0, SC_MAX_ARGUMENT_LENGTH)] LPSTR StringPtr;
290 } STRING_PTRSA, *PSTRING_PTRSA, *LPSTRING_PTRSA;
291
292 typedef struct _STRING_PTRSW {
293 [string, range(0, SC_MAX_ARGUMENT_LENGTH)] LPWSTR StringPtr;
294 } STRING_PTRSW, *PSTRING_PTRSW, *LPSTRING_PTRSW;
295
296 [
297 uuid(367abb81-9844-35f1-ad32-98f038001003),
298 version(2.0),
299 pointer_default(unique),
300 #ifndef __midl
301 ,explicit_handle
302 #endif
303 ]
304 interface svcctl
305 {
306 /* Function 0 */
307 DWORD RCloseServiceHandle(
308 [in] handle_t BindingHandle,
309 [in, out] LPSC_RPC_HANDLE hSCObject);
310
311 /* Function 1 */
312 DWORD RControlService(
313 [in] handle_t BindingHandle,
314 [in] SC_RPC_HANDLE hService,
315 [in] DWORD dwControl,
316 [out] LPSERVICE_STATUS lpServiceStatus);
317
318 /* Function 2 */
319 DWORD RDeleteService(
320 [in] handle_t BindingHandle,
321 [in] SC_RPC_HANDLE hService);
322
323 /* Function 3 */
324 DWORD RLockServiceDatabase(
325 [in] handle_t BindingHandle,
326 [in] SC_RPC_HANDLE hSCManager,
327 [out] LPSC_RPC_LOCK lpLock);
328
329 /* Function 4 */
330 DWORD RQueryServiceObjectSecurity(
331 [in] handle_t BindingHandle,
332 [in] SC_RPC_HANDLE hService,
333 [in] SECURITY_INFORMATION dwSecurityInformation,
334 [out, size_is(cbBufSize)] LPBYTE lpSecurityDescriptor,
335 [in, range(0, 1024 * 256)] DWORD cbBufSize,
336 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded);
337
338 /* Function 5 */
339 DWORD RSetServiceObjectSecurity(
340 [in] handle_t BindingHandle,
341 [in] SC_RPC_HANDLE hService,
342 [in] DWORD dwSecurityInformation,
343 [in, size_is(dwSecuityDescriptorSize)] LPBYTE lpSecurityDescriptor,
344 [in] DWORD dwSecuityDescriptorSize);
345
346 /* Function 6 */
347 DWORD RQueryServiceStatus(
348 [in] handle_t BindingHandle,
349 [in] SC_RPC_HANDLE hService,
350 [out] LPSERVICE_STATUS lpServiceStatus);
351
352 /* Function 7 */
353 DWORD RSetServiceStatus(
354 [in] handle_t BindingHandle,
355 [in] SC_RPC_HANDLE hServiceStatus,
356 [in] LPSERVICE_STATUS lpServiceStatus);
357
358 /* Function 8 */
359 DWORD RUnlockServiceDatabase(
360 [in] handle_t BindingHandle,
361 [in, out] LPSC_RPC_LOCK Lock);
362
363 /* Function 9 */
364 DWORD RNotifyBootConfigStatus(
365 [in] handle_t BindingHandle,
366 [in, string, unique, range(0, SC_MAX_COMPUTER_NAME_LENGTH)] SVCCTL_HANDLEW lpMachineName,
367 [in] DWORD BootAcceptable);
368
369 /* Function 10 */
370 DWORD RSetServiceBitsW(
371 [in] handle_t BindingHandle,
372 [in] SC_RPC_HANDLE hServiceStatus,
373 [in] DWORD dwServiceBits,
374 [in] BOOL bSetBitsOn,
375 [in] BOOL bUpdateImmediately,
376 [in, string, unique] LPWSTR lpString);
377
378 /* Function 11 */
379 DWORD RChangeServiceConfigW(
380 [in] handle_t BindingHandle,
381 [in] SC_RPC_HANDLE hService,
382 [in] DWORD dwServiceType,
383 [in] DWORD dwStartType,
384 [in] DWORD dwErrorControl,
385 [in, string, unique, range(0, SC_MAX_PATH_LENGTH)] LPWSTR lpBinaryPathName,
386 [in, string, unique, range(0, SC_MAX_PATH_LENGTH)] LPWSTR lpLoadOrderGroup,
387 [in, out, unique] LPDWORD lpdwTagId,
388 [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies,
389 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
390 [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPWSTR lpServiceStartName,
391 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
392 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
393 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDisplayName);
394
395 /* Function 12 */
396 DWORD RCreateServiceW(
397 [in] handle_t BindingHandle,
398 [in] SC_RPC_HANDLE hSCManager,
399 [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName,
400 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDisplayName,
401 [in] DWORD dwDesiredAccess,
402 [in] DWORD dwServiceType,
403 [in] DWORD dwStartType,
404 [in] DWORD dwErrorControl,
405 [in, string, range(0, SC_MAX_PATH_LENGTH)] LPWSTR lpBinaryPathName,
406 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpLoadOrderGroup,
407 [in, out, unique] LPDWORD lpdwTagId,
408 [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies,
409 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
410 [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPWSTR lpServiceStartName,
411 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
412 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
413 [out] LPSC_RPC_HANDLE lpServiceHandle);
414
415 /* Function 13 */
416 DWORD REnumDependentServicesW(
417 [in] handle_t BindingHandle,
418 [in] SC_RPC_HANDLE hService,
419 [in] DWORD dwServiceState,
420 [out, size_is(cbBufSize)] LPBYTE lpServices,
421 [in, range(0, 1024*256)] DWORD cbBufSize,
422 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
423 [out] LPBOUNDED_DWORD_256K lpServicesReturned);
424
425 /* Function 14 */
426 DWORD REnumServicesStatusW(
427 [in] handle_t BindingHandle,
428 [in] SC_RPC_HANDLE hSCManager,
429 [in] DWORD dwServiceType,
430 [in] DWORD dwServiceState,
431 [out, size_is(dwBufSize)] LPBYTE lpBuffer,
432 [in, range(0, 1024*256)] DWORD dwBufSize,
433 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
434 [out] LPBOUNDED_DWORD_256K lpServicesReturned,
435 [in, out, unique] LPBOUNDED_DWORD_256K lpResumeHandle);
436
437 /* Function 15 */
438 DWORD ROpenSCManagerW(
439 [in] handle_t BindingHandle,
440 [in, string, unique, range(0, SC_MAX_COMPUTER_NAME_LENGTH)] LPWSTR lpMachineName,
441 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDatabaseName,
442 [in] DWORD dwDesiredAccess,
443 [out] LPSC_RPC_HANDLE lpScHandle);
444
445 /* Function 16 */
446 DWORD ROpenServiceW(
447 [in] handle_t BindingHandle,
448 [in] SC_RPC_HANDLE hSCManager,
449 [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName,
450 [in] DWORD dwDesiredAccess,
451 [out] LPSC_RPC_HANDLE lpServiceHandle);
452
453 /* Function 17 */
454 DWORD RQueryServiceConfigW(
455 [in] handle_t BindingHandle,
456 [in] SC_RPC_HANDLE hService,
457 [out, unique, size_is(cbBufSize)] LPBYTE lpServiceConfig,
458 /* FIXME: should be [out] LPQUERY_SERVICE_CONFIGW lpServiceConfig, */
459 [in, range(0, 1024*8)] DWORD cbBufSize,
460 [out] LPBOUNDED_DWORD_8K pcbBytesNeeded);
461
462 /* Function 18 */
463 DWORD RQueryServiceLockStatusW(
464 [in] handle_t BindingHandle,
465 [in] SC_RPC_HANDLE hSCManager,
466 [out] LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus,
467 [in, range(0, 1024*4)] DWORD cbBufSize,
468 [out] LPBOUNDED_DWORD_4K pcbBytesNeeded);
469
470 /* Function 19 */
471 DWORD RStartServiceW(
472 [in] handle_t BindingHandle,
473 [in] SC_RPC_HANDLE hService,
474 [in, range(0, SC_MAX_ARGUMENTS)] DWORD argc,
475 [in, unique, size_is(argc)] LPSTRING_PTRSW argv);
476
477 /* Function 20 */
478 DWORD RGetServiceDisplayNameW(
479 [in] handle_t BindingHandle,
480 [in] SC_RPC_HANDLE hSCManager,
481 [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName,
482 [out, string, range(1, 4*1024+1), size_is(*lpcchBuffer + 1)] LPWSTR lpDisplayName,
483 [in, out] DWORD* lpcchBuffer);
484
485 /* Function 21 */
486 DWORD RGetServiceKeyNameW(
487 [in] handle_t BindingHandle,
488 [in] SC_RPC_HANDLE hSCManager,
489 [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDisplayName,
490 [out, string, range(1, 4*1024+1), size_is(*lpcchBuffer + 1)] LPWSTR lpServiceName,
491 [in, out] DWORD* lpcchBuffer);
492
493 /* Function 22 */
494 DWORD RSetServiceBitsA(
495 [in] handle_t BindingHandle,
496 [in] SC_RPC_HANDLE hServiceStatus,
497 [in] DWORD dwServiceBits,
498 [in] BOOL bSetBitsOn,
499 [in] BOOL bUpdateImmediately,
500 [in, string, unique] LPSTR lpString);
501
502 /* Function 23 */
503 DWORD RChangeServiceConfigA(
504 [in] handle_t BindingHandle,
505 [in] SC_RPC_HANDLE hService,
506 [in] DWORD dwServiceType,
507 [in] DWORD dwStartType,
508 [in] DWORD dwErrorControl,
509 [in, string, unique, range(0, SC_MAX_PATH_LENGTH)] LPSTR lpBinaryPathName,
510 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpLoadOrderGroup,
511 [in, out, unique] LPDWORD lpdwTagId,
512 [in, unique, size_is(dwDependSize)] LPSTR lpDependencies,
513 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
514 [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPSTR lpServiceStartName,
515 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
516 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
517 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName);
518
519 /* Function 24 */
520 DWORD RCreateServiceA(
521 [in] handle_t BindingHandle,
522 [in] SC_RPC_HANDLE hSCManager,
523 [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName,
524 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName,
525 [in] DWORD dwDesiredAccess,
526 [in] DWORD dwServiceType,
527 [in] DWORD dwStartType,
528 [in] DWORD dwErrorControl,
529 [in, string, range(0, SC_MAX_PATH_LENGTH)] LPSTR lpBinaryPathName,
530 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpLoadOrderGroup,
531 [in, out, unique] LPDWORD lpdwTagId,
532 [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies,
533 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
534 [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPSTR lpServiceStartName,
535 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
536 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
537 [out] LPSC_RPC_HANDLE lpServiceHandle);
538
539 /* Function 25 */
540 DWORD REnumDependentServicesA(
541 [in] handle_t BindingHandle,
542 [in] SC_RPC_HANDLE hService,
543 [in] DWORD dwServiceState,
544 [out, size_is(cbBufSize)] LPBYTE lpServices,
545 [in, range(0, 1024*256)] DWORD cbBufSize,
546 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
547 [out] LPBOUNDED_DWORD_256K lpServicesReturned);
548
549 /* Function 26 */
550 DWORD REnumServicesStatusA(
551 [in] handle_t BindingHandle,
552 [in] SC_RPC_HANDLE hSCManager,
553 [in] DWORD dwServiceType,
554 [in] DWORD dwServiceState,
555 [out, size_is(dwBufSize)] LPBYTE lpBuffer,
556 [in, range(0, 1024*256)] DWORD dwBufSize,
557 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
558 [out] LPBOUNDED_DWORD_256K lpServicesReturned,
559 [in, out, unique] LPBOUNDED_DWORD_256K lpResumeHandle);
560
561 /* Function 27 */
562 DWORD ROpenSCManagerA(
563 [in] handle_t BindingHandle,
564 [in, string, unique, range(0, SC_MAX_COMPUTER_NAME_LENGTH)] LPSTR lpMachineName,
565 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDatabaseName,
566 [in] DWORD dwDesiredAccess,
567 [out] LPSC_RPC_HANDLE lpScHandle);
568
569 /* Function 28 */
570 DWORD ROpenServiceA(
571 [in] handle_t BindingHandle,
572 [in] SC_RPC_HANDLE hSCManager,
573 [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName,
574 [in] DWORD dwDesiredAccess,
575 [out] LPSC_RPC_HANDLE lpServiceHandle);
576
577 /* Function 29 */
578 DWORD RQueryServiceConfigA(
579 [in] handle_t BindingHandle,
580 [in] SC_RPC_HANDLE hService,
581 [out] LPQUERY_SERVICE_CONFIGA lpServiceConfig,
582 [in, range(0, 1024*8)] DWORD cbBufSize,
583 [out] LPBOUNDED_DWORD_8K pcbBytesNeeded);
584
585 /* Function 30 */
586 DWORD RQueryServiceLockStatusA(
587 [in] handle_t BindingHandle,
588 [in] SC_RPC_HANDLE hSCManager,
589 [out] LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus,
590 [in, range(0, 1024*4)] DWORD cbBufSize,
591 [out] LPBOUNDED_DWORD_4K pcbBytesNeeded);
592
593 /* Function 31 */
594 DWORD RStartServiceA(
595 [in] handle_t BindingHandle,
596 [in] SC_RPC_HANDLE hService,
597 [in, range(0, SC_MAX_ARGUMENTS)] DWORD argc,
598 [in, unique, size_is(argc)] LPSTRING_PTRSA argv);
599
600 /* Function 32 */
601 DWORD RGetServiceDisplayNameA(
602 [in] handle_t BindingHandle,
603 [in] SC_RPC_HANDLE hSCManager,
604 [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName,
605 [out, string, size_is(*lpcchBuffer)] LPSTR lpDisplayName,
606 [in, out] LPBOUNDED_DWORD_4K lpcchBuffer);
607
608 /* Function 33 */
609 DWORD RGetServiceKeyNameA(
610 [in] handle_t BindingHandle,
611 [in] SC_RPC_HANDLE hSCManager,
612 [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName,
613 [out, string, size_is(*lpcchBuffer)] LPSTR lpKeyName,
614 [in, out] LPBOUNDED_DWORD_4K lpcchBuffer);
615
616 /* Function 34 */
617 DWORD RGetCurrentGroupStateW(
618 [in] handle_t BindingHandle); /* FIXME */
619
620 /* Function 35 */
621 DWORD REnumServiceGroupW(
622 [in] handle_t BindingHandle,
623 [in] SC_RPC_HANDLE hSCManager,
624 [in] DWORD dwServiceType,
625 [in] DWORD dwServiceState,
626 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
627 [in, range(0, 1024*256)] DWORD cbBufSize,
628 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
629 [out] LPBOUNDED_DWORD_256K lpServicesReturned,
630 [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex,
631 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR pszGroupName);
632
633 /* Function 36 */
634 DWORD RChangeServiceConfig2A(
635 [in] handle_t BindingHandle,
636 [in] SC_RPC_HANDLE hService,
637 [in] SC_RPC_CONFIG_INFOA Info);
638
639 /* Function 37 */
640 DWORD RChangeServiceConfig2W(
641 [in] handle_t BindingHandle,
642 [in] SC_RPC_HANDLE hService,
643 [in] SC_RPC_CONFIG_INFOW Info);
644
645 /* Function 38 */
646 DWORD RQueryServiceConfig2A(
647 [in] handle_t BindingHandle,
648 [in] SC_RPC_HANDLE hService,
649 [in] DWORD dwInfoLevel,
650 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
651 [in, range(0, 1024*8)] DWORD cbBufSize,
652 [out] LPBOUNDED_DWORD_8K pcbBytesNeeded);
653
654 /* Function 39 */
655 DWORD RQueryServiceConfig2W(
656 [in] handle_t BindingHandle,
657 [in] SC_RPC_HANDLE hService,
658 [in] DWORD dwInfoLevel,
659 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
660 [in, range(0, 1024*8)] DWORD cbBufSize,
661 [out] LPBOUNDED_DWORD_8K pcbBytesNeeded);
662
663 /* Function 40 */
664 DWORD RQueryServiceStatusEx(
665 [in] handle_t BindingHandle,
666 [in] SC_RPC_HANDLE hService,
667 [in] SC_STATUS_TYPE InfoLevel,
668 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
669 [in, range(0, 1024*8)] DWORD cbBufSize,
670 [out] LPBOUNDED_DWORD_8K pcbBytesNeeded);
671
672 /* Function 41 */
673 DWORD REnumServicesStatusExA(
674 [in] handle_t BindingHandle,
675 [in] SC_RPC_HANDLE hSCManager,
676 [in] SC_ENUM_TYPE InfoLevel,
677 [in] DWORD dwServiceType,
678 [in] DWORD dwServiceState,
679 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
680 [in, range(0, 1024 * 256)] DWORD cbBufSize,
681 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
682 [out] LPBOUNDED_DWORD_256K lpServicesReturned,
683 [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex,
684 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCSTR pszGroupName);
685
686 /* Function 42 */
687 DWORD REnumServicesStatusExW(
688 [in] handle_t BindingHandle,
689 [in] SC_RPC_HANDLE hSCManager,
690 [in] SC_ENUM_TYPE InfoLevel,
691 [in] DWORD dwServiceType,
692 [in] DWORD dwServiceState,
693 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
694 [in, range(0, 1024 * 256)] DWORD cbBufSize,
695 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
696 [out] LPBOUNDED_DWORD_256K lpServicesReturned,
697 [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex,
698 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR pszGroupName);
699
700 /* Function 43 */
701 DWORD RSendTSMessage(
702 [in] handle_t BindingHandle); /* FIXME */
703
704 /* Function 44 */
705 DWORD RCreateServiceWOW64A(
706 [in] handle_t BindingHandle,
707 [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName,
708 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName,
709 [in] DWORD dwDesiredAccess,
710 [in] DWORD dwServiceType,
711 [in] DWORD dwStartType,
712 [in] DWORD dwErrorControl,
713 [in, string, range(0, SC_MAX_PATH_LENGTH)] LPSTR lpBinaryPathName,
714 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpLoadOrderGroup,
715 [in, out, unique] LPDWORD lpdwTagId,
716 [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies,
717 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
718 [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPSTR lpServiceStartName,
719 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
720 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
721 [out] LPSC_RPC_HANDLE lpServiceHandle);
722
723 /* Function 45 */
724 DWORD RCreateServiceWOW64W(
725 [in] handle_t BindingHandle,
726 [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName,
727 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDisplayName,
728 [in] DWORD dwDesiredAccess,
729 [in] DWORD dwServiceType,
730 [in] DWORD dwStartType,
731 [in] DWORD dwErrorControl,
732 [in, string, range(0, SC_MAX_PATH_LENGTH)] LPWSTR lpBinaryPathName,
733 [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpLoadOrderGroup,
734 [in, out, unique] LPDWORD lpdwTagId,
735 [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies,
736 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
737 [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPWSTR lpServiceStartName,
738 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
739 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
740 [out] LPSC_RPC_HANDLE lpServiceHandle);
741
742 /* Function 46 */
743 DWORD RQueryServiceTagInfo(
744 [in] handle_t BindingHandle); /* FIXME */
745
746 /* Function 47 */
747 DWORD RNotifyServiceStatusChange(
748 [in] handle_t BindingHandle,
749 [in] SC_RPC_HANDLE hService,
750 [in] SC_RPC_NOTIFY_PARAMS NotifyParams,
751 [in] GUID* pClientProcessGuid,
752 [out] GUID* pSCMProcessGuid,
753 [out] PBOOL pfCreateRemoteQueue,
754 [out] LPSC_NOTIFY_RPC_HANDLE phNotify);
755
756 /* Function 48 */
757 DWORD RGetNotifyResults(
758 [in] handle_t BindingHandle,
759 [in] SC_NOTIFY_RPC_HANDLE hNotify,
760 [out] PSC_RPC_NOTIFY_PARAMS_LIST *ppNotifyParams);
761
762 /* Function 49 */
763 DWORD RCloseNotifyHandle(
764 [in] handle_t BindingHandle,
765 [in, out] LPSC_NOTIFY_RPC_HANDLE phNotify,
766 [out] PBOOL pfApcFired);
767
768 /* Function 50 */
769 DWORD RControlServiceExA(
770 [in] handle_t BindingHandle,
771 [in] SC_RPC_HANDLE hService,
772 [in] DWORD dwControl,
773 [in] DWORD dwInfoLevel/*,
774 [in, switch_is(dwInfoLevel)] PSC_RPC_SERVICE_CONTROL_IN_PARAMSA pControlInParams,
775 [out, switch_is(dwInfoLevel)] PSC_RPC_SERVICE_CONTROL_IN_PARAMSA pControlOutParams*/);
776
777 /* Function 51 */
778 DWORD RControlServiceExW(
779 [in] handle_t BindingHandle,
780 [in] SC_RPC_HANDLE hService,
781 [in] DWORD dwControl,
782 [in] DWORD dwInfoLevel/*,
783 [in, switch_is(dwInfoLevel)] PSC_RPC_SERVICE_CONTROL_IN_PARAMSW pControlInParams,
784 [out, switch_is(dwInfoLevel)] PSC_RPC_SERVICE_CONTROL_IN_PARAMSW pControlOutParams*/);
785
786 /* Function 52 */
787 DWORD RSendPnPMessage(
788 [in] handle_t BindingHandle); /* FIXME */
789
790 /* Function 53 */
791 DWORD RValidatePnPService(
792 [in] handle_t BindingHandle); /* FIXME */
793
794 /* Function 54 */
795 DWORD ROpenServiceStatusHandle(
796 [in] handle_t BindingHandle); /* FIXME */
797
798 /* Function 55 */
799 DWORD RFunction55(
800 [in] handle_t BindingHandle); /* FIXME */
801 }