f272c26ebbe1b3676cc79266e9bdd30f624711b7
[reactos.git] / reactos / include / reactos / idl / svcctl.idl
1 /*
2 * Service Control Manager (SCM) interface definition
3 */
4
5 #include <ms-dtyp.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 [handle] LPSTR SVCCTL_HANDLEA;
19 typedef [handle] LPWSTR SVCCTL_HANDLEW;
20 typedef [handle] ULONG_PTR RPC_SERVICE_STATUS_HANDLE;
21 typedef [context_handle] PVOID 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] PVOID 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_8K* LPBOUNDED_DWORD_8K;
31 typedef [range(0, 1024 * 256)] DWORD BOUNDED_DWORD_256K;
32 typedef BOUNDED_DWORD_256K* 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] LPSTR lpServiceName;
60 [string] LPSTR lpDisplayName;
61 SERVICE_STATUS ServiceStatus;
62 } ENUM_SERVICE_STATUSA, *LPENUM_SERVICE_STATUSA;
63
64 typedef struct _ENUM_SERVICE_STATUSW {
65 [string] LPWSTR lpServiceName;
66 [string] LPWSTR lpDisplayName;
67 SERVICE_STATUS ServiceStatus;
68 } ENUM_SERVICE_STATUSW, *LPENUM_SERVICE_STATUSW;
69
70 typedef struct _ENUM_SERVICE_STATUS_PROCESSA {
71 [string] LPSTR lpServiceName;
72 [string] 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] LPWSTR lpServiceName;
78 [string] 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] LPSTR lpBinaryPathName;
87 [string] LPSTR lpLoadOrderGroup;
88 DWORD dwTagId;
89 [string] LPSTR lpDependencies;
90 [string] 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] LPWSTR lpBinaryPathName;
99 [string] LPWSTR lpLoadOrderGroup;
100 DWORD dwTagId;
101 [string] LPWSTR lpDependencies;
102 [string] 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] 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] 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] LPSTR lpDescription;
136 } SERVICE_DESCRIPTIONA, *LPSERVICE_DESCRIPTIONA;
137
138 typedef struct _SERVICE_DESCRIPTIONW {
139 [string] LPWSTR lpDescription;
140 } SERVICE_DESCRIPTIONW, *LPSERVICE_DESCRIPTIONW;
141
142 typedef struct _SERVICE_FAILURE_ACTIONSA {
143 DWORD dwResetPeriod;
144 [string] LPSTR lpRebootMsg;
145 [string] 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] LPWSTR lpRebootMsg;
153 [string] 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 } DUMMYUNIONNAME;
192 [string] LPSTR lpDescription; //FIXME
193 } SC_RPC_CONFIG_INFOA, *LPSC_RPC_CONFIG_INFOA;
194
195 typedef struct _SC_RPC_CONFIG_INFOW {
196 DWORD dwInfoLevel;
197 [switch_is(dwInfoLevel)] union {
198 [case(1)] LPSERVICE_DESCRIPTIONW psd;
199 [case(2)] LPSERVICE_FAILURE_ACTIONSW psfa;
200 [case(3)] LPSERVICE_DELAYED_AUTO_START_INFO psda;
201 [case(4)] LPSERVICE_FAILURE_ACTIONS_FLAG psfaf;
202 [case(5)] LPSERVICE_SID_INFO pssid;
203 [case(6)] LPSERVICE_RPC_REQUIRED_PRIVILEGES_INFO psrp;
204 [case(7)] LPSERVICE_PRESHUTDOWN_INFO psps;
205 } DUMMYUNIONNAME;
206 } SC_RPC_CONFIG_INFOW, *LPSC_RPC_CONFIG_INFOW;
207
208 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 {
209 ULONGLONG ullThreadId;
210 DWORD dwNotifyMask;
211 UCHAR CallbackAddressArray[16];
212 UCHAR CallbackParamAddressArray[16];
213 SERVICE_STATUS_PROCESS ServiceStatus;
214 DWORD dwNotificationStatus;
215 DWORD dwSequence;
216 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1;
217
218 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 {
219 ULONGLONG ullThreadId;
220 DWORD dwNotifyMask;
221 UCHAR CallbackAddressArray[16];
222 UCHAR CallbackParamAddressArray[16];
223 SERVICE_STATUS_PROCESS ServiceStatus;
224 DWORD dwNotificationStatus;
225 DWORD dwSequence;
226 DWORD dwNotificationTriggered;
227 [string] PWSTR pszServiceNames;
228 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2;
229
230 typedef struct _SC_RPC_NOTIFY_PARAMS {
231 DWORD dwInfoLevel;
232 [switch_is(dwInfoLevel)] union {
233 [case(1)] PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 pStatusChangeParam1;
234 [case(2)] PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 pStatusChangeParam2;
235 };
236 } SC_RPC_NOTIFY_PARAMS, *LPSC_RPC_NOTIFY_PARAMS;
237
238 typedef struct _SC_RPC_NOTIFY_PARAMS_LIST {
239 BOUNDED_DWORD_4K cElements;
240 [size_is(cElements)] SC_RPC_NOTIFY_PARAMS NotifyParamsArray[];
241 } SC_RPC_NOTIFY_PARAMS_LIST, *PSC_RPC_NOTIFY_PARAMS_LIST;
242
243 cpp_quote("#if 0")
244
245 #if 0
246 typedef
247 [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSA {
248 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA psrInParams;
249 } SC_RPC_SERVICE_CONTROL_IN_PARAMSA, *LPSC_RPC_SERVICE_CONTROL_IN_PARAMSA;
250
251 typedef
252 [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSW {
253 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW psrInParams;
254 } SC_RPC_SERVICE_CONTROL_IN_PARAMSW, *LPSC_RPC_SERVICE_CONTROL_IN_PARAMSW;
255
256 typedef
257 [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSA {
258 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
259 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSA, *LPSC_RPC_SERVICE_CONTROL_OUT_PARAMSA;
260
261 typedef
262 [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSW {
263 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
264 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSW, *LPSC_RPC_SERVICE_CONTROL_OUT_PARAMSW;
265 #endif
266
267 typedef [v1_enum] enum _SC_STATUS_TYPE {
268 SC_STATUS_PROCESS_INFO = 0,
269 } SC_STATUS_TYPE;
270
271 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA {
272 DWORD dwReason;
273 [string] LPSTR pszComment;
274 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA, *LPSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA;
275
276 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW {
277 DWORD dwReason;
278 [string] LPWSTR pszComment;
279 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW, *LPSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW;
280
281 typedef struct _SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS {
282 SERVICE_STATUS_PROCESS ServiceStatus;
283 } SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS, *LPSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS;
284
285 typedef SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 SERVICE_NOTIFY_STATUS_CHANGE_PARAMS, *LPSERVICE_NOTIFY_STATUS_CHANGE_PARAMS;
286
287 cpp_quote("#endif")
288
289 typedef struct _STRING_PTRSA {
290 [string] LPSTR StringPtr;
291 } STRING_PTRSA, *PSTRING_PTRSA, *LPSTRING_PTRSA;
292
293 typedef struct _STRING_PTRSW {
294 [string] LPWSTR StringPtr;
295 } STRING_PTRSW, *PSTRING_PTRSW, *LPSTRING_PTRSW;
296
297 [
298 uuid(367abb81-9844-35f1-ad32-98f038001003),
299 version(2.0),
300 pointer_default(unique),
301 endpoint("ncacn_np:[\\pipe\\ntsvcs]")
302 ]
303 interface svcctl
304 {
305 /* Function 0 */
306 DWORD RCloseServiceHandle(
307 [in, out] LPSC_RPC_HANDLE hSCObject);
308
309 /* Function 1 */
310 DWORD RControlService(
311 [in] SC_RPC_HANDLE hService,
312 [in] DWORD dwControl,
313 [out] LPSERVICE_STATUS lpServiceStatus);
314
315 /* Function 2 */
316 DWORD RDeleteService(
317 [in] SC_RPC_HANDLE hService);
318
319 /* Function 3 */
320 DWORD RLockServiceDatabase(
321 [in] SC_RPC_HANDLE hSCManager,
322 [out] LPSC_RPC_LOCK lpLock);
323
324 /* Function 4 */
325 DWORD RQueryServiceObjectSecurity(
326 [in] SC_RPC_HANDLE hService,
327 [in] SECURITY_INFORMATION dwSecurityInformation,
328 [out, size_is(cbBufSize)] LPBYTE lpSecurityDescriptor,
329 [in, range(0, 1024 * 256)] DWORD cbBufSize,
330 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded);
331
332 /* Function 5 */
333 DWORD RSetServiceObjectSecurity(
334 [in] SC_RPC_HANDLE hService,
335 [in] DWORD dwSecurityInformation,
336 [in, size_is(dwSecuityDescriptorSize)] LPBYTE lpSecurityDescriptor,
337 [in] DWORD dwSecuityDescriptorSize);
338
339 /* Function 6 */
340 DWORD RQueryServiceStatus(
341 [in] SC_RPC_HANDLE hService,
342 [out] LPSERVICE_STATUS lpServiceStatus);
343
344 /* Function 7 */
345 DWORD RSetServiceStatus(
346 [in] RPC_SERVICE_STATUS_HANDLE hServiceStatus,
347 [in] LPSERVICE_STATUS lpServiceStatus);
348
349 /* Function 8 */
350 DWORD RUnlockServiceDatabase(
351 [in, out] LPSC_RPC_LOCK Lock);
352
353 /* Function 9 */
354 DWORD RNotifyBootConfigStatus(
355 [in, string, unique] SVCCTL_HANDLEW lpMachineName,
356 [in] DWORD BootAcceptable);
357
358 /* Function 10 */
359 DWORD RI_ScSetServiceBitsW(
360 [in] RPC_SERVICE_STATUS_HANDLE hServiceStatus,
361 [in] DWORD dwServiceBits,
362 [in] BOOL bSetBitsOn,
363 [in] BOOL bUpdateImmediately,
364 [in, string, unique] LPWSTR lpString);
365
366 /* Function 11 */
367 DWORD RChangeServiceConfigW(
368 [in] SC_RPC_HANDLE hService,
369 [in] DWORD dwServiceType,
370 [in] DWORD dwStartType,
371 [in] DWORD dwErrorControl,
372 [in, string, unique] LPWSTR lpBinaryPathName,
373 [in, string, unique] LPWSTR lpLoadOrderGroup,
374 [in, out, unique] LPDWORD lpdwTagId,
375 [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies,
376 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
377 [in, string, unique] LPWSTR lpServiceStartName,
378 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
379 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
380 [in, string, unique] LPWSTR lpDisplayName);
381
382 /* Function 12 */
383 DWORD RCreateServiceW(
384 [in] SC_RPC_HANDLE hSCManager,
385 [in, string] LPCWSTR lpServiceName,
386 [in, string, unique] LPCWSTR lpDisplayName,
387 [in] DWORD dwDesiredAccess,
388 [in] DWORD dwServiceType,
389 [in] DWORD dwStartType,
390 [in] DWORD dwErrorControl,
391 [in, string] LPCWSTR lpBinaryPathName,
392 [in, string, unique] LPCWSTR lpLoadOrderGroup,
393 [in, out, unique] LPDWORD lpdwTagId,
394 [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies,
395 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
396 [in, string, unique] LPCWSTR lpServiceStartName,
397 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
398 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
399 [out] LPSC_RPC_HANDLE lpServiceHandle);
400
401 /* Function 13 */
402 DWORD REnumDependentServicesW(
403 [in] SC_RPC_HANDLE hService,
404 [in] DWORD dwServiceState,
405 [out, size_is(cbBufSize)] LPBYTE lpServices,
406 [in, range(0, 1024*256)] DWORD cbBufSize,
407 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
408 [out] LPBOUNDED_DWORD_256K lpServicesReturned);
409
410 /* Function 14 */
411 DWORD REnumServicesStatusW(
412 [in] SC_RPC_HANDLE hSCManager,
413 [in] DWORD dwServiceType,
414 [in] DWORD dwServiceState,
415 [out, size_is(dwBufSize)] LPBYTE lpBuffer,
416 [in, range(0, 1024*256)] DWORD dwBufSize,
417 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
418 [out] LPBOUNDED_DWORD_256K lpServicesReturned,
419 [in, out, unique] LPBOUNDED_DWORD_256K lpResumeHandle);
420
421 /* Function 15 */
422 DWORD ROpenSCManagerW(
423 [in, string, unique] SVCCTL_HANDLEW lpMachineName,
424 [in, string, unique] LPWSTR lpDatabaseName,
425 [in] DWORD dwDesiredAccess,
426 [out] LPSC_RPC_HANDLE lpScHandle);
427
428 /* Function 16 */
429 DWORD ROpenServiceW(
430 [in] SC_RPC_HANDLE hSCManager,
431 [in, string] LPWSTR lpServiceName,
432 [in] DWORD dwDesiredAccess,
433 [out] LPSC_RPC_HANDLE lpServiceHandle);
434
435 /* Function 17 */
436 DWORD RQueryServiceConfigW(
437 [in] SC_RPC_HANDLE hService,
438 [in, out, size_is(cbBufSize), unique] LPBYTE lpServiceConfig,
439 /* FIXME: should be [out] LPQUERY_SERVICE_CONFIGW lpServiceConfig, */
440 [in, range(0, 1024*8)] DWORD cbBufSize,
441 [in, out, unique] LPBOUNDED_DWORD_8K pcbBytesNeeded);
442
443 /* Function 18 */
444 DWORD RQueryServiceLockStatusW(
445 [in] SC_RPC_HANDLE hSCManager,
446 [out] LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus,
447 [in, range(0, 1024*4)] DWORD cbBufSize,
448 [out] LPBOUNDED_DWORD_4K pcbBytesNeeded);
449
450 /* Function 19 */
451 DWORD RStartServiceW(
452 [in] SC_RPC_HANDLE hService,
453 [in, range(0, SC_MAX_ARGUMENTS)] DWORD argc,
454 [in, unique, size_is(argc)] LPSTRING_PTRSW argv);
455
456 /* Function 20 */
457 DWORD RGetServiceDisplayNameW(
458 [in] SC_RPC_HANDLE hSCManager,
459 [in, string] LPCWSTR lpServiceName,
460 [out, string, size_is(*lpcchBuffer + 1)] LPWSTR lpDisplayName,
461 [in, out] DWORD* lpcchBuffer);
462
463 /* Function 21 */
464 DWORD RGetServiceKeyNameW(
465 [in] SC_RPC_HANDLE hSCManager,
466 [in, string] LPCWSTR lpDisplayName,
467 [out, string, size_is(*lpcchBuffer + 1)] LPWSTR lpServiceName,
468 [in, out] DWORD* lpcchBuffer);
469
470 /* Function 22 */
471 DWORD RI_ScSetServiceBitsA(
472 [in] RPC_SERVICE_STATUS_HANDLE hServiceStatus,
473 [in] DWORD dwServiceBits,
474 [in] BOOL bSetBitsOn,
475 [in] BOOL bUpdateImmediately,
476 [in, string, unique] LPSTR lpString);
477
478 /* Function 23 */
479 DWORD RChangeServiceConfigA(
480 [in] SC_RPC_HANDLE hService,
481 [in] DWORD dwServiceType,
482 [in] DWORD dwStartType,
483 [in] DWORD dwErrorControl,
484 [in, string, unique] LPSTR lpBinaryPathName,
485 [in, string, unique] LPSTR lpLoadOrderGroup,
486 [in, out, unique] LPDWORD lpdwTagId,
487 [in, unique, size_is(dwDependSize)] LPSTR lpDependencies,
488 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
489 [in, string, unique] LPSTR lpServiceStartName,
490 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
491 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
492 [in, string, unique] LPSTR lpDisplayName);
493
494 /* Function 24 */
495 DWORD RCreateServiceA(
496 [in] SC_RPC_HANDLE hSCManager,
497 [in, string] LPSTR lpServiceName,
498 [in, string, unique] LPSTR lpDisplayName,
499 [in] DWORD dwDesiredAccess,
500 [in] DWORD dwServiceType,
501 [in] DWORD dwStartType,
502 [in] DWORD dwErrorControl,
503 [in, string] LPSTR lpBinaryPathName,
504 [in, string, unique] LPSTR lpLoadOrderGroup,
505 [in, out, unique] LPDWORD lpdwTagId,
506 [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies,
507 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
508 [in, string, unique] LPSTR lpServiceStartName,
509 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
510 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
511 [out] LPSC_RPC_HANDLE lpServiceHandle);
512
513 /* Function 25 */
514 DWORD REnumDependentServicesA(
515 [in] SC_RPC_HANDLE hService,
516 [in] DWORD dwServiceState,
517 [out, size_is(cbBufSize)] LPBYTE lpServices,
518 [in, range(0, 1024*256)] DWORD cbBufSize,
519 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
520 [out] LPBOUNDED_DWORD_256K lpServicesReturned);
521
522 /* Function 26 */
523 DWORD REnumServicesStatusA(
524 [in] SC_RPC_HANDLE hSCManager,
525 [in] DWORD dwServiceType,
526 [in] DWORD dwServiceState,
527 [out, size_is(dwBufSize)] LPBYTE lpBuffer,
528 [in, range(0, 1024*256)] DWORD dwBufSize,
529 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
530 [out] LPBOUNDED_DWORD_256K lpServicesReturned,
531 [in, out, unique] LPBOUNDED_DWORD_256K lpResumeHandle);
532
533 /* Function 27 */
534 DWORD ROpenSCManagerA(
535 [in, string, unique] SVCCTL_HANDLEA lpMachineName,
536 [in, string, unique] LPSTR lpDatabaseName,
537 [in] DWORD dwDesiredAccess,
538 [out] LPSC_RPC_HANDLE lpScHandle);
539
540 /* Function 28 */
541 DWORD ROpenServiceA(
542 [in] SC_RPC_HANDLE hSCManager,
543 [in, string] LPSTR lpServiceName,
544 [in] DWORD dwDesiredAccess,
545 [out] LPSC_RPC_HANDLE lpServiceHandle);
546
547 /* Function 29 */
548 DWORD RQueryServiceConfigA(
549 [in] SC_RPC_HANDLE hService,
550 [in, out, size_is(cbBufSize), unique] LPBYTE lpServiceConfig,
551 /* FIXME: should be [out] LPQUERY_SERVICE_CONFIGA lpServiceConfig, */
552 [in, range(0, 1024*8)] DWORD cbBufSize,
553 [in, out, unique] LPBOUNDED_DWORD_8K pcbBytesNeeded);
554
555 /* Function 30 */
556 DWORD RQueryServiceLockStatusA(
557 [in] SC_RPC_HANDLE hSCManager,
558 [out] LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus,
559 [in, range(0, 1024*4)] DWORD cbBufSize,
560 [out] LPBOUNDED_DWORD_4K pcbBytesNeeded);
561
562 /* Function 31 */
563 DWORD RStartServiceA(
564 [in] SC_RPC_HANDLE hService,
565 [in, range(0, SC_MAX_ARGUMENTS)] DWORD argc,
566 [in, unique, size_is(argc)] LPSTRING_PTRSA argv);
567
568 /* Function 32 */
569 DWORD RGetServiceDisplayNameA(
570 [in] SC_RPC_HANDLE hSCManager,
571 [in, string] LPCSTR lpServiceName,
572 [out, string, size_is(*lpcchBuffer)] LPSTR lpDisplayName,
573 [in, out] LPBOUNDED_DWORD_4K lpcchBuffer);
574
575 /* Function 33 */
576 DWORD RGetServiceKeyNameA(
577 [in] SC_RPC_HANDLE hSCManager,
578 [in, string] LPCSTR lpDisplayName,
579 [out, string, size_is(*lpcchBuffer)] LPSTR lpKeyName,
580 [in, out] LPBOUNDED_DWORD_4K lpcchBuffer);
581
582 /* Function 34 */
583 DWORD RI_ScGetCurrentGroupStateW(
584 [in] SC_RPC_HANDLE hSCManager,
585 [in, string, unique] LPWSTR lpLoadOrderGroup,
586 [out] LPDWORD lpState);
587
588 /* Function 35 */
589 DWORD REnumServiceGroupW(
590 [in] SC_RPC_HANDLE hSCManager,
591 [in] DWORD dwServiceType,
592 [in] DWORD dwServiceState,
593 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
594 [in, range(0, 1024*256)] DWORD cbBufSize,
595 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
596 [out] LPBOUNDED_DWORD_256K lpServicesReturned,
597 [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex,
598 [in, string, unique] LPCWSTR pszGroupName);
599
600 /* Function 36 */
601 DWORD RChangeServiceConfig2A(
602 [in] SC_RPC_HANDLE hService,
603 [in] SC_RPC_CONFIG_INFOA Info);
604
605 /* Function 37 */
606 DWORD RChangeServiceConfig2W(
607 [in] SC_RPC_HANDLE hService,
608 [in] SC_RPC_CONFIG_INFOW Info);
609
610 /* Function 38 */
611 DWORD RQueryServiceConfig2A(
612 [in] SC_RPC_HANDLE hService,
613 [in] DWORD dwInfoLevel,
614 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
615 [in, range(0, 1024*8)] DWORD cbBufSize,
616 [out] LPBOUNDED_DWORD_8K pcbBytesNeeded);
617
618 /* Function 39 */
619 DWORD RQueryServiceConfig2W(
620 [in] SC_RPC_HANDLE hService,
621 [in] DWORD dwInfoLevel,
622 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
623 [in, range(0, 1024*8)] DWORD cbBufSize,
624 [out] LPBOUNDED_DWORD_8K pcbBytesNeeded);
625
626 /* Function 40 */
627 DWORD RQueryServiceStatusEx(
628 [in] SC_RPC_HANDLE hService,
629 [in] SC_STATUS_TYPE InfoLevel,
630 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
631 [in, range(0, 1024*8)] DWORD cbBufSize,
632 [out] LPBOUNDED_DWORD_8K pcbBytesNeeded);
633
634 /* Function 41 */
635 DWORD REnumServicesStatusExA(
636 [in] SC_RPC_HANDLE hSCManager,
637 [in] SC_ENUM_TYPE InfoLevel,
638 [in] DWORD dwServiceType,
639 [in] DWORD dwServiceState,
640 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
641 [in, range(0, 1024 * 256)] DWORD cbBufSize,
642 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
643 [out] LPBOUNDED_DWORD_256K lpServicesReturned,
644 [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex,
645 [in, string, unique] LPCSTR pszGroupName);
646
647 /* Function 42 */
648 DWORD REnumServicesStatusExW(
649 [in] SC_RPC_HANDLE hSCManager,
650 [in] SC_ENUM_TYPE InfoLevel,
651 [in] DWORD dwServiceType,
652 [in] DWORD dwServiceState,
653 [out, size_is(cbBufSize)] LPBYTE lpBuffer,
654 [in, range(0, 1024 * 256)] DWORD cbBufSize,
655 [out] LPBOUNDED_DWORD_256K pcbBytesNeeded,
656 [out] LPBOUNDED_DWORD_256K lpServicesReturned,
657 [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex,
658 [in, string, unique] LPCWSTR pszGroupName);
659
660 /* Function 43 */
661 DWORD RSendTSMessage(
662 [in] handle_t BindingHandle); /* FIXME */
663
664 /* Function 44 */
665 DWORD RCreateServiceWOW64A(
666 [in] handle_t BindingHandle,
667 [in, string] LPSTR lpServiceName,
668 [in, string, unique] LPSTR lpDisplayName,
669 [in] DWORD dwDesiredAccess,
670 [in] DWORD dwServiceType,
671 [in] DWORD dwStartType,
672 [in] DWORD dwErrorControl,
673 [in, string] LPSTR lpBinaryPathName,
674 [in, string, unique] LPSTR lpLoadOrderGroup,
675 [in, out, unique] LPDWORD lpdwTagId,
676 [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies,
677 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
678 [in, string, unique] LPSTR lpServiceStartName,
679 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
680 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
681 [out] LPSC_RPC_HANDLE lpServiceHandle);
682
683 /* Function 45 */
684 DWORD RCreateServiceWOW64W(
685 [in] handle_t BindingHandle,
686 [in, string] LPWSTR lpServiceName,
687 [in, string, unique] LPWSTR lpDisplayName,
688 [in] DWORD dwDesiredAccess,
689 [in] DWORD dwServiceType,
690 [in] DWORD dwStartType,
691 [in] DWORD dwErrorControl,
692 [in, string] LPWSTR lpBinaryPathName,
693 [in, string, unique] LPWSTR lpLoadOrderGroup,
694 [in, out, unique] LPDWORD lpdwTagId,
695 [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies,
696 [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize,
697 [in, string, unique] LPWSTR lpServiceStartName,
698 [in, unique, size_is(dwPwSize)] LPBYTE lpPassword,
699 [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize,
700 [out] LPSC_RPC_HANDLE lpServiceHandle);
701
702 /* Function 46 */
703 DWORD RQueryServiceTagInfo(
704 [in] handle_t BindingHandle); /* FIXME */
705
706 /* Function 47 */
707 DWORD RNotifyServiceStatusChange(
708 [in] SC_RPC_HANDLE hService,
709 [in] SC_RPC_NOTIFY_PARAMS NotifyParams,
710 [in] GUID* pClientProcessGuid,
711 [out] GUID* pSCMProcessGuid,
712 [out] PBOOL pfCreateRemoteQueue,
713 [out] LPSC_NOTIFY_RPC_HANDLE phNotify);
714
715 /* Function 48 */
716 DWORD RGetNotifyResults(
717 [in] SC_NOTIFY_RPC_HANDLE hNotify,
718 [out] PSC_RPC_NOTIFY_PARAMS_LIST *ppNotifyParams);
719
720 /* Function 49 */
721 DWORD RCloseNotifyHandle(
722 [in, out] LPSC_NOTIFY_RPC_HANDLE phNotify,
723 [out] PBOOL pfApcFired);
724
725 /* Function 50 */
726 DWORD RControlServiceExA(
727 [in] SC_RPC_HANDLE hService,
728 [in] DWORD dwControl,
729 [in] DWORD dwInfoLevel/*,
730 [in, switch_is(dwInfoLevel)] PSC_RPC_SERVICE_CONTROL_IN_PARAMSA pControlInParams,
731 [out, switch_is(dwInfoLevel)] PSC_RPC_SERVICE_CONTROL_IN_PARAMSA pControlOutParams*/);
732
733 /* Function 51 */
734 DWORD RControlServiceExW(
735 [in] SC_RPC_HANDLE hService,
736 [in] DWORD dwControl,
737 [in] DWORD dwInfoLevel/*,
738 [in, switch_is(dwInfoLevel)] PSC_RPC_SERVICE_CONTROL_IN_PARAMSW pControlInParams,
739 [out, switch_is(dwInfoLevel)] PSC_RPC_SERVICE_CONTROL_IN_PARAMSW pControlOutParams*/);
740
741 /* Function 52 */
742 DWORD RSendPnPMessage(
743 [in] handle_t BindingHandle); /* FIXME */
744
745 /* Function 53 */
746 DWORD RValidatePnPService(
747 [in] handle_t BindingHandle); /* FIXME */
748
749 /* Function 54 */
750 DWORD ROpenServiceStatusHandle(
751 [in] handle_t BindingHandle); /* FIXME */
752
753 /* Function 55 */
754 DWORD RFunction55(
755 [in] handle_t BindingHandle); /* FIXME */
756 }