source: trunk/src/advapi32/service.cpp@ 2143

Last change on this file since 2143 was 2143, checked in by sandervl, 26 years ago

Moved Service apis into separate sourcefile

File size: 42.9 KB
Line 
1/* $Id: service.cpp,v 1.1 1999-12-19 19:53:37 sandervl Exp $ */
2
3/*
4 * Win32 advanced API functions for OS/2
5 *
6 * 1998/06/12
7 *
8 * Copyright 1998 Sander van Leeuwen
9 * Copyright 1998 Patrick Haller
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15
16#include <os2win.h>
17#include <stdlib.h>
18#include <stdarg.h>
19#include <string.h>
20#include <odinwrap.h>
21#include "misc.h"
22#include "advapi32.h"
23#include "unicode.h"
24#include "winreg.h"
25
26ODINDEBUGCHANNEL(ADVAPI32-SERVICE)
27
28#define SC_HANDLE HANDLE
29#define SC_LOCK DWORD
30
31/*****************************************************************************
32 * Name : OpenSCManagerA
33 * Purpose : The OpenSCManager function establishes a connection to the
34 * service control manager on the specified computer and opens the
35 * specified database.
36 * Parameters: LPCSTR lpszMachineName address of machine name string
37 * LPCSTR lpszDatabaseName address of database name string
38 * DWORD fdwDesiredAccess type of access
39 * Variables :
40 * Result :
41 * Remark :
42 * Status : UNTESTED STUB
43 *
44 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
45 *****************************************************************************/
46
47SC_HANDLE WIN32API OpenSCManagerA(LPCSTR lpszMachineName,
48 LPCSTR lpszDatabaseName,
49 DWORD fdwDesiredAccess)
50{
51 dprintf(("ADVAPI32: OpenSCManagerA(%s,%s,%x) not implemented.\n",
52 lpszMachineName,
53 lpszDatabaseName,
54 fdwDesiredAccess));
55
56 return (NULL); /* signal failure */
57}
58
59
60/*****************************************************************************
61 * Name : OpenSCManagerW
62 * Purpose : The OpenSCManager function establishes a connection to the
63 * service control manager on the specified computer and opens the
64 * specified database.
65 * Parameters: LPCWSTR lpszMachineName address of machine name string
66 * LPCWSTR lpszDatabaseName address of database name string
67 * DWORD fdwDesiredAccess type of access
68 * Variables :
69 * Result :
70 * Remark :
71 * Status : UNTESTED STUB
72 *
73 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
74 *****************************************************************************/
75
76SC_HANDLE WIN32API OpenSCManagerW(LPCWSTR lpszMachineName,
77 LPCWSTR lpszDatabaseName,
78 DWORD fdwDesiredAccess)
79{
80 dprintf(("ADVAPI32: OpenSCManagerW(%x,%x,%x) not implemented.\n",
81 lpszMachineName,
82 lpszDatabaseName,
83 fdwDesiredAccess));
84
85 return (NULL); /* signal failure */
86}
87
88
89/*****************************************************************************
90 * Name : OpenServiceA
91 * Purpose : The OpenService function opens a handle to an existing service.
92 * Parameters: SC_HANDLE schSCManager handle of service control manager database
93 * LPCSTR lpszServiceName address of name of service to start
94 * DWORD fdwDesiredAccess type of access to service
95 * Variables :
96 * Result :
97 * Remark :
98 * Status : UNTESTED STUB
99 *
100 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
101 *****************************************************************************/
102
103SC_HANDLE WIN32API OpenServiceA(SC_HANDLE schSCManager,
104 LPCSTR lpszServiceName,
105 DWORD fdwDesiredAccess)
106{
107 dprintf(("ADVAPI32: OpenServiceA(%08xh,%s,%08xh) not implemented.\n",
108 schSCManager,
109 lpszServiceName,
110 fdwDesiredAccess));
111
112 return (NULL); /* signal failure */
113}
114
115
116/*****************************************************************************
117 * Name : OpenServiceW
118 * Purpose : The OpenService function opens a handle to an existing service.
119 * Parameters: SC_HANDLE schSCManager handle of service control manager database
120 * LPCWSTR lpszServiceName address of name of service to start
121 * DWORD fdwDesiredAccess type of access to service
122 * Variables :
123 * Result :
124 * Remark :
125 * Status : UNTESTED STUB
126 *
127 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
128 *****************************************************************************/
129
130SC_HANDLE WIN32API OpenServiceW(SC_HANDLE schSCManager,
131 LPCWSTR lpszServiceName,
132 DWORD fdwDesiredAccess)
133{
134 dprintf(("ADVAPI32: OpenServiceW(%08xh,%s,%08xh) not implemented.\n",
135 schSCManager,
136 lpszServiceName,
137 fdwDesiredAccess));
138
139 return (NULL); /* signal failure */
140}
141
142/*****************************************************************************
143 * Name : QueryServiceConfigA
144 * Purpose : The QueryServiceConfig function retrieves the configuration
145 * parameters of the specified service.
146 * Parameters: SC_HANDLE schService handle of service
147 * LPQUERY_SERVICE_CONFIG lpqscServConfig address of service config. structure
148 * DWORD cbBufSize size of service configuration buffer
149 * LPDWORD lpcbBytesNeeded address of variable for bytes needed
150 * Variables :
151 * Result :
152 * Remark :
153 * Status : UNTESTED STUB
154 *
155 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
156 *****************************************************************************/
157
158#define LPQUERY_SERVICE_CONFIG LPVOID
159BOOL WIN32API QueryServiceConfigA(SC_HANDLE schService,
160 LPQUERY_SERVICE_CONFIG lpqscServConfig,
161 DWORD cbBufSize,
162 LPDWORD lpcbBytesNeeded)
163{
164 dprintf(("ADVAPI32: QueryServiceConfigA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
165 schService,
166 lpqscServConfig,
167 cbBufSize,
168 lpcbBytesNeeded));
169
170 return (FALSE); /* signal failure */
171}
172
173
174/*****************************************************************************
175 * Name : QueryServiceConfigW
176 * Purpose : The QueryServiceConfig function retrieves the configuration
177 * parameters of the specified service.
178 * Parameters: SC_HANDLE schService handle of service
179 * LPQUERY_SERVICE_CONFIG lpqscServConfig address of service config. structure
180 * DWORD cbBufSize size of service configuration buffer
181 * LPDWORD lpcbBytesNeeded address of variable for bytes needed
182 * Variables :
183 * Result :
184 * Remark :
185 * Status : UNTESTED STUB
186 *
187 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
188 *****************************************************************************/
189
190BOOL WIN32API QueryServiceConfigW(SC_HANDLE schService,
191 LPQUERY_SERVICE_CONFIG lpqscServConfig,
192 DWORD cbBufSize,
193 LPDWORD lpcbBytesNeeded)
194{
195 dprintf(("ADVAPI32: QueryServiceConfigW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
196 schService,
197 lpqscServConfig,
198 cbBufSize,
199 lpcbBytesNeeded));
200
201 return (FALSE); /* signal failure */
202}
203
204
205/*****************************************************************************
206 * Name : QueryServiceLockStatusA
207 * Purpose : The QueryServiceLockStatus function retrieves the lock status
208 * of the specified service control manager database.
209 * Parameters: SC_HANDLE schSCManager handle of svc. ctrl. mgr. database
210 * LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat address of lock status structure
211 * DWORD cbBufSize size of service configuration buffer
212 * LPDWORD lpcbBytesNeeded address of variable for bytes needed
213 * Variables :
214 * Result :
215 * Remark :
216 * Status : UNTESTED STUB
217 *
218 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
219 *****************************************************************************/
220
221#define LPQUERY_SERVICE_LOCK_STATUS LPVOID
222BOOL WIN32API QueryServiceLockStatusA(SC_HANDLE schSCManager,
223 LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat,
224 DWORD cbBufSize,
225 LPDWORD lpcbBytesNeeded)
226{
227 dprintf(("ADVAPI32: QueryServiceLockStatusA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
228 schSCManager,
229 lpqslsLockStat,
230 cbBufSize,
231 lpcbBytesNeeded));
232
233 return (FALSE); /* signal failure */
234}
235
236
237/*****************************************************************************
238 * Name : QueryServiceLockStatusW
239 * Purpose : The QueryServiceLockStatus function retrieves the lock status
240 * of the specified service control manager database.
241 * Parameters: SC_HANDLE schSCManager handle of svc. ctrl. mgr. database
242 * LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat address of lock status structure
243 * DWORD cbBufSize size of service configuration buffer
244 * LPDWORD lpcbBytesNeeded address of variable for bytes needed
245 * Variables :
246 * Result :
247 * Remark :
248 * Status : UNTESTED STUB
249 *
250 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
251 *****************************************************************************/
252
253BOOL WIN32API QueryServiceLockStatusW(SC_HANDLE schSCManager,
254 LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat,
255 DWORD cbBufSize,
256 LPDWORD lpcbBytesNeeded)
257{
258 dprintf(("ADVAPI32: QueryServiceLockStatusW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
259 schSCManager,
260 lpqslsLockStat,
261 cbBufSize,
262 lpcbBytesNeeded));
263
264 return (FALSE); /* signal failure */
265}
266
267/*****************************************************************************
268 * Name : QueryServiceObjectSecurity
269 * Purpose : The QueryServiceObjectSecurity function retrieves a copy of the
270 * security descriptor protecting a service object.
271 * Parameters: SC_HANDLE schService handle of service
272 * SECURITY_INFORMATION fdwSecurityInfo type of security information requested
273 * PSECURITY_DESCRIPTOR psdSecurityDesc address of security descriptor
274 * DWORD cbBufSize size of security descriptor buffer
275 * LPDWORD lpcbBytesNeeded address of variable for bytes needed
276 * Variables :
277 * Result :
278 * Remark :
279 * Status : UNTESTED STUB
280 *
281 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
282 *****************************************************************************/
283
284BOOL WIN32API QueryServiceObjectSecurity(SC_HANDLE schService,
285 SECURITY_INFORMATION fdwSecurityInfo,
286 PSECURITY_DESCRIPTOR psdSecurityDesc,
287 DWORD cbBufSize,
288 LPDWORD lpcbBytesNeeded)
289{
290 dprintf(("ADVAPI32: QueryServiceObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
291 schService,
292 fdwSecurityInfo,
293 psdSecurityDesc,
294 cbBufSize,
295 lpcbBytesNeeded));
296
297 return (FALSE); /* signal failure */
298}
299
300
301/*****************************************************************************
302 * Name : QueryServiceStatus
303 * Purpose : The QueryServiceStatus function retrieves the current status of
304 * the specified service.
305 * Parameters: SC_HANDLE schService handle of service
306 * LPSERVICE_STATUS lpssServiceStatus address of service status structure
307 * Variables :
308 * Result :
309 * Remark :
310 * Status : UNTESTED STUB
311 *
312 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
313 *****************************************************************************/
314
315BOOL WIN32API QueryServiceStatus(SC_HANDLE schService,
316 LPSERVICE_STATUS lpssServiceStatus)
317{
318 dprintf(("ADVAPI32: QueryServiceStatus(%08xh,%08xh) not implemented.\n",
319 schService,
320 lpssServiceStatus));
321
322 return (FALSE); /* signal failure */
323}
324
325/*****************************************************************************
326 * Name : SetServiceObjectSecurity
327 * Purpose : The SetServiceObjectSecurity function sets the security
328 * descriptor of a service object.
329 * Parameters: SC_HANDLE schService handle of service
330 * SECURITY_INFORMATION fdwSecurityInfo type of security information requested
331 * PSECURITY_DESCRIPTOR psdSecurityDesc address of security descriptor
332 * Variables :
333 * Result :
334 * Remark :
335 * Status : UNTESTED STUB
336 *
337 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
338 *****************************************************************************/
339
340BOOL WIN32API SetServiceObjectSecurity(SC_HANDLE schService,
341 SECURITY_INFORMATION fdwSecurityInfo,
342 PSECURITY_DESCRIPTOR psdSecurityDesc)
343{
344 dprintf(("ADVAPI32: SetServiceObjectSecurity(%08xh,%08xh,%08xh) not implemented.\n",
345 schService,
346 fdwSecurityInfo,
347 psdSecurityDesc));
348
349 return (FALSE); /* signal failure */
350}
351
352/*****************************************************************************
353 * Name : ChangeServiceConfigA
354 * Purpose : The ChangeServiceConfig function changes the configuration
355 * parameters of a service.
356 * Parameters: SC_HANDLE hService handle of service
357 * DWORD dwServiceType type of service
358 * DWORD dwStartType when to start service
359 * DWORD dwErrorControl severity if service fails to start
360 * LPCSTR lpBinaryPathName address of service binary file name
361 * LPCSTR lpLoadOrderGroup address of load ordering group name
362 * LPDWORD lpdwTagId address of variable to get tag identifier
363 * LPCSTR lpDependencies address of array of dependency names
364 * LPCSTR lpServiceStartName address of account name of service
365 * LPCSTR lpPassword address of password for service account
366 * LPCSTR lpDisplayName address of display name
367 * Variables :
368 * Result :
369 * Remark :
370 * Status : UNTESTED STUB
371 *
372 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
373 *****************************************************************************/
374
375BOOL WIN32API ChangeServiceConfigA(SC_HANDLE hService,
376 DWORD dwServiceType,
377 DWORD dwStartType,
378 DWORD dwErrorControl,
379 LPCSTR lpBinaryPathName,
380 LPCSTR lpLoadOrderGroup,
381 LPDWORD lpdwTagId,
382 LPCSTR lpDependencies,
383 LPCSTR lpServiceStartName,
384 LPCSTR lpPassword,
385 LPCSTR lpDisplayName)
386{
387 dprintf(("ADVAPI32: ChangeServiceConfigA(%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s,%s) not implemented.\n",
388 hService,
389 dwServiceType,
390 dwStartType,
391 dwErrorControl,
392 lpBinaryPathName,
393 lpLoadOrderGroup,
394 lpdwTagId,
395 lpDependencies,
396 lpServiceStartName,
397 lpPassword,
398 lpDisplayName));
399
400 return (FALSE); /* signal failure */
401}
402
403
404/*****************************************************************************
405 * Name : ChangeServiceConfigW
406 * Purpose : The ChangeServiceConfig function changes the configuration
407 * parameters of a service.
408 * Parameters: SC_HANDLE hService handle of service
409 * DWORD dwServiceType type of service
410 * DWORD dwStartType when to start service
411 * DWORD dwErrorControl severity if service fails to start
412 * LPCWSTR lpBinaryPathName address of service binary file name
413 * LPCWSTR lpLoadOrderGroup address of load ordering group name
414 * LPDWORD lpdwTagId address of variable to get tag identifier
415 * LPCWSTR lpDependencies address of array of dependency names
416 * LPCWSTR lpServiceStartName address of account name of service
417 * LPCWSTR lpPassword address of password for service account
418 * LPCWSTR lpDisplayName address of display name
419 * Variables :
420 * Result :
421 * Remark :
422 * Status : UNTESTED STUB
423 *
424 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
425 *****************************************************************************/
426
427BOOL WIN32API ChangeServiceConfigW(SC_HANDLE hService,
428 DWORD dwServiceType,
429 DWORD dwStartType,
430 DWORD dwErrorControl,
431 LPCWSTR lpBinaryPathName,
432 LPCWSTR lpLoadOrderGroup,
433 LPDWORD lpdwTagId,
434 LPCWSTR lpDependencies,
435 LPCWSTR lpServiceStartName,
436 LPCWSTR lpPassword,
437 LPCWSTR lpDisplayName)
438{
439 dprintf(("ADVAPI32: ChangeServiceConfigW(%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s,%s) not implemented.\n",
440 hService,
441 dwServiceType,
442 dwStartType,
443 dwErrorControl,
444 lpBinaryPathName,
445 lpLoadOrderGroup,
446 lpdwTagId,
447 lpDependencies,
448 lpServiceStartName,
449 lpPassword,
450 lpDisplayName));
451
452 return (FALSE); /* signal failure */
453}
454
455
456/*****************************************************************************
457 * Name : CloseServiceHandle
458 * Purpose : The CloseServiceHandle function closes a handle to a service
459 * control manager database as returned by the OpenSCManager function,
460 * or it closes a handle to a service object as returned by either
461 * the OpenService or CreateService function.
462 * Parameters: SC_HANDLE hSCObject handle of service or service control manager database
463 * Variables :
464 * Result :
465 * Remark :
466 * Status : UNTESTED STUB
467 *
468 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
469 *****************************************************************************/
470
471BOOL WIN32API CloseServiceHandle(SC_HANDLE hSCObject)
472{
473 dprintf(("ADVAPI32: CloseServiceHandle(%08xh) not implemented.\n",
474 hSCObject));
475
476 return (FALSE); /* signal failure */
477}
478
479/*****************************************************************************
480 * Name : ControlService
481 * Purpose : The ControlService function sends a control code to a Win32 service.
482 * Parameters: SC_HANDLE hService handle of service
483 * DWORD dwControl control code
484 * LPSERVICE_STATUS lpServiceStatus address of service status structure
485 * Variables :
486 * Result :
487 * Remark :
488 * Status : UNTESTED STUB
489 *
490 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
491 *****************************************************************************/
492
493BOOL WIN32API ControlService(SC_HANDLE hService,
494 DWORD dwControl,
495 LPSERVICE_STATUS lpServiceStatus)
496{
497 dprintf(("ADVAPI32: ControlService(%08xh,%08xh,%08xh) not implemented.\n",
498 hService,
499 dwControl,
500 lpServiceStatus));
501
502 return (FALSE); /* signal failure */
503}
504
505
506/*****************************************************************************
507 * Name : CreateServiceA
508 * Purpose : The CreateService function creates a service object and adds it
509 * to the specified service control manager database.
510 * Parameters: SC_HANDLE hSCManager handle of service control manager database
511 * LPCSTR lpServiceName address of name of service to start
512 * LPCSTR lpDisplayName address of display name
513 * DWORD dwDesiredAccess type of access to service
514 * DWORD dwServiceType type of service
515 * DWORD dwStartType when to start service
516 * DWORD dwErrorControl severity if service fails to start
517 * LPCSTR lpBinaryPathName address of name of binary file
518 * LPCSTR lpLoadOrderGroup address of name of load ordering group
519 * LPDWORD lpdwTagId address of variable to get tag identifier
520 * LPCSTR lpDependencies address of array of dependency names
521 * LPCSTR lpServiceStartName address of account name of service
522 * LPCSTR lpPassword address of password for service account
523 * Variables :
524 * Result :
525 * Remark :
526 * Status : UNTESTED STUB
527 *
528 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
529 *****************************************************************************/
530
531SC_HANDLE WIN32API CreateServiceA(SC_HANDLE hSCManager,
532 LPCSTR lpServiceName,
533 LPCSTR lpDisplayName,
534 DWORD dwDesiredAccess,
535 DWORD dwServiceType,
536 DWORD dwStartType,
537 DWORD dwErrorControl,
538 LPCSTR lpBinaryPathName,
539 LPCSTR lpLoadOrderGroup,
540 LPDWORD lpdwTagId,
541 LPCSTR lpDependencies,
542 LPCSTR lpServiceStartName,
543 LPCSTR lpPassword)
544{
545 dprintf(("ADVAPI32: CreateServiceA(%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s) not implemented.\n",
546 hSCManager,
547 lpServiceName,
548 lpDisplayName,
549 dwDesiredAccess,
550 dwServiceType,
551 dwStartType,
552 dwErrorControl,
553 lpBinaryPathName,
554 lpLoadOrderGroup,
555 lpdwTagId,
556 lpDependencies,
557 lpServiceStartName,
558 lpPassword));
559
560 return (NULL); /* signal failure */
561}
562
563
564/*****************************************************************************
565 * Name : CreateServiceW
566 * Purpose : The CreateService function creates a service object and adds it
567 * to the specified service control manager database.
568 * Parameters: SC_HANDLE hSCManager handle of service control manager database
569 * LPCWSTR lpServiceName address of name of service to start
570 * LPCWSTR lpDisplayName address of display name
571 * DWORD dwDesiredAccess type of access to service
572 * DWORD dwServiceType type of service
573 * DWORD dwStartType when to start service
574 * DWORD dwErrorControl severity if service fails to start
575 * LPCWSTR lpBinaryPathName address of name of binary file
576 * LPCWSTR lpLoadOrderGroup address of name of load ordering group
577 * LPDWORD lpdwTagId address of variable to get tag identifier
578 * LPCWSTR lpDependencies address of array of dependency names
579 * LPCWSTR lpServiceStartName address of account name of service
580 * LPCWSTR lpPassword address of password for service account
581 * Variables :
582 * Result :
583 * Remark :
584 * Status : UNTESTED STUB
585 *
586 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
587 *****************************************************************************/
588
589SC_HANDLE WIN32API CreateServiceW(SC_HANDLE hSCManager,
590 LPCWSTR lpServiceName,
591 LPCWSTR lpDisplayName,
592 DWORD dwDesiredAccess,
593 DWORD dwServiceType,
594 DWORD dwStartType,
595 DWORD dwErrorControl,
596 LPCWSTR lpBinaryPathName,
597 LPCWSTR lpLoadOrderGroup,
598 LPDWORD lpdwTagId,
599 LPCWSTR lpDependencies,
600 LPCWSTR lpServiceStartName,
601 LPCWSTR lpPassword)
602{
603 dprintf(("ADVAPI32: CreateServiceW(%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s) not implemented.\n",
604 hSCManager,
605 lpServiceName,
606 lpDisplayName,
607 dwDesiredAccess,
608 dwServiceType,
609 dwStartType,
610 dwErrorControl,
611 lpBinaryPathName,
612 lpLoadOrderGroup,
613 lpdwTagId,
614 lpDependencies,
615 lpServiceStartName,
616 lpPassword));
617
618 return (NULL); /* signal failure */
619}
620
621/*****************************************************************************
622 * Name : DeleteService
623 * Purpose : The DeleteService function marks the specified service for
624 * deletion from the service control manager database.
625 * Parameters: SC_HANDLE hService handle of service
626 * Variables :
627 * Result :
628 * Remark :
629 * Status : UNTESTED STUB
630 *
631 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
632 *****************************************************************************/
633
634BOOL WIN32API DeleteService(SC_HANDLE hService)
635{
636 dprintf(("ADVAPI32: DeleteService(%08xh) not implemented.\n",
637 hService));
638
639 return (FALSE); /* signal failure */
640}
641
642/*****************************************************************************
643 * Name : EnumDependentServicesA
644 * Purpose : The EnumDependentServices function enumerates services that
645 * depend on another specified service; that is, the specified
646 * service must be running before the enumerated services can run.
647 * The name and status of each dependent service are provided.
648 * Parameters: SC_HANDLE hService handle of service
649 * DWORD dwServiceState state of services to enumerate
650 * LPENUM_SERVICE_STATUS lpServices address of service status buffer
651 * DWORD cbBufSize size of service status buffer
652 * LPDWORD pcbBytesNeeded address of variable for bytes needed
653 * LPDWORD lpServicesReturned address of variable for number returned
654 * Variables :
655 * Result :
656 * Remark :
657 * Status : UNTESTED STUB
658 *
659 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
660 *****************************************************************************/
661
662#define LPENUM_SERVICE_STATUS LPVOID
663BOOL WIN32API EnumDependentServicesA(SC_HANDLE hService,
664 DWORD dwServiceState,
665 LPENUM_SERVICE_STATUS lpServices,
666 DWORD cbBufSize,
667 LPDWORD pcbBytesNeeded,
668 LPDWORD lpServicesReturned)
669{
670 dprintf(("ADVAPI32: EnumDependentServicesA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
671 hService,
672 dwServiceState,
673 lpServices,
674 cbBufSize,
675 pcbBytesNeeded,
676 lpServicesReturned));
677
678 return (FALSE); /* signal failure */
679}
680
681
682/*****************************************************************************
683 * Name : EnumDependentServicesW
684 * Purpose : The EnumDependentServices function enumerates services that
685 * depend on another specified service; that is, the specified
686 * service must be running before the enumerated services can run.
687 * The name and status of each dependent service are provided.
688 * Parameters: SC_HANDLE hService handle of service
689 * DWORD dwServiceState state of services to enumerate
690 * LPENUM_SERVICE_STATUS lpServices address of service status buffer
691 * DWORD cbBufSize size of service status buffer
692 * LPDWORD pcbBytesNeeded address of variable for bytes needed
693 * LPDWORD lpServicesReturned address of variable for number returned
694 * Variables :
695 * Result :
696 * Remark :
697 * Status : UNTESTED STUB
698 *
699 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
700 *****************************************************************************/
701
702BOOL WIN32API EnumDependentServicesW(SC_HANDLE hService,
703 DWORD dwServiceState,
704 LPENUM_SERVICE_STATUS lpServices,
705 DWORD cbBufSize,
706 LPDWORD pcbBytesNeeded,
707 LPDWORD lpServicesReturned)
708{
709 dprintf(("ADVAPI32: EnumDependentServicesW(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
710 hService,
711 dwServiceState,
712 lpServices,
713 cbBufSize,
714 pcbBytesNeeded,
715 lpServicesReturned));
716
717 return (FALSE); /* signal failure */
718}
719
720
721/*****************************************************************************
722 * Name : EnumServicesStatusA
723 * Purpose : The EnumServicesStatus function enumerates services in the specified
724 * service control manager database. The name and status of each service are provided.
725 * Parameters: SC_HANDLE hSCManager handle of service control manager database
726 * DWORD dwServiceType type of services to enumerate
727 * DWORD dwServiceState state of services to enumerate
728 * LPENUM_SERVICE_STATUS lpServices address of service status buffer
729 * DWORD cbBufSize size of service status buffer
730 * LPDWORD pcbBytesNeeded address of variable for bytes needed
731 * LPDWORD lpServicesReturned address of variable for number returned
732 * LPDWORD lpResumeHandle address of variable for next entry
733 * Variables :
734 * Result :
735 * Remark :
736 * Status : UNTESTED STUB
737 *
738 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
739 *****************************************************************************/
740
741BOOL WIN32API EnumServicesStatusA(SC_HANDLE hSCManager,
742 DWORD dwServiceType,
743 DWORD dwServiceState,
744 LPENUM_SERVICE_STATUS lpServices,
745 DWORD cbBufSize,
746 LPDWORD pcbBytesNeeded,
747 LPDWORD lpServicesReturned,
748 LPDWORD lpResumeHandle)
749{
750 dprintf(("ADVAPI32: EnumServicesStatusA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
751 hSCManager,
752 dwServiceType,
753 dwServiceState,
754 lpServices,
755 cbBufSize,
756 pcbBytesNeeded,
757 lpServicesReturned,
758 lpResumeHandle));
759
760 return (FALSE); /* signal failure */
761}
762
763
764/*****************************************************************************
765 * Name : EnumServicesStatusW
766 * Purpose : The EnumServicesStatus function enumerates services in the specified
767 * service control manager database. The name and status of each service are provided.
768 * Parameters: SC_HANDLE hSCManager handle of service control manager database
769 * DWORD dwServiceType type of services to enumerate
770 * DWORD dwServiceState state of services to enumerate
771 * LPENUM_SERVICE_STATUS lpServices address of service status buffer
772 * DWORD cbBufSize size of service status buffer
773 * LPDWORD pcbBytesNeeded address of variable for bytes needed
774 * LPDWORD lpServicesReturned address of variable for number returned
775 * LPDWORD lpResumeHandle address of variable for next entry
776 * Variables :
777 * Result :
778 * Remark :
779 * Status : UNTESTED STUB
780 *
781 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
782 *****************************************************************************/
783
784BOOL WIN32API EnumServicesStatusW(SC_HANDLE hSCManager,
785 DWORD dwServiceType,
786 DWORD dwServiceState,
787 LPENUM_SERVICE_STATUS lpServices,
788 DWORD cbBufSize,
789 LPDWORD pcbBytesNeeded,
790 LPDWORD lpServicesReturned,
791 LPDWORD lpResumeHandle)
792{
793 dprintf(("ADVAPI32: EnumServicesStatusW(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
794 hSCManager,
795 dwServiceType,
796 dwServiceState,
797 lpServices,
798 cbBufSize,
799 pcbBytesNeeded,
800 lpServicesReturned,
801 lpResumeHandle));
802
803 return (FALSE); /* signal failure */
804}
805
806/*****************************************************************************
807 * Name : GetServiceDisplayNameA
808 * Purpose : The GetServiceDisplayName function obtains the display name that
809 * is associated with a particular service name. The service name
810 * is the same as the service's registry key name.
811 * Parameters: SC_HANDLE hSCManager handle to a service control manager database
812 * LPCSTR lpServiceName the service name
813 * LPTSTR lpDisplayName buffer to receive the service's display name
814 * LPDWORD lpcchBuffer size of display name buffer and display name
815 * Variables :
816 * Result :
817 * Remark :
818 * Status : UNTESTED STUB
819 *
820 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
821 *****************************************************************************/
822
823BOOL WIN32API GetServiceDisplayNameA(SC_HANDLE hSCManager,
824 LPCSTR lpServiceName,
825 LPTSTR lpDisplayName,
826 LPDWORD lpcchBuffer)
827{
828 dprintf(("ADVAPI32: GetServiceDisplayNameA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
829 hSCManager,
830 lpServiceName,
831 lpDisplayName,
832 lpcchBuffer));
833
834 return (FALSE); /* signal failure */
835}
836
837
838/*****************************************************************************
839 * Name : GetServiceDisplayNameW
840 * Purpose : The GetServiceDisplayName function obtains the display name that
841 * is associated with a particular service name. The service name
842 * is the same as the service's registry key name.
843 * Parameters: SC_HANDLE hSCManager handle to a service control manager database
844 * LPCWSTR lpServiceName the service name
845 * LPWSTR lpDisplayName buffer to receive the service's display name
846 * LPDWORD lpcchBuffer size of display name buffer and display name
847 * Variables :
848 * Result :
849 * Remark :
850 * Status : UNTESTED STUB
851 *
852 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
853 *****************************************************************************/
854
855BOOL WIN32API GetServiceDisplayNameW(SC_HANDLE hSCManager,
856 LPCWSTR lpServiceName,
857 LPWSTR lpDisplayName,
858 LPDWORD lpcchBuffer)
859{
860 dprintf(("ADVAPI32: GetServiceDisplayNameW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
861 hSCManager,
862 lpServiceName,
863 lpDisplayName,
864 lpcchBuffer));
865
866 return (FALSE); /* signal failure */
867}
868
869/*****************************************************************************
870 * Name : GetServiceKeyNameA
871 * Purpose : The GetServiceKeyName function obtains the service name that is
872 * associated with a particular service's display name. The service
873 * name is the same as the service's registry key name.
874 * Parameters: SC_HANDLE hSCManager handle to a service control manager database
875 * LPCSTR lpDisplayName the service's display name
876 * LPTSTR lpServiceName buffer to receive the service name
877 * LPDWORD lpcchBuffer size of service name buffer and service name
878 * Variables :
879 * Result :
880 * Remark :
881 * Status : UNTESTED STUB
882 *
883 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
884 *****************************************************************************/
885
886BOOL WIN32API GetServiceKeyNameA(SC_HANDLE hSCManager,
887 LPCSTR lpDisplayName,
888 LPTSTR lpServiceName,
889 LPDWORD lpcchBuffer)
890{
891 dprintf(("ADVAPI32: GetServiceKeyNameA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
892 hSCManager,
893 lpDisplayName,
894 lpServiceName,
895 lpcchBuffer));
896
897 return (FALSE); /* signal failure */
898}
899
900
901/*****************************************************************************
902 * Name : GetServiceKeyNameW
903 * Purpose : The GetServiceKeyName function obtains the service name that is
904 * associated with a particular service's display name. The service
905 * name is the same as the service's registry key name.
906 * Parameters: SC_HANDLE hSCManager handle to a service control manager database
907 * LPCWSTR lpDisplayName the service's display name
908 * LPWSTR lpServiceName buffer to receive the service name
909 * LPDWORD lpcchBuffer size of service name buffer and service name
910 * Variables :
911 * Result :
912 * Remark :
913 * Status : UNTESTED STUB
914 *
915 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
916 *****************************************************************************/
917
918BOOL WIN32API GetServiceKeyNameW(SC_HANDLE hSCManager,
919 LPCWSTR lpDisplayName,
920 LPWSTR lpServiceName,
921 LPDWORD lpcchBuffer)
922{
923 dprintf(("ADVAPI32: GetServiceKeyNameW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
924 hSCManager,
925 lpDisplayName,
926 lpServiceName,
927 lpcchBuffer));
928
929 return (FALSE); /* signal failure */
930}
931
932/*****************************************************************************
933 * Name : LockServiceDatabase
934 * Purpose : The LockServiceDatabase function locks a specified database.
935 * Parameters: SC_HANDLE hSCManager handle of service control manager database
936 * Variables :
937 * Result :
938 * Remark :
939 * Status : UNTESTED STUB
940 *
941 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
942 *****************************************************************************/
943
944SC_LOCK WIN32API LockServiceDatabase(SC_HANDLE hSCManager)
945{
946 dprintf(("ADVAPI32: LockServiceDatabase(%08xh) not implemented.\n",
947 hSCManager));
948
949 return (ERROR_ACCESS_DENIED); /* signal failure */
950}
951
952/*****************************************************************************
953 * Name : UnlockServiceDatabase
954 * Purpose : The UnlockServiceDatabase function unlocks a service control
955 * manager database by releasing the specified lock.
956 * Parameters: SC_LOCK sclLock service control manager database lock to be released
957 * Variables :
958 * Result :
959 * Remark :
960 * Status : UNTESTED STUB
961 *
962 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
963
964 *****************************************************************************/
965
966BOOL WIN32API UnlockServiceDatabase(SC_LOCK sclLock)
967{
968 dprintf(("ADVAPI32: UnlockServiceDatabase(%08xh) not implemented.\n",
969 sclLock));
970
971 return (FALSE); /* signal failure */
972}
973
974/*****************************************************************************
975 * Name : StartServiceA
976 * Purpose : The StartService function starts the execution of a service.
977 * Parameters: SC_HANDLE schService handle of service
978 * DWORD dwNumServiceArgs number of arguments
979 * LPCSTR *lpszServiceArgs address of array of argument string pointers
980 * Variables :
981 * Result :
982 * Remark :
983 * Status : UNTESTED STUB
984 *
985 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
986 *****************************************************************************/
987
988BOOL WIN32API StartServiceA(SC_HANDLE schService,
989 DWORD dwNumServiceArgs,
990 LPCSTR *lpszServiceArgs)
991{
992 dprintf(("ADVAPI32: StartServiceA(%08xh,%08xh,%s) not implemented.\n",
993 schService,
994 dwNumServiceArgs,
995 lpszServiceArgs));
996
997 return (FALSE); /* signal failure */
998}
999
1000/*****************************************************************************
1001 * Name : StartServiceW
1002 * Purpose : The StartService function starts the execution of a service.
1003 * Parameters: SC_HANDLE schService handle of service
1004 * DWORD dwNumServiceArgs number of arguments
1005 * LPCWSTR *lpszServiceArgs address of array of argument string pointers
1006 * Variables :
1007 * Result :
1008 * Remark :
1009 * Status : UNTESTED STUB
1010 *
1011 * Author : Patrick Haller [Tue, 1998/06/16 23:00]
1012 *****************************************************************************/
1013
1014BOOL WIN32API StartServiceW(SC_HANDLE schService,
1015 DWORD dwNumServiceArgs,
1016 LPCWSTR *lpszServiceArgs)
1017{
1018 dprintf(("ADVAPI32: StartServiceW(%08xh,%08xh,%s) not implemented.\n",
1019 schService,
1020 dwNumServiceArgs,
1021 lpszServiceArgs));
1022
1023 return (FALSE); /* signal failure */
1024}
1025
Note: See TracBrowser for help on using the repository browser.