[NTOS]: No good deed goes unpunished. Continuing the novel/saga from a couple of...
[reactos.git] / reactos / subsystems / win32 / 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 * PROGRAMMER: Eric Kohl
10 */
11
12 /* INCLUDES ******************************************************************/
13
14 #include <csrss.h>
15
16 #define NDEBUG
17 #include <debug.h>
18
19 /* GLOBALS *******************************************************************/
20
21 static BOOLEAN ServicesProcessIdValid = FALSE;
22 static ULONG_PTR ServicesProcessId;
23
24
25 /* FUNCTIONS *****************************************************************/
26
27 CSR_API(CsrRegisterServicesProcess)
28 {
29 Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
30 Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
31
32 if (ServicesProcessIdValid == TRUE)
33 {
34 /* Only accept a single call */
35 return STATUS_INVALID_PARAMETER;
36 }
37 else
38 {
39 ServicesProcessId = (ULONG_PTR)Request->Data.RegisterServicesProcessRequest.ProcessId;
40 ServicesProcessIdValid = TRUE;
41 return STATUS_SUCCESS;
42 }
43 }
44
45 /* EOF */