VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/svcctl.idl@ 22496

最後變更 在這個檔案從22496是 22496,由 vboxsync 提交於 16 年 前

crOpenGL: update wine to 1.1.27 and better fix for depthstencil surface refcounting

  • 屬性 svn:eol-style 設為 native
檔案大小: 12.1 KB
 
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/*
23 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
24 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
25 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
26 * a choice of LGPL license versions is made available with the language indicating
27 * that LGPLv2 or any later version may be used, or where a choice of which version
28 * of the LGPL is applied is otherwise unspecified.
29 */
30
31/*
32 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
33 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
34 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
35 * a choice of LGPL license versions is made available with the language indicating
36 * that LGPLv2 or any later version may be used, or where a choice of which version
37 * of the LGPL is applied is otherwise unspecified.
38 */
39
40import "wtypes.idl";
41
42/*
43 * some defined for the C code
44 */
45cpp_quote("#include \"winsvc.h\"")
46cpp_quote("#define SVCCTL_TRANSPORT {'n','c','a','c','n','_','n','p',0}")
47cpp_quote("#define SVCCTL_ENDPOINT {'\\\\','p','i','p','e','\\\\','s','v','c','c','t','l',0}")
48
49/* Not the Windows event name - if needed the true one can be found in Inside Windows */
50cpp_quote("#define SVCCTL_STARTED_EVENT {'_','_','w','i','n','e','_','S','v','c','c','t','l','S','t','a','r','t','e','d',0}")
51
52/* Service startup protocol over control pipe - not compatible with Windows */
53enum service_pipe_command
54{
55 WINESERV_STARTINFO = 1,
56 WINESERV_SENDCONTROL = 2
57};
58
59typedef struct service_start_info_t
60{
61 enum service_pipe_command cmd; /* request code */
62 DWORD total_size; /* total request size */
63 DWORD name_size; /* size of name in data buffer */
64 DWORD control; /* control code */
65 WCHAR data[1];
66} service_start_info;
67
68[
69 uuid(367abb81-9844-35f1-ad32-98f038001003),
70 version(2.0),
71 pointer_default(unique),
72 endpoint("ncacn_np:[\\pipe\\svcctl]")
73]
74interface svcctl
75{
76 /* handle types */
77 typedef [handle] LPCWSTR MACHINE_HANDLEW;
78 typedef [context_handle] void *SC_RPC_HANDLE;
79 typedef [context_handle] void *SC_RPC_LOCK;
80
81 /* undocumented access rights */
82 cpp_quote("#define SERVICE_SET_STATUS 0x8000")
83
84cpp_quote("#if 0 /* already defined in winsvc.h */")
85typedef struct _QUERY_SERVICE_CONFIGW {
86 DWORD dwServiceType;
87 DWORD dwStartType;
88 DWORD dwErrorControl;
89 [unique] LPWSTR lpBinaryPathName;
90 [unique] LPWSTR lpLoadOrderGroup;
91 DWORD dwTagId;
92 [unique] LPWSTR lpDependencies;
93 [unique] LPWSTR lpServiceStartName;
94 [unique] LPWSTR lpDisplayName;
95} QUERY_SERVICE_CONFIGW, *LPQUERY_SERVICE_CONFIGW;
96
97typedef struct _SERVICE_STATUS {
98 DWORD dwServiceType;
99 DWORD dwCurrentState;
100 DWORD dwControlsAccepted;
101 DWORD dwWin32ExitCode;
102 DWORD dwServiceSpecificExitCode;
103 DWORD dwCheckPoint;
104 DWORD dwWaitHint;
105} SERVICE_STATUS, *LPSERVICE_STATUS;
106
107typedef enum _SC_STATUS_TYPE {
108 SC_STATUS_PROCESS_INFO = 0
109} SC_STATUS_TYPE;
110
111typedef struct _SERVICE_DESCRIPTIONW {
112 LPWSTR lpDescription;
113} SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
114
115typedef enum _SC_ACTION_TYPE {
116 SC_ACTION_NONE = 0,
117 SC_ACTION_RESTART = 1,
118 SC_ACTION_REBOOT = 2,
119 SC_ACTION_RUN_COMMAND = 3
120} SC_ACTION_TYPE;
121
122typedef struct _SC_ACTION {
123 SC_ACTION_TYPE Type;
124 DWORD Delay;
125} SC_ACTION,*LPSC_ACTION;
126
127typedef struct _SERVICE_FAILURE_ACTIONSW {
128 DWORD dwResetPeriod;
129 [unique] LPWSTR lpRebootMsg;
130 [unique] LPWSTR lpCommand;
131 DWORD cActions;
132 [size_is(cActions)] SC_ACTION *lpsaActions;
133} SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
134
135#define SERVICE_CONFIG_DESCRIPTION 1
136#define SERVICE_CONFIG_FAILURE_ACTIONS 2
137#define SERVICE_CONFIG_DELAYED_AUTO_START_INFO 3
138#define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG 4
139#define SERVICE_CONFIG_SERVICE_SID_INFO 5
140#define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6
141#define SERVICE_CONFIG_PRESHUTDOWN_INFO 7
142
143cpp_quote("#endif")
144
145typedef [switch_type(DWORD)] union
146{
147 [case (SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONW descr;
148 [case (SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSW actions;
149} SERVICE_CONFIG2W;
150
151 /* Compatible with Windows function 0x00 */
152 DWORD svcctl_CloseServiceHandle(
153 [in,out] SC_RPC_HANDLE *handle
154 );
155
156 /* Compatible with Windows function 0x01 */
157 DWORD svcctl_ControlService(
158 [in] SC_RPC_HANDLE hService,
159 [in] DWORD dwControl,
160 [out] SERVICE_STATUS *lpServiceStatus
161 );
162
163 /* Compatible with Windows function 0x02 */
164 DWORD svcctl_DeleteService(
165 [in] SC_RPC_HANDLE hService
166 );
167
168 /* Compatible with Windows function 0x03 */
169 DWORD svcctl_LockServiceDatabase(
170 [in] SC_RPC_HANDLE hSCManager,
171 [out] SC_RPC_LOCK *phLock
172 );
173
174 /* Not compatible with Windows function 0x04 */
175 DWORD svcctl_QueryServiceObjectSecurity(/* FIXME */);
176
177 /* Not compatible with Windows function 0x05 */
178 DWORD svcctl_SetServiceObjectSecurity(/* FIXME */);
179
180 /* Not compatible with Windows function 0x06 */
181 DWORD svcctl_QueryServiceStatus(/* FIXME */);
182
183 /* Compatible with Windows function 0x07 */
184 DWORD svcctl_SetServiceStatus(
185 [in] SC_RPC_HANDLE hServiceStatus,
186 [in] LPSERVICE_STATUS lpServiceStatus
187 );
188
189 /* Compatible with Windows function 0x08 */
190 DWORD svcctl_UnlockServiceDatabase(
191 [in,out] SC_RPC_LOCK *phLock
192 );
193
194 /* Not compatible with Windows function 0x09 */
195 DWORD svcctl_NotifyBootConfigStatus(/* FIXME */);
196
197 /* Not compatible with Windows function 0x0a */
198 DWORD svcctl_SCSetServiceBitsW(/* FIXME */);
199
200 /* Compatible with Windows function 0x0b */
201 DWORD svcctl_ChangeServiceConfigW(
202 [in] SC_RPC_HANDLE hService,
203 [in] DWORD dwServiceType,
204 [in] DWORD dwStartType,
205 [in] DWORD dwErrorControl,
206 [in,unique] LPCWSTR lpBinaryPathName,
207 [in,unique] LPCWSTR lpLoadOrderGroupKey,
208 [in,out,unique] DWORD *lpdwTagId,
209 [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
210 [in] DWORD dwDependenciesSize,
211 [in,unique] LPCWSTR lpServiceStartName,
212 [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
213 [in] DWORD dwPasswordSize,
214 [in,unique] LPCWSTR lpDisplayName
215 );
216
217 /* Compatible with Windows function 0x0c */
218 DWORD svcctl_CreateServiceW(
219 [in] SC_RPC_HANDLE hSCManager,
220 [in] LPCWSTR lpServiceName,
221 [in,unique] LPCWSTR lpDisplayName,
222 [in] DWORD dwDesiredAccess,
223 [in] DWORD dwServiceType,
224 [in] DWORD dwStartType,
225 [in] DWORD dwErrorControl,
226 [in] LPCWSTR lpBinaryPathName,
227 [in,unique] LPCWSTR lpLoadOrderGroup,
228 [in,out,unique] DWORD *lpdwTagId,
229 [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
230 [in] DWORD dwDependenciesSize,
231 [in,unique] LPCWSTR lpServiceStartName,
232 [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
233 [in] DWORD dwPasswordSize,
234 [out] SC_RPC_HANDLE *phService
235 );
236
237 /* Not compatible with Windows function 0x0d */
238 DWORD svcctl_EnumDependentServicesW(/* FIXME */);
239
240 /* Not compatible with Windows function 0x0e */
241 DWORD svcctl_EnumServicesStatusW(/* FIXME */);
242
243 /* Compatible with Windows function 0x0f */
244 DWORD svcctl_OpenSCManagerW(
245 [in,unique] MACHINE_HANDLEW MachineName,
246 [in,unique] LPCWSTR DatabaseName,
247 [in] DWORD dwAccessMask,
248 [out] SC_RPC_HANDLE *handle
249 );
250
251 /* Compatible with Windows function 0x10 */
252 DWORD svcctl_OpenServiceW(
253 [in] SC_RPC_HANDLE hSCManager,
254 [in] LPCWSTR lpServiceName,
255 [in] DWORD dwDesiredAccess,
256 [out] SC_RPC_HANDLE *phService
257 );
258
259 /* Windows function 0x11 must be using a different prototype - not compatible */
260 DWORD svcctl_QueryServiceConfigW(
261 [in] SC_RPC_HANDLE hService,
262 [out] QUERY_SERVICE_CONFIGW *config);
263
264 /* Not compatible with Windows function 0x12 */
265 DWORD svcctl_QueryServiceLockStatusW(/* FIXME */);
266
267 /* Untested with Windows function 0x13 */
268 DWORD svcctl_StartServiceW(
269 [in] SC_RPC_HANDLE hService,
270 [in] DWORD dwNumServiceArgs,
271 [in,unique,size_is(dwNumServiceArgs)] LPCWSTR *lpServiceArgVectors
272 );
273
274 /* Compatible with Windows function 0x14 */
275 DWORD svcctl_GetServiceDisplayNameW(
276 [in] SC_RPC_HANDLE hSCManager,
277 [in] LPCWSTR lpServiceName,
278 [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
279 [in,out] DWORD *cchBufSize);
280
281 /* Compatible with Windows function 0x15 */
282 DWORD svcctl_GetServiceKeyNameW(
283 [in] SC_RPC_HANDLE hSCManager,
284 [in] LPCWSTR lpServiceDisplayName,
285 [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
286 [in,out] DWORD *cchBufSize);
287
288 /* Not compatible with Windows function 0x16 */
289 DWORD svcctl_SCSetServiceBitsA(/* FIXME */);
290
291 /* Not compatible with Windows function 0x17 */
292 DWORD svcctl_ChangeServiceConfigA(/* FIXME */);
293
294 /* Not compatible with Windows function 0x18 */
295 DWORD svcctl_CreateServiceA(/* FIXME */);
296
297 /* Not compatible with Windows function 0x19 */
298 DWORD svcctl_EnumDependentServicesA(/* FIXME */);
299
300 /* Not compatible with Windows function 0x1a */
301 DWORD svcctl_EnumServicesStatusA(/* FIXME */);
302
303 /* Not compatible with Windows function 0x1b */
304 DWORD svcctl_OpenSCManagerA(/* FIXME */);
305
306 /* Not compatible with Windows function 0x1c */
307 DWORD svcctl_OpenServiceA(/* FIXME */);
308
309 /* Not compatible with Windows function 0x1d */
310 DWORD svcctl_QueryServiceConfigA(/* FIXME */);
311
312 /* Not compatible with Windows function 0x1e */
313 DWORD svcctl_QueryServiceLockStatusA(/* FIXME */);
314
315 /* Not compatible with Windows function 0x1f */
316 DWORD svcctl_StartServiceA(/* FIXME */);
317
318 /* Not compatible with Windows function 0x20 */
319 DWORD svcctl_GetServiceDisplayNameA(/* FIXME */);
320
321 /* Not compatible with Windows function 0x21 */
322 DWORD svcctl_GetServiceKeyNameA(/* FIXME */);
323
324 /* Not compatible with Windows function 0x22 */
325 DWORD svcctl_GetCurrentGroupStateW(/* FIXME */);
326
327 /* Not compatible with Windows function 0x23 */
328 DWORD svcctl_EnumServiceGroupW(/* FIXME */);
329
330 /* Not compatible with Windows function 0x24 */
331 DWORD svcctl_ChangeServiceConfig2A(/* FIXME */);
332
333 /* Untested with Windows function 0x25 */
334 DWORD svcctl_ChangeServiceConfig2W(
335 [in] SC_RPC_HANDLE hService,
336 [in] DWORD InfoLevel,
337 [in,switch_is(InfoLevel)] SERVICE_CONFIG2W *config );
338
339 /* Not compatible with Windows function 0x26 */
340 DWORD svcctl_QueryServiceConfig2A(/* FIXME */);
341
342 /* Untested with Windows function 0x27 */
343 DWORD svcctl_QueryServiceConfig2W(
344 [in] SC_RPC_HANDLE hService,
345 [in] DWORD InfoLevel,
346 [out,size_is(cbBufSize)] BYTE lpBuffer[],
347 [in] DWORD cbBufSize,
348 [out] LPDWORD pcbBytesNeeded
349 );
350
351 /* Untested with Windows function 0x28 */
352 DWORD svcctl_QueryServiceStatusEx(
353 [in] SC_RPC_HANDLE hService,
354 [in] SC_STATUS_TYPE InfoLevel,
355 [out,size_is(cbBufSize)] BYTE *lpBuffer,
356 [in] DWORD cbBufSize,
357 [out] LPDWORD pcbBytesNeeded
358 );
359}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette