2 * Service Control Manager - Protocol Header
4 * Copyright (C) 2004 Filip Navara
6 * This software is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This software is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this software; see the file COPYING.LIB. If not, write
18 * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
21 * $Id: scmprot.h,v 1.1 2004/04/12 17:14:26 navaraf Exp $
29 * This protocol isn't compatible with the Windows (R) one. Since
30 * Windows (R) XP (or 2000?) all the communcation goes through RPC.
31 * We don't have RPC implemented yet, so it can't be used yet :(
40 #define INIT_SCM_STRING(x, y) x.Length = wcslen(y) * sizeof(WCHAR), RtlCopyMemory(x.Buffer, y, x.Length + sizeof(UNICODE_NULL))
46 #define SCM_OPENSERVICE 0x14
47 #define SCM_CREATESERVICE 0x20
49 typedef struct _SCM_OPENSERVICE_REQUEST
52 SCM_STRING ServiceName
;
53 DWORD dwDesiredAccess
;
54 } SCM_OPENSERVICE_REQUEST
, *PSCM_OPENSERVICE_REQUEST
;
56 typedef struct _SCM_OPENSERVICE_REPLY
60 } SCM_OPENSERVICE_REPLY
, *PSCM_OPENSERVICE_REPLY
;
62 typedef struct _SCM_CREATESERVICE_REQUEST
65 SCM_STRING ServiceName
;
66 SCM_STRING DisplayName
;
67 DWORD dwDesiredAccess
;
71 SCM_STRING BinaryPathName
;
72 SCM_STRING LoadOrderGroup
;
73 SCM_STRING Dependencies
;
74 SCM_STRING ServiceStartName
;
76 } SCM_CREATESERVICE_REQUEST
, *PSCM_CREATESERVICE_REQUEST
;
78 typedef struct _SCM_CREATESERVICE_REPLY
82 } SCM_CREATESERVICE_REPLY
, *PSCM_CREATESERVICE_REPLY
;
84 typedef union _SCM_REQUEST
87 SCM_OPENSERVICE_REQUEST OpenService
;
88 SCM_CREATESERVICE_REQUEST CreateService
;
89 } SCM_REQUEST
, *PSCM_REQUEST
;
91 typedef union _SCM_REPLY
94 SCM_OPENSERVICE_REPLY OpenService
;
95 SCM_CREATESERVICE_REPLY CreateService
;
96 } SCM_REPLY
, *PSCM_REPLY
;
99 * Per service requests
102 #define SCM_DELETESERVICE 0x10
103 #define SCM_STARTSERVICE 0x11
105 typedef union _SCM_SERVICE_REQUEST
108 } SCM_SERVICE_REQUEST
, *PSCM_SERVICE_REQUEST
;
110 typedef union _SCM_SERVICE_REPLY
113 } SCM_SERVICE_REPLY
, *PSCM_SERVICE_REPLY
;