~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/include/wine/svcctl.idl

Version: ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * svcctl interface definitions - exported by services.exe to access the
  3  * services database
  4  *
  5  * Copyright 2007 Google (Mikolaj Zalewski)
  6  *
  7  * This library is free software; you can redistribute it and/or
  8  * modify it under the terms of the GNU Lesser General Public
  9  * License as published by the Free Software Foundation; either
 10  * version 2.1 of the License, or (at your option) any later version.
 11  *
 12  * This library is distributed in the hope that it will be useful,
 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15  * Lesser General Public License for more details.
 16  *
 17  * You should have received a copy of the GNU Lesser General Public
 18  * License along with this library; if not, write to the Free Software
 19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 20  */
 21 
 22 import "wtypes.idl";
 23 
 24 /*
 25  * some defined for the C code
 26  */
 27 cpp_quote("#include \"winsvc.h\"")
 28 cpp_quote("#define SVCCTL_TRANSPORT {'n','c','a','c','n','_','n','p',0}")
 29 cpp_quote("#define SVCCTL_ENDPOINT {'\\\\','p','i','p','e','\\\\','s','v','c','c','t','l',0}")
 30 
 31 /* Not the Windows event name - if needed the true one can be found in Inside Windows */
 32 cpp_quote("#define SVCCTL_STARTED_EVENT {'_','_','w','i','n','e','_','S','v','c','c','t','l','S','t','a','r','t','e','d',0}")
 33 
 34 /* Service startup protocol over control pipe - not compatible with Windows */
 35 enum service_pipe_command
 36 {
 37     WINESERV_STARTINFO = 1,
 38     WINESERV_SENDCONTROL = 2
 39 };
 40 
 41 typedef struct service_start_info_t
 42 {
 43     enum service_pipe_command cmd;        /* request code */
 44     DWORD                     total_size; /* total request size */
 45     DWORD                     name_size;  /* size of name in data buffer */
 46     DWORD                     control;    /* control code */
 47     WCHAR                     data[1];
 48 } service_start_info;
 49 
 50 [
 51     uuid(367abb81-9844-35f1-ad32-98f038001003),
 52     version(2.0),
 53     pointer_default(unique),
 54     endpoint("ncacn_np:[\\pipe\\svcctl]")
 55 ]
 56 interface svcctl
 57 {
 58     /* handle types */
 59     typedef [handle] LPCWSTR MACHINE_HANDLEW;
 60     typedef [context_handle] void *SC_RPC_HANDLE;
 61     typedef [context_handle] void *SC_RPC_LOCK;
 62 
 63     /* undocumented access rights */
 64     cpp_quote("#define SERVICE_SET_STATUS   0x8000")
 65 
 66 cpp_quote("#if 0 /* already defined in winsvc.h */")
 67 typedef struct _QUERY_SERVICE_CONFIGW {
 68     DWORD   dwServiceType;
 69     DWORD   dwStartType;
 70     DWORD   dwErrorControl;
 71     [unique] LPWSTR  lpBinaryPathName;
 72     [unique] LPWSTR  lpLoadOrderGroup;
 73     DWORD   dwTagId;
 74     [unique] LPWSTR  lpDependencies;
 75     [unique] LPWSTR  lpServiceStartName;
 76     [unique] LPWSTR  lpDisplayName;
 77 } QUERY_SERVICE_CONFIGW, *LPQUERY_SERVICE_CONFIGW;
 78 
 79 typedef struct _SERVICE_STATUS {
 80   DWORD dwServiceType;
 81   DWORD dwCurrentState;
 82   DWORD dwControlsAccepted;
 83   DWORD dwWin32ExitCode;
 84   DWORD dwServiceSpecificExitCode;
 85   DWORD dwCheckPoint;
 86   DWORD dwWaitHint;
 87 } SERVICE_STATUS, *LPSERVICE_STATUS;
 88 
 89 typedef enum _SC_STATUS_TYPE {
 90   SC_STATUS_PROCESS_INFO      = 0
 91 } SC_STATUS_TYPE;
 92 
 93 typedef struct _SERVICE_DESCRIPTIONW {
 94    LPWSTR lpDescription;
 95 } SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
 96 
 97 typedef enum _SC_ACTION_TYPE {
 98     SC_ACTION_NONE        = 0,
 99     SC_ACTION_RESTART     = 1,
100     SC_ACTION_REBOOT      = 2,
101     SC_ACTION_RUN_COMMAND = 3
102 } SC_ACTION_TYPE;
103 
104 typedef struct _SC_ACTION {
105     SC_ACTION_TYPE  Type;
106     DWORD       Delay;
107 } SC_ACTION,*LPSC_ACTION;
108 
109 typedef struct _SERVICE_FAILURE_ACTIONSW {
110     DWORD dwResetPeriod;
111     [unique] LPWSTR lpRebootMsg;
112     [unique] LPWSTR lpCommand;
113     DWORD cActions;
114     [size_is(cActions)] SC_ACTION *lpsaActions;
115 } SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
116 
117 #define SERVICE_CONFIG_DESCRIPTION              1
118 #define SERVICE_CONFIG_FAILURE_ACTIONS          2
119 #define SERVICE_CONFIG_DELAYED_AUTO_START_INFO  3
120 #define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG     4
121 #define SERVICE_CONFIG_SERVICE_SID_INFO         5
122 #define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6
123 #define SERVICE_CONFIG_PRESHUTDOWN_INFO         7
124 
125 cpp_quote("#endif")
126 
127 typedef [switch_type(DWORD)] union
128 {
129   [case (SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONW descr;
130   [case (SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSW actions;
131 } SERVICE_CONFIG2W;
132 
133     /* Compatible with Windows function 0x00 */
134     DWORD svcctl_CloseServiceHandle(
135         [in,out] SC_RPC_HANDLE *handle
136     );
137 
138     /* Compatible with Windows function 0x01 */
139     DWORD svcctl_ControlService(
140         [in] SC_RPC_HANDLE hService,
141         [in] DWORD dwControl,
142         [out] SERVICE_STATUS *lpServiceStatus
143     );
144 
145     /* Compatible with Windows function 0x02 */
146     DWORD svcctl_DeleteService(
147         [in] SC_RPC_HANDLE hService
148     );
149 
150     /* Compatible with Windows function 0x03 */
151     DWORD svcctl_LockServiceDatabase(
152         [in] SC_RPC_HANDLE hSCManager,
153         [out] SC_RPC_LOCK *phLock
154     );
155 
156     /* Not compatible with Windows function 0x04 */
157     DWORD svcctl_QueryServiceObjectSecurity(/* FIXME */);
158 
159     /* Not compatible with Windows function 0x05 */
160     DWORD svcctl_SetServiceObjectSecurity(/* FIXME */);
161 
162     /* Not compatible with Windows function 0x06 */
163     DWORD svcctl_QueryServiceStatus(/* FIXME */);
164 
165     /* Compatible with Windows function 0x07 */
166     DWORD svcctl_SetServiceStatus(
167         [in] SC_RPC_HANDLE hServiceStatus,
168         [in] LPSERVICE_STATUS lpServiceStatus
169     );
170 
171     /* Compatible with Windows function 0x08 */
172     DWORD svcctl_UnlockServiceDatabase(
173         [in,out] SC_RPC_LOCK *phLock
174     );
175 
176     /* Not compatible with Windows function 0x09 */
177     DWORD svcctl_NotifyBootConfigStatus(/* FIXME */);
178 
179     /* Not compatible with Windows function 0x0a */
180     DWORD svcctl_SCSetServiceBitsW(/* FIXME */);
181 
182     /* Compatible with Windows function 0x0b */
183     DWORD svcctl_ChangeServiceConfigW(
184         [in] SC_RPC_HANDLE hService,
185         [in] DWORD dwServiceType,
186         [in] DWORD dwStartType,
187         [in] DWORD dwErrorControl,
188         [in,unique] LPCWSTR lpBinaryPathName,
189         [in,unique] LPCWSTR lpLoadOrderGroupKey,
190         [in,out,unique] DWORD *lpdwTagId,
191         [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
192         [in] DWORD dwDependenciesSize,
193         [in,unique] LPCWSTR lpServiceStartName,
194         [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
195         [in] DWORD dwPasswordSize,
196         [in,unique] LPCWSTR lpDisplayName
197     );
198 
199     /* Compatible with Windows function 0x0c */
200     DWORD svcctl_CreateServiceW(
201         [in] SC_RPC_HANDLE hSCManager,
202         [in] LPCWSTR lpServiceName,
203         [in,unique] LPCWSTR lpDisplayName,
204         [in] DWORD dwDesiredAccess,
205         [in] DWORD dwServiceType,
206         [in] DWORD dwStartType,
207         [in] DWORD dwErrorControl,
208         [in] LPCWSTR lpBinaryPathName,
209         [in,unique] LPCWSTR lpLoadOrderGroup,
210         [in,out,unique] DWORD *lpdwTagId,
211         [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
212         [in] DWORD dwDependenciesSize,
213         [in,unique] LPCWSTR lpServiceStartName,
214         [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
215         [in] DWORD dwPasswordSize,
216         [out] SC_RPC_HANDLE *phService
217     );
218 
219     /* Not compatible with Windows function 0x0d */
220     DWORD svcctl_EnumDependentServicesW(/* FIXME */);
221 
222     /* Not compatible with Windows function 0x0e */
223     DWORD svcctl_EnumServicesStatusW(/* FIXME */);
224 
225     /* Compatible with Windows function 0x0f */
226     DWORD svcctl_OpenSCManagerW(
227         [in,unique] MACHINE_HANDLEW MachineName,
228         [in,unique] LPCWSTR DatabaseName,
229         [in] DWORD dwAccessMask,
230         [out] SC_RPC_HANDLE *handle
231     );
232 
233     /* Compatible with Windows function 0x10 */
234     DWORD svcctl_OpenServiceW(
235         [in] SC_RPC_HANDLE hSCManager,
236         [in] LPCWSTR lpServiceName,
237         [in] DWORD dwDesiredAccess,
238         [out] SC_RPC_HANDLE *phService
239     );
240 
241     /* Windows function 0x11 must be using a different prototype - not compatible */
242     DWORD svcctl_QueryServiceConfigW(
243         [in] SC_RPC_HANDLE hService,
244         [out] QUERY_SERVICE_CONFIGW *config);
245 
246     /* Not compatible with Windows function 0x12 */
247     DWORD svcctl_QueryServiceLockStatusW(/* FIXME */);
248 
249     /* Untested with Windows function 0x13 */
250     DWORD svcctl_StartServiceW(
251         [in] SC_RPC_HANDLE hService,
252         [in] DWORD dwNumServiceArgs,
253         [in,unique,size_is(dwNumServiceArgs)] LPCWSTR *lpServiceArgVectors
254     );
255 
256     /* Compatible with Windows function 0x14 */
257     DWORD svcctl_GetServiceDisplayNameW(
258         [in] SC_RPC_HANDLE hSCManager,
259         [in] LPCWSTR lpServiceName,
260         [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
261         [in,out] DWORD *cchBufSize);
262 
263     /* Compatible with Windows function 0x15 */
264     DWORD svcctl_GetServiceKeyNameW(
265         [in] SC_RPC_HANDLE hSCManager,
266         [in] LPCWSTR lpServiceDisplayName,
267         [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
268         [in,out] DWORD *cchBufSize);
269 
270     /* Not compatible with Windows function 0x16 */
271     DWORD svcctl_SCSetServiceBitsA(/* FIXME */);
272 
273     /* Not compatible with Windows function 0x17 */
274     DWORD svcctl_ChangeServiceConfigA(/* FIXME */);
275 
276     /* Not compatible with Windows function 0x18 */
277     DWORD svcctl_CreateServiceA(/* FIXME */);
278 
279     /* Not compatible with Windows function 0x19 */
280     DWORD svcctl_EnumDependentServicesA(/* FIXME */);
281 
282     /* Not compatible with Windows function 0x1a */
283     DWORD svcctl_EnumServicesStatusA(/* FIXME */);
284 
285     /* Not compatible with Windows function 0x1b */
286     DWORD svcctl_OpenSCManagerA(/* FIXME */);
287 
288     /* Not compatible with Windows function 0x1c */
289     DWORD svcctl_OpenServiceA(/* FIXME */);
290 
291     /* Not compatible with Windows function 0x1d */
292     DWORD svcctl_QueryServiceConfigA(/* FIXME */);
293 
294     /* Not compatible with Windows function 0x1e */
295     DWORD svcctl_QueryServiceLockStatusA(/* FIXME */);
296 
297     /* Not compatible with Windows function 0x1f */
298     DWORD svcctl_StartServiceA(/* FIXME */);
299 
300     /* Not compatible with Windows function 0x20 */
301     DWORD svcctl_GetServiceDisplayNameA(/* FIXME */);
302 
303     /* Not compatible with Windows function 0x21 */
304     DWORD svcctl_GetServiceKeyNameA(/* FIXME */);
305 
306     /* Not compatible with Windows function 0x22 */
307     DWORD svcctl_GetCurrentGroupStateW(/* FIXME */);
308 
309     /* Not compatible with Windows function 0x23 */
310     DWORD svcctl_EnumServiceGroupW(/* FIXME */);
311 
312     /* Not compatible with Windows function 0x24 */
313     DWORD svcctl_ChangeServiceConfig2A(/* FIXME */);
314 
315     /* Untested with Windows function 0x25 */
316     DWORD svcctl_ChangeServiceConfig2W(
317         [in] SC_RPC_HANDLE hService,
318         [in] DWORD InfoLevel,
319         [in,switch_is(InfoLevel)] SERVICE_CONFIG2W *config );
320 
321     /* Not compatible with Windows function 0x26 */
322     DWORD svcctl_QueryServiceConfig2A(/* FIXME */);
323 
324     /* Untested with Windows function 0x27 */
325     DWORD svcctl_QueryServiceConfig2W(
326         [in] SC_RPC_HANDLE hService,
327         [in] DWORD InfoLevel,
328         [out,size_is(cbBufSize)] BYTE lpBuffer[],
329         [in] DWORD cbBufSize,
330         [out] LPDWORD pcbBytesNeeded
331     );
332 
333     /* Untested with Windows function 0x28 */
334     DWORD svcctl_QueryServiceStatusEx(
335         [in] SC_RPC_HANDLE hService,
336         [in] SC_STATUS_TYPE InfoLevel,
337         [out,size_is(cbBufSize)] BYTE *lpBuffer,
338         [in] DWORD cbBufSize,
339         [out] LPDWORD pcbBytesNeeded
340     );
341 }

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.