ReactOS 0.4.15-dev-7958-gcd0bb1a
rpcserver.c
Go to the documentation of this file.
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/* FUNCTIONS *****************************************************************/
17
18BOOL
20{
22
23 TRACE("StartRpcServer() called\n");
24
27 L"\\pipe\\winreg",
28 NULL);
29 if (Status != RPC_S_OK)
30 {
31 ERR("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
32 return FALSE;
33 }
34
35 Status = RpcServerRegisterIf(winreg_v1_0_s_ifspec,
36 NULL,
37 NULL);
38 if (Status != RPC_S_OK)
39 {
40 ERR("RpcServerRegisterIf() failed (Status %lx)\n", Status);
41 return FALSE;
42 }
43
44 Status = RpcServerListen(1, 20, TRUE);
45 if (Status != RPC_S_OK)
46 {
47 ERR("RpcServerListen() failed (Status %lx)\n", Status);
48 return FALSE;
49 }
50
51 TRACE("StartRpcServer() done\n");
52 return TRUE;
53}
54
55
57{
59}
60
61
63{
65}
66
67
69{
70}
71
72
73/* Function 0 */
77 PREGISTRY_SERVER_NAME ServerName,
78 REGSAM samDesired,
79 PRPC_HKEY phKey)
80{
81 TRACE("\n");
82 return ERROR_SUCCESS;
83}
84
85
86/* Function 1 */
90 PREGISTRY_SERVER_NAME ServerName,
91 REGSAM samDesired,
92 PRPC_HKEY phKey)
93{
94 TRACE("\n");
95 return ERROR_SUCCESS;
96}
97
98
99/* Function 2 */
101WINAPI
103 PREGISTRY_SERVER_NAME ServerName,
104 REGSAM samDesired,
105 PRPC_HKEY phKey)
106{
107 TRACE("\n");
108 return ERROR_SUCCESS;
109}
110
111
112/* Function 3 */
114WINAPI
116 PREGISTRY_SERVER_NAME ServerName,
117 REGSAM samDesired,
118 PRPC_HKEY phKey)
119{
120 TRACE("\n");
121 return ERROR_SUCCESS;
122}
123
124
125/* Function 4 */
127WINAPI
129 PREGISTRY_SERVER_NAME ServerName,
130 REGSAM samDesired,
131 PRPC_HKEY phKey)
132{
133 TRACE("\n");
134 return ERROR_SUCCESS;
135}
136
137
138/* Function 5 */
140WINAPI
143{
144 TRACE("\n");
145 return ERROR_SUCCESS;
146}
147
148
149/* Function 6 */
151WINAPI
154 PRPC_UNICODE_STRING lpSubKey,
155 PRPC_UNICODE_STRING lpClass,
157 REGSAM samDesired,
158 PRPC_SECURITY_ATTRIBUTES lpSecurityAttributes,
159 PRPC_HKEY phkResult,
160 LPDWORD lpdwDisposition)
161{
162 TRACE("\n");
163 return ERROR_SUCCESS;
164}
165
166
167/* Function 7 */
169WINAPI
172 PRPC_UNICODE_STRING lpSubKey)
173{
174 TRACE("\n");
175 return ERROR_SUCCESS;
176}
177
178
179/* Function 8 */
181WINAPI
184 PRPC_UNICODE_STRING lpValueName)
185{
186 TRACE("\n");
187 return ERROR_SUCCESS;
188}
189
190
191/* Function 9 */
193WINAPI
196 DWORD dwIndex,
197 PRPC_UNICODE_STRING lpNameIn,
198 PRPC_UNICODE_STRING lpNameOut,
199 PRPC_UNICODE_STRING lpClassIn,
200 PRPC_UNICODE_STRING *lplpClassOut,
201 PFILETIME lpftLastWriteTime)
202{
203 TRACE("\n");
204 return ERROR_SUCCESS;
205}
206
207
208/* Function 10 */
210WINAPI
213 DWORD dwIndex,
214 PRPC_UNICODE_STRING lpValueNameIn,
215 PRPC_UNICODE_STRING lpValueNameOut,
216 LPDWORD lpType,
217 LPBYTE lpData,
218 LPDWORD lpcbData,
219 LPDWORD lpcbLen)
220{
221 TRACE("\n");
222 return ERROR_SUCCESS;
223}
224
225
226/* Function 11 */
231{
232 TRACE("\n");
233 return ERROR_SUCCESS;
234}
235
236
237/* Function 12 */
243 PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptorIn,
244 PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptorOut)
245{
246 TRACE("\n");
247 return ERROR_SUCCESS;
248}
249
250
251/* Function 13 */
256 PRPC_UNICODE_STRING lpSubKey,
257 PRPC_UNICODE_STRING lpFile)
258{
259 TRACE("\n");
260 return ERROR_SUCCESS;
261}
262
263
264/* Function 14 - Not used on wire */
265void
268 handle_t IDL_handle)
269{
270 TRACE("\n");
271}
272
273
274/* Function 15 */
279 PRPC_UNICODE_STRING lpSubKey,
281 REGSAM samDesired,
282 PRPC_HKEY phkResult)
283{
284 TRACE("\n");
285 return ERROR_SUCCESS;
286}
287
288
289/* Function 16 */
294 PRPC_UNICODE_STRING lpClassIn,
295 PRPC_UNICODE_STRING lpClassOut,
296 LPDWORD lpcSubKeys,
297 LPDWORD lpcbMaxSubKeyLen,
298 LPDWORD lpcbMaxClassLen,
299 LPDWORD lpcValues,
300 LPDWORD lpcbMaxValueNameLen,
301 LPDWORD lpcbMaxValueLen,
302 LPDWORD lpcbSecurityDescriptor,
303 PFILETIME lpftLastWriteTime)
304{
305 TRACE("\n");
306 return ERROR_SUCCESS;
307}
308
309
310/* Function 17 */
315 PRPC_UNICODE_STRING lpValueName,
316 LPDWORD lpType,
317 LPBYTE lpData,
318 LPDWORD lpcbData,
319 LPDWORD lpcbLen)
320{
321 TRACE("\n");
322 return ERROR_SUCCESS;
323}
324
325
326/* Function 18 */
331 PRPC_UNICODE_STRING lpSubKey,
332 PRPC_UNICODE_STRING lpNewFile,
333 PRPC_UNICODE_STRING lpOldFile)
334{
335 TRACE("\n");
336 return ERROR_SUCCESS;
337}
338
339
340/* Function 19 */
345 PRPC_UNICODE_STRING lpFile,
346 DWORD Flags)
347{
348 TRACE("\n");
349 return ERROR_SUCCESS;
350}
351
352
353/* Function 20 */
358 PRPC_UNICODE_STRING lpFile,
359 PRPC_SECURITY_ATTRIBUTES pSecurityAttributes)
360{
361 TRACE("\n");
362 return ERROR_SUCCESS;
363}
364
365
366/* Function 21 */
372 PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptor)
373{
374 TRACE("\n");
375 return ERROR_SUCCESS;
376}
377
378
379/* Function 22 */
384 PRPC_UNICODE_STRING lpValueName,
385 DWORD dwType,
386 LPBYTE lpData,
387 DWORD cbData)
388{
389 TRACE("\n");
390 return ERROR_SUCCESS;
391}
392
393
394/* Function 23 */
399 PRPC_UNICODE_STRING lpSubKey)
400{
401 TRACE("\n");
402 return ERROR_SUCCESS;
403}
404
405
406/* Function 24 */
407ULONG
410 PREGISTRY_SERVER_NAME ServerName,
411 PRPC_UNICODE_STRING lpMessage,
413 BOOLEAN bForceAppsClosed,
414 BOOLEAN bRebootAfterShutdown)
415{
416 TRACE("BaseInitiateSystemShutdown()\n");
417 return BaseInitiateSystemShutdownEx(ServerName,
418 lpMessage,
419 dwTimeout,
420 bForceAppsClosed,
421 bRebootAfterShutdown,
422 0);
423}
424
425
426/* Function 25 */
427ULONG
430 PREGISTRY_SERVER_NAME ServerName)
431{
432 TRACE("BaseAbortSystemShutdown()\n");
433
434 //FIXME: Verify that the caller actually has the correct privileges
435
437}
438
439
440/* Function 26 */
445 LPDWORD lpdwVersion)
446{
447 TRACE("\n");
448 return ERROR_SUCCESS;
449}
450
451
452/* Function 27 */
456 PREGISTRY_SERVER_NAME ServerName,
457 REGSAM samDesired,
458 PRPC_HKEY phKey)
459{
460 TRACE("\n");
461 return ERROR_SUCCESS;
462}
463
464
465/* Function 28 - Not used on wire */
466void
469 handle_t IDL_handle)
470{
471 TRACE("\n");
472}
473
474
475/* Function 29 */
480 PRVALENT val_listIn,
481 PRVALENT val_listOut,
482 DWORD num_vals,
483 char *lpvalueBuf,
484 LPDWORD ldwTotsize)
485{
486 TRACE("\n");
487 return ERROR_SUCCESS;
488}
489
490
491/* Function 30 */
492ULONG
495 PREGISTRY_SERVER_NAME ServerName,
496 PRPC_UNICODE_STRING lpMessage,
498 BOOLEAN bForceAppsClosed,
499 BOOLEAN bRebootAfterShutdown,
501{
502 TRACE("BaseInitiateSystemShutdownEx()\n");
503 TRACE(" Message: %wZ\n", lpMessage);
504 TRACE(" Timeout: %lu\n", dwTimeout);
505 TRACE(" Force: %d\n", bForceAppsClosed);
506 TRACE(" Reboot: %d\n", bRebootAfterShutdown);
507 TRACE(" Reason: %lu\n", dwReason);
508
509 //FIXME: Verify that the caller actually has the correct privileges
510
511 return StartSystemShutdown((PUNICODE_STRING)lpMessage,
512 dwTimeout,
513 bForceAppsClosed,
514 bRebootAfterShutdown,
515 dwReason);
516}
517
518
519/* Function 31 */
524 PRPC_UNICODE_STRING lpFile,
525 PRPC_SECURITY_ATTRIBUTES pSecurityAttributes,
526 DWORD Flags)
527{
528 TRACE("\n");
529 return ERROR_SUCCESS;
530}
531
532
533/* Function 32 */
537 PREGISTRY_SERVER_NAME ServerName,
538 REGSAM samDesired,
539 PRPC_HKEY phKey)
540{
541 TRACE("\n");
542 return ERROR_SUCCESS;
543}
544
545
546/* Function 33 */
550 PREGISTRY_SERVER_NAME ServerName,
551 REGSAM samDesired,
552 PRPC_HKEY phKey)
553{
554 TRACE("\n");
555 return ERROR_SUCCESS;
556}
557
558
559/* Function 34 */
564 PRVALENT val_listIn,
565 PRVALENT val_listOut,
566 DWORD num_vals,
567 char *lpvalueBuf,
568 LPDWORD ldwTotsize,
569 LPDWORD ldwRequiredSize)
570{
571 TRACE("\n");
572 return ERROR_SUCCESS;
573}
574
575
576/* Function 35 */
581 PRPC_UNICODE_STRING lpSubKey,
584{
585 TRACE("\n");
586 return ERROR_SUCCESS;
587}
588
589/* EOF */
unsigned char BOOLEAN
DWORD StartRpcServer(VOID)
Definition: rpcserver.c:32
DWORD dwReason
Definition: misc.cpp:154
error_status_t WINAPI OpenPerformanceData(PREGISTRY_SERVER_NAME ServerName, REGSAM samDesired, PRPC_HKEY phKey)
Definition: rpcserver.c:115
error_status_t WINAPI BaseRegEnumValue(RPC_HKEY hKey, DWORD dwIndex, PRPC_UNICODE_STRING lpValueNameIn, PRPC_UNICODE_STRING lpValueNameOut, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData, LPDWORD lpcbLen)
Definition: rpcserver.c:211
void __RPC_USER RPC_HKEY_rundown(RPC_HKEY hSCObject)
Definition: rpcserver.c:68
error_status_t __stdcall OpenPerformanceNlsText(PREGISTRY_SERVER_NAME ServerName, REGSAM samDesired, PRPC_HKEY phKey)
Definition: rpcserver.c:549
error_status_t __stdcall BaseRegDeleteKeyEx(RPC_HKEY hKey, PRPC_UNICODE_STRING lpSubKey, REGSAM AccessMask, DWORD Reserved)
Definition: rpcserver.c:579
error_status_t WINAPI BaseRegDeleteValue(RPC_HKEY hKey, PRPC_UNICODE_STRING lpValueName)
Definition: rpcserver.c:182
error_status_t WINAPI OpenUsers(PREGISTRY_SERVER_NAME ServerName, REGSAM samDesired, PRPC_HKEY phKey)
Definition: rpcserver.c:128
error_status_t WINAPI BaseRegEnumKey(RPC_HKEY hKey, DWORD dwIndex, PRPC_UNICODE_STRING lpNameIn, PRPC_UNICODE_STRING lpNameOut, PRPC_UNICODE_STRING lpClassIn, PRPC_UNICODE_STRING *lplpClassOut, PFILETIME lpftLastWriteTime)
Definition: rpcserver.c:194
error_status_t __stdcall BaseRegQueryMultipleValues(RPC_HKEY hKey, PRVALENT val_listIn, PRVALENT val_listOut, DWORD num_vals, char *lpvalueBuf, LPDWORD ldwTotsize)
Definition: rpcserver.c:478
void __stdcall BaseRegNotifyChangeKeyValue(handle_t IDL_handle)
Definition: rpcserver.c:267
error_status_t __stdcall BaseRegOpenKey(RPC_HKEY hKey, PRPC_UNICODE_STRING lpSubKey, DWORD dwOptions, REGSAM samDesired, PRPC_HKEY phkResult)
Definition: rpcserver.c:277
error_status_t __stdcall BaseRegSaveKey(RPC_HKEY hKey, PRPC_UNICODE_STRING lpFile, PRPC_SECURITY_ATTRIBUTES pSecurityAttributes)
Definition: rpcserver.c:356
void __RPC_USER MIDL_user_free(void __RPC_FAR *ptr)
Definition: rpcserver.c:62
ULONG __stdcall BaseInitiateSystemShutdown(PREGISTRY_SERVER_NAME ServerName, PRPC_UNICODE_STRING lpMessage, ULONG dwTimeout, BOOLEAN bForceAppsClosed, BOOLEAN bRebootAfterShutdown)
Definition: rpcserver.c:409
error_status_t __stdcall OpenCurrentConfig(PREGISTRY_SERVER_NAME ServerName, REGSAM samDesired, PRPC_HKEY phKey)
Definition: rpcserver.c:455
error_status_t __stdcall BaseRegSetValue(RPC_HKEY hKey, PRPC_UNICODE_STRING lpValueName, DWORD dwType, LPBYTE lpData, DWORD cbData)
Definition: rpcserver.c:382
error_status_t __stdcall BaseRegSaveKeyEx(RPC_HKEY hKey, PRPC_UNICODE_STRING lpFile, PRPC_SECURITY_ATTRIBUTES pSecurityAttributes, DWORD Flags)
Definition: rpcserver.c:522
error_status_t __stdcall BaseRegReplaceKey(RPC_HKEY hKey, PRPC_UNICODE_STRING lpSubKey, PRPC_UNICODE_STRING lpNewFile, PRPC_UNICODE_STRING lpOldFile)
Definition: rpcserver.c:329
error_status_t __stdcall BaseRegSetKeySecurity(RPC_HKEY hKey, SECURITY_INFORMATION SecurityInformation, PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptor)
Definition: rpcserver.c:369
error_status_t WINAPI OpenCurrentUser(PREGISTRY_SERVER_NAME ServerName, REGSAM samDesired, PRPC_HKEY phKey)
Definition: rpcserver.c:89
error_status_t __stdcall BaseRegGetVersion(RPC_HKEY hKey, LPDWORD lpdwVersion)
Definition: rpcserver.c:443
error_status_t __stdcall BaseRegLoadKey(RPC_HKEY hKey, PRPC_UNICODE_STRING lpSubKey, PRPC_UNICODE_STRING lpFile)
Definition: rpcserver.c:254
void __stdcall OpenDynData(handle_t IDL_handle)
Definition: rpcserver.c:468
error_status_t WINAPI BaseRegCreateKey(RPC_HKEY hKey, PRPC_UNICODE_STRING lpSubKey, PRPC_UNICODE_STRING lpClass, DWORD dwOptions, REGSAM samDesired, PRPC_SECURITY_ATTRIBUTES lpSecurityAttributes, PRPC_HKEY phkResult, LPDWORD lpdwDisposition)
Definition: rpcserver.c:152
error_status_t __stdcall BaseRegQueryValue(RPC_HKEY hKey, PRPC_UNICODE_STRING lpValueName, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData, LPDWORD lpcbLen)
Definition: rpcserver.c:313
ULONG __stdcall BaseAbortSystemShutdown(PREGISTRY_SERVER_NAME ServerName)
Definition: rpcserver.c:429
error_status_t WINAPI OpenLocalMachine(PREGISTRY_SERVER_NAME ServerName, REGSAM samDesired, PRPC_HKEY phKey)
Definition: rpcserver.c:102
error_status_t __stdcall BaseRegFlushKey(RPC_HKEY hKey)
Definition: rpcserver.c:229
error_status_t __stdcall BaseRegUnLoadKey(RPC_HKEY hKey, PRPC_UNICODE_STRING lpSubKey)
Definition: rpcserver.c:397
error_status_t __stdcall BaseRegRestoreKey(RPC_HKEY hKey, PRPC_UNICODE_STRING lpFile, DWORD Flags)
Definition: rpcserver.c:343
error_status_t __stdcall BaseRegQueryInfoKey(RPC_HKEY hKey, PRPC_UNICODE_STRING lpClassIn, PRPC_UNICODE_STRING lpClassOut, LPDWORD lpcSubKeys, LPDWORD lpcbMaxSubKeyLen, LPDWORD lpcbMaxClassLen, LPDWORD lpcValues, LPDWORD lpcbMaxValueNameLen, LPDWORD lpcbMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
Definition: rpcserver.c:292
error_status_t __stdcall BaseRegGetKeySecurity(RPC_HKEY hKey, SECURITY_INFORMATION SecurityInformation, PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptorIn, PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptorOut)
Definition: rpcserver.c:240
error_status_t __stdcall OpenPerformanceText(PREGISTRY_SERVER_NAME ServerName, REGSAM samDesired, PRPC_HKEY phKey)
Definition: rpcserver.c:536
void __RPC_FAR *__RPC_USER MIDL_user_allocate(SIZE_T len)
Definition: rpcserver.c:56
error_status_t WINAPI BaseRegCloseKey(PRPC_HKEY hKey)
Definition: rpcserver.c:141
ULONG __stdcall BaseInitiateSystemShutdownEx(PREGISTRY_SERVER_NAME ServerName, PRPC_UNICODE_STRING lpMessage, ULONG dwTimeout, BOOLEAN bForceAppsClosed, BOOLEAN bRebootAfterShutdown, ULONG dwReason)
Definition: rpcserver.c:494
error_status_t WINAPI OpenClassesRoot(PREGISTRY_SERVER_NAME ServerName, REGSAM samDesired, PRPC_HKEY phKey)
Definition: rpcserver.c:76
error_status_t WINAPI BaseRegDeleteKey(RPC_HKEY hKey, PRPC_UNICODE_STRING lpSubKey)
Definition: rpcserver.c:170
error_status_t __stdcall BaseRegQueryMultipleValues2(RPC_HKEY hKey, PRVALENT val_listIn, PRVALENT val_listOut, DWORD num_vals, char *lpvalueBuf, LPDWORD ldwTotsize, LPDWORD ldwRequiredSize)
Definition: rpcserver.c:562
DWORD TerminateSystemShutdown(VOID)
Definition: shutdown.c:328
DWORD StartSystemShutdown(IN PUNICODE_STRING pMessage, IN ULONG dwTimeout, IN BOOLEAN bForceAppsClosed, IN BOOLEAN bRebootAfterShutdown, IN ULONG dwReason)
Definition: shutdown.c:337
unsigned long error_status_t
Definition: basetyps.h:83
#define ERR(fmt,...)
Definition: debug.h:110
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ SECURITY_INFORMATION SecurityInformation
Definition: fltkernel.h:1340
FxAutoRegKey hKey
Status
Definition: gdiplustypes.h:25
GLenum GLsizei len
Definition: glext.h:6722
static PVOID ptr
Definition: dispmode.c:27
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
_In_ ACCESS_MASK AccessMask
Definition: exfuncs.h:186
#define L(x)
Definition: ntvdm.h:50
RPC_STATUS WINAPI RpcServerListen(UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait)
Definition: rpc_server.c:1520
RPC_STATUS WINAPI RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
Definition: rpc_server.c:1116
RPC_STATUS WINAPI RpcServerUseProtseqEpW(RPC_WSTR Protseq, UINT MaxCalls, RPC_WSTR Endpoint, LPVOID SecurityDescriptor)
Definition: rpc_server.c:927
#define RPC_C_PROTSEQ_MAX_REQS_DEFAULT
Definition: rpcdce.h:123
#define RPC_S_OK
Definition: rpcnterr.h:22
#define __RPC_FAR
Definition: rpc.h:56
long RPC_STATUS
Definition: rpc.h:52
#define __RPC_USER
Definition: rpc.h:65
#define TRACE(s)
Definition: solgame.cpp:4
DWORD dwOptions
Definition: solitaire.cpp:25
unsigned char * LPBYTE
Definition: typedefs.h:53
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t * LPDWORD
Definition: typedefs.h:59
#define __stdcall
Definition: typedefs.h:25
uint32_t ULONG
Definition: typedefs.h:59
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6081
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define WINAPI
Definition: msvc.h:6
ACCESS_MASK REGSAM
Definition: winreg.h:69
PWCHAR PREGISTRY_SERVER_NAME
Definition: winreg.idl:10
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170