* Sync up to trunk head (r65481).
[reactos.git] / base / system / winlogon / rpcserver.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Winlogon
4 * FILE: base/system/winlogon/rpcserver.c
5 * PURPOSE: RPC server interface for the remote registry calls
6 * PROGRAMMERS: Eric Kohl
7 */
8
9 /* INCLUDES *****************************************************************/
10
11 #include "winlogon.h"
12
13 #include <rpc.h>
14 #include <winreg_s.h>
15
16
17 /* FUNCTIONS *****************************************************************/
18
19 BOOL
20 StartRpcServer(VOID)
21 {
22 RPC_STATUS Status;
23
24 TRACE("ScmStartRpcServer() called\n");
25
26 Status = RpcServerUseProtseqEpW(L"ncacn_np",
27 10,
28 L"\\pipe\\winreg",
29 NULL);
30 if (Status != RPC_S_OK)
31 {
32 ERR("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
33 return FALSE;
34 }
35
36 Status = RpcServerRegisterIf(winreg_v1_0_s_ifspec,
37 NULL,
38 NULL);
39 if (Status != RPC_S_OK)
40 {
41 ERR("RpcServerRegisterIf() failed (Status %lx)\n", Status);
42 return FALSE;
43 }
44
45 Status = RpcServerListen(1, 20, TRUE);
46 if (Status != RPC_S_OK)
47 {
48 ERR("RpcServerListen() failed (Status %lx)\n", Status);
49 return FALSE;
50 }
51
52 TRACE("StartRpcServer() done\n");
53 return TRUE;
54 }
55
56
57 void __RPC_FAR * __RPC_USER MIDL_user_allocate(SIZE_T len)
58 {
59 return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
60 }
61
62
63 void __RPC_USER MIDL_user_free(void __RPC_FAR * ptr)
64 {
65 HeapFree(GetProcessHeap(), 0, ptr);
66 }
67
68
69 void __RPC_USER RPC_HKEY_rundown(RPC_HKEY hSCObject)
70 {
71 }
72
73
74 /* Function 0 */
75 error_status_t
76 WINAPI
77 OpenClassesRoot(
78 PREGISTRY_SERVER_NAME ServerName,
79 REGSAM samDesired,
80 PRPC_HKEY phKey)
81 {
82 TRACE("\n");
83 return ERROR_SUCCESS;
84 }
85
86
87 /* Function 1 */
88 error_status_t
89 WINAPI
90 OpenCurrentUser(
91 PREGISTRY_SERVER_NAME ServerName,
92 REGSAM samDesired,
93 PRPC_HKEY phKey)
94 {
95 TRACE("\n");
96 return ERROR_SUCCESS;
97 }
98
99
100 /* Function 2 */
101 error_status_t
102 WINAPI
103 OpenLocalMachine(
104 PREGISTRY_SERVER_NAME ServerName,
105 REGSAM samDesired,
106 PRPC_HKEY phKey)
107 {
108 TRACE("\n");
109 return ERROR_SUCCESS;
110 }
111
112
113 /* Function 3 */
114 error_status_t
115 WINAPI
116 OpenPerformanceData(
117 PREGISTRY_SERVER_NAME ServerName,
118 REGSAM samDesired,
119 PRPC_HKEY phKey)
120 {
121 TRACE("\n");
122 return ERROR_SUCCESS;
123 }
124
125
126 /* Function 4 */
127 error_status_t
128 WINAPI
129 OpenUsers(
130 PREGISTRY_SERVER_NAME ServerName,
131 REGSAM samDesired,
132 PRPC_HKEY phKey)
133 {
134 TRACE("\n");
135 return ERROR_SUCCESS;
136 }
137
138
139 /* Function 5 */
140 error_status_t
141 WINAPI
142 BaseRegCloseKey(
143 PRPC_HKEY hKey)
144 {
145 TRACE("\n");
146 return ERROR_SUCCESS;
147 }
148
149
150 /* Function 6 */
151 error_status_t
152 WINAPI
153 BaseRegCreateKey(
154 RPC_HKEY hKey,
155 PRPC_UNICODE_STRING lpSubKey,
156 PRPC_UNICODE_STRING lpClass,
157 DWORD dwOptions,
158 REGSAM samDesired,
159 PRPC_SECURITY_ATTRIBUTES lpSecurityAttributes,
160 PRPC_HKEY phkResult,
161 LPDWORD lpdwDisposition)
162 {
163 TRACE("\n");
164 return ERROR_SUCCESS;
165 }
166
167
168 /* Function 7 */
169 error_status_t
170 WINAPI
171 BaseRegDeleteKey(
172 RPC_HKEY hKey,
173 PRPC_UNICODE_STRING lpSubKey)
174 {
175 TRACE("\n");
176 return ERROR_SUCCESS;
177 }
178
179
180 /* Function 8 */
181 error_status_t
182 WINAPI
183 BaseRegDeleteValue(
184 RPC_HKEY hKey,
185 PRPC_UNICODE_STRING lpValueName)
186 {
187 TRACE("\n");
188 return ERROR_SUCCESS;
189 }
190
191
192 /* Function 9 */
193 error_status_t
194 WINAPI
195 BaseRegEnumKey(
196 RPC_HKEY hKey,
197 DWORD dwIndex,
198 PRPC_UNICODE_STRING lpNameIn,
199 PRPC_UNICODE_STRING lpNameOut,
200 PRPC_UNICODE_STRING lpClassIn,
201 PRPC_UNICODE_STRING *lplpClassOut,
202 PFILETIME lpftLastWriteTime)
203 {
204 TRACE("\n");
205 return ERROR_SUCCESS;
206 }
207
208
209 /* Function 10 */
210 error_status_t
211 WINAPI
212 BaseRegEnumValue(
213 RPC_HKEY hKey,
214 DWORD dwIndex,
215 PRPC_UNICODE_STRING lpValueNameIn,
216 PRPC_UNICODE_STRING lpValueNameOut,
217 LPDWORD lpType,
218 LPBYTE lpData,
219 LPDWORD lpcbData,
220 LPDWORD lpcbLen)
221 {
222 TRACE("\n");
223 return ERROR_SUCCESS;
224 }
225
226
227 /* Function 11 */
228 error_status_t
229 __stdcall
230 BaseRegFlushKey(
231 RPC_HKEY hKey)
232 {
233 TRACE("\n");
234 return ERROR_SUCCESS;
235 }
236
237
238 /* Function 12 */
239 error_status_t
240 __stdcall
241 BaseRegGetKeySecurity(
242 RPC_HKEY hKey,
243 SECURITY_INFORMATION SecurityInformation,
244 PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptorIn,
245 PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptorOut)
246 {
247 TRACE("\n");
248 return ERROR_SUCCESS;
249 }
250
251
252 /* Function 13 */
253 error_status_t
254 __stdcall
255 BaseRegLoadKey(
256 RPC_HKEY hKey,
257 PRPC_UNICODE_STRING lpSubKey,
258 PRPC_UNICODE_STRING lpFile)
259 {
260 TRACE("\n");
261 return ERROR_SUCCESS;
262 }
263
264
265 /* Function 14 */
266 void
267 __stdcall
268 Opnum14NotImplemented(
269 handle_t IDL_handle)
270 {
271 TRACE("\n");
272 }
273
274
275 /* Function 15 */
276 error_status_t
277 __stdcall
278 BaseRegOpenKey(
279 RPC_HKEY hKey,
280 PRPC_UNICODE_STRING lpSubKey,
281 DWORD dwOptions,
282 REGSAM samDesired,
283 PRPC_HKEY phkResult)
284 {
285 TRACE("\n");
286 return ERROR_SUCCESS;
287 }
288
289
290 /* Function 16 */
291 error_status_t
292 __stdcall
293 BaseRegQueryInfoKey(
294 RPC_HKEY hKey,
295 PRPC_UNICODE_STRING lpClassIn,
296 PRPC_UNICODE_STRING lpClassOut,
297 LPDWORD lpcSubKeys,
298 LPDWORD lpcbMaxSubKeyLen,
299 LPDWORD lpcbMaxClassLen,
300 LPDWORD lpcValues,
301 LPDWORD lpcbMaxValueNameLen,
302 LPDWORD lpcbMaxValueLen,
303 LPDWORD lpcbSecurityDescriptor,
304 PFILETIME lpftLastWriteTime)
305 {
306 TRACE("\n");
307 return ERROR_SUCCESS;
308 }
309
310
311 /* Function 17 */
312 error_status_t
313 __stdcall
314 BaseRegQueryValue(
315 RPC_HKEY hKey,
316 PRPC_UNICODE_STRING lpValueName,
317 LPDWORD lpType,
318 LPBYTE lpData,
319 LPDWORD lpcbData,
320 LPDWORD lpcbLen)
321 {
322 TRACE("\n");
323 return ERROR_SUCCESS;
324 }
325
326
327 /* Function 18 */
328 error_status_t
329 __stdcall
330 BaseRegReplaceKey(
331 RPC_HKEY hKey,
332 PRPC_UNICODE_STRING lpSubKey,
333 PRPC_UNICODE_STRING lpNewFile,
334 PRPC_UNICODE_STRING lpOldFile)
335 {
336 TRACE("\n");
337 return ERROR_SUCCESS;
338 }
339
340
341 /* Function 19 */
342 error_status_t
343 __stdcall
344 BaseRegRestoreKey(
345 RPC_HKEY hKey,
346 PRPC_UNICODE_STRING lpFile,
347 DWORD Flags)
348 {
349 TRACE("\n");
350 return ERROR_SUCCESS;
351 }
352
353
354 /* Function 20 */
355 error_status_t
356 __stdcall
357 BaseRegSaveKey(
358 RPC_HKEY hKey,
359 PRPC_UNICODE_STRING lpFile,
360 PRPC_SECURITY_ATTRIBUTES pSecurityAttributes)
361 {
362 TRACE("\n");
363 return ERROR_SUCCESS;
364 }
365
366
367 /* Function 21 */
368 error_status_t
369 __stdcall
370 BaseRegSetKeySecurity(
371 RPC_HKEY hKey,
372 SECURITY_INFORMATION SecurityInformation,
373 PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptor)
374 {
375 TRACE("\n");
376 return ERROR_SUCCESS;
377 }
378
379
380 /* Function 22 */
381 error_status_t
382 __stdcall
383 BaseRegSetValue(
384 RPC_HKEY hKey,
385 PRPC_UNICODE_STRING lpValueName,
386 DWORD dwType,
387 LPBYTE lpData,
388 DWORD cbData)
389 {
390 TRACE("\n");
391 return ERROR_SUCCESS;
392 }
393
394
395 /* Function 23 */
396 error_status_t
397 __stdcall
398 BaseRegUnLoadKey(
399 RPC_HKEY hKey,
400 PRPC_UNICODE_STRING lpSubKey)
401 {
402 TRACE("\n");
403 return ERROR_SUCCESS;
404 }
405
406
407 /* Function 24 */
408 ULONG
409 __stdcall
410 BaseInitiateSystemShutdown(
411 PREGISTRY_SERVER_NAME ServerName,
412 PRPC_UNICODE_STRING lpMessage,
413 ULONG dwTimeout,
414 BOOLEAN bForceAppsClosed,
415 BOOLEAN bRebootAfterShutdown)
416 {
417 TRACE("BaseInitiateSystemShutdown()\n");
418 return ERROR_SUCCESS;
419 }
420
421
422 /* Function 25 */
423 ULONG
424 __stdcall
425 BaseAbortSystemShutdown(
426 PREGISTRY_SERVER_NAME ServerName)
427 {
428 TRACE("\n");
429 return ERROR_SUCCESS;
430 }
431
432
433 /* Function 26 */
434 error_status_t
435 __stdcall
436 BaseRegGetVersion(
437 RPC_HKEY hKey,
438 LPDWORD lpdwVersion)
439 {
440 TRACE("\n");
441 return ERROR_SUCCESS;
442 }
443
444
445 /* Function 27 */
446 error_status_t
447 __stdcall
448 OpenCurrentConfig(
449 PREGISTRY_SERVER_NAME ServerName,
450 REGSAM samDesired,
451 PRPC_HKEY phKey)
452 {
453 TRACE("\n");
454 return ERROR_SUCCESS;
455 }
456
457
458 /* Function 28 */
459 void
460 __stdcall
461 Opnum28NotImplemented(
462 handle_t IDL_handle)
463 {
464 TRACE("\n");
465 }
466
467
468 /* Function 29 */
469 error_status_t
470 __stdcall
471 BaseRegQueryMultipleValues(
472 RPC_HKEY hKey,
473 PRVALENT val_listIn,
474 PRVALENT val_listOut,
475 DWORD num_vals,
476 char *lpvalueBuf,
477 LPDWORD ldwTotsize)
478 {
479 TRACE("\n");
480 return ERROR_SUCCESS;
481 }
482
483
484 /* Function 30 */
485 ULONG
486 __stdcall
487 BaseInitiateSystemShutdownEx(
488 PREGISTRY_SERVER_NAME ServerName,
489 PRPC_UNICODE_STRING lpMessage,
490 ULONG dwTimeout,
491 BOOLEAN bForceAppsClosed,
492 BOOLEAN bRebootAfterShutdown,
493 ULONG dwReason)
494 {
495 TRACE("\n");
496 return ERROR_SUCCESS;
497 }
498
499
500 /* Function 31 */
501 error_status_t
502 __stdcall
503 BaseRegSaveKeyEx(
504 RPC_HKEY hKey,
505 PRPC_UNICODE_STRING lpFile,
506 PRPC_SECURITY_ATTRIBUTES pSecurityAttributes,
507 DWORD Flags)
508 {
509 TRACE("\n");
510 return ERROR_SUCCESS;
511 }
512
513
514 /* Function 32 */
515 error_status_t
516 __stdcall
517 OpenPerformanceText(
518 PREGISTRY_SERVER_NAME ServerName,
519 REGSAM samDesired,
520 PRPC_HKEY phKey)
521 {
522 TRACE("\n");
523 return ERROR_SUCCESS;
524 }
525
526
527 /* Function 33 */
528 error_status_t
529 __stdcall
530 OpenPerformanceNlsText(
531 PREGISTRY_SERVER_NAME ServerName,
532 REGSAM samDesired,
533 PRPC_HKEY phKey)
534 {
535 TRACE("\n");
536 return ERROR_SUCCESS;
537 }
538
539
540 /* Function 34 */
541 error_status_t
542 __stdcall
543 BaseRegQueryMultipleValues2(
544 RPC_HKEY hKey,
545 PRVALENT val_listIn,
546 PRVALENT val_listOut,
547 DWORD num_vals,
548 char *lpvalueBuf,
549 LPDWORD ldwTotsize,
550 LPDWORD ldwRequiredSize)
551 {
552 TRACE("\n");
553 return ERROR_SUCCESS;
554 }
555
556
557 /* Function 35 */
558 error_status_t
559 __stdcall
560 BaseRegDeleteKeyEx(
561 RPC_HKEY hKey,
562 PRPC_UNICODE_STRING lpSubKey,
563 REGSAM AccessMask,
564 DWORD Reserved)
565 {
566 TRACE("\n");
567 return ERROR_SUCCESS;
568 }
569
570 /* EOF */