6c55ddf0a4372b041a55387d6c2c740f2633110b
[reactos.git] / reactos / subsys / csrss / api / user.c
1 /* $Id$
2 *
3 * reactos/subsys/csrss/api/user.c
4 *
5 * User functions
6 *
7 * ReactOS Operating System
8 */
9
10 /* INCLUDES ******************************************************************/
11
12 #include <csrss.h>
13
14 #define NDEBUG
15 #include <debug.h>
16
17 /* GLOBALS *******************************************************************/
18
19 static BOOLEAN ServicesProcessIdValid = FALSE;
20 static ULONG ServicesProcessId;
21
22
23 /* FUNCTIONS *****************************************************************/
24
25 CSR_API(CsrRegisterServicesProcess)
26 {
27 NTSTATUS Status;
28
29 Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
30 Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - LPC_MESSAGE_BASE_SIZE;
31
32 if (ServicesProcessIdValid == TRUE)
33 {
34 /* Only accept a single call */
35 Status = STATUS_INVALID_PARAMETER;
36 }
37 else
38 {
39 ServicesProcessId = (ULONG)Request->Data.RegisterServicesProcessRequest.ProcessId;
40 ServicesProcessIdValid = TRUE;
41 Status = STATUS_SUCCESS;
42 }
43
44 Request->Status = Status;
45
46 return(Status);
47 }
48
49 /* EOF */