Use RPC for making calls to the Service Control Manager.
[reactos.git] / reactos / include / idl / svcctl.idl
1 /*
2 * Service Control Manager (SCM) interface definition
3 */
4
5 //#include <windef.h>
6 //#include <winsvc.h>
7
8 #define DWORD unsigned long
9 #define BOOL unsigned long
10 #define SC_HANDLE unsigned int
11 #define LPCSTR char*
12 #define LPCWSTR wchar_t*
13
14 [
15 uuid(367abb81-9844-35f1-ad32-98f038001003),
16 version(2.0),
17 pointer_default(unique),
18 explicit_handle
19 ]
20 interface svcctl
21 {
22 cpp_quote("#if 0");
23 typedef struct _SERVICE_STATUS
24 {
25 DWORD dwServiceType;
26 DWORD dwCurrentState;
27 DWORD dwControlsAccepted;
28 DWORD dwWin32ExitCode;
29 DWORD dwServiceSpecificExitCode;
30 DWORD dwCheckPoint;
31 DWORD dwWaitHint;
32 } SERVICE_STATUS, *LPSERVICE_STATUS;
33 cpp_quote("#endif");
34
35 /* Service 0 */
36 DWORD ScmrCloseServiceHandle([in] handle_t BindingHandle,
37 [in] SC_HANDLE hSCObject);
38
39 /* Service 1 */
40 // BOOL ScmrControlService([in] handle_t BindingHandle,
41 // [in] SC_HANDLE hService,
42 // [in] DWORD dwControl,
43 // [out] LPSERVICE_STATUS lpServiceStatus);
44
45 /* Service 2 */
46 DWORD ScmrDeleteService([in] handle_t BindingHandle,
47 [in] SC_HANDLE hService);
48
49 DWORD ScmrOpenSCManagerA([in] handle_t BindingHandle,
50 [in, string, unique] LPCSTR lpMachineName,
51 [in, string, unique] LPCSTR lpDatabaseName,
52 [in] DWORD dwDesiredAccess,
53 [out] SC_HANDLE *hScm);
54
55 DWORD ScmrOpenSCManagerW([in] handle_t BindingHandle,
56 [in, string, unique] LPCWSTR lpMachineName,
57 [in, string, unique] LPCWSTR lpDatabaseName,
58 [in] DWORD dwDesiredAccess,
59 [out] SC_HANDLE *hScm);
60
61 SC_HANDLE ScmrOpenServiceA([in] handle_t BindingHandle,
62 [in] SC_HANDLE hSCManager,
63 [in, string] LPCSTR lpServiceName,
64 [in] DWORD dwDesiredAccess,
65 [out] SC_HANDLE *hScm);
66
67 SC_HANDLE ScmrOpenServiceW([in] handle_t BindingHandle,
68 [in] SC_HANDLE hSCManager,
69 [in, string] LPCWSTR lpServiceName,
70 [in] DWORD dwDesiredAccess,
71 [out] SC_HANDLE *hScm);
72 }