2005-01-06 13:58:04 +00:00
|
|
|
/* $Id$
|
2002-10-20 14:54:34 +00:00
|
|
|
*
|
|
|
|
* reactos/subsys/csrss/api/user.c
|
|
|
|
*
|
|
|
|
* User functions
|
|
|
|
*
|
|
|
|
* ReactOS Operating System
|
2006-05-20 10:49:56 +00:00
|
|
|
*
|
|
|
|
* PROGRAMMER: Eric Kohl
|
2002-10-20 14:54:34 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
2010-03-10 04:59:39 +00:00
|
|
|
#include <srv.h>
|
2002-10-20 14:54:34 +00:00
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
/* GLOBALS *******************************************************************/
|
|
|
|
|
|
|
|
static BOOLEAN ServicesProcessIdValid = FALSE;
|
2008-10-26 15:23:00 +00:00
|
|
|
static ULONG_PTR ServicesProcessId;
|
2002-10-20 14:54:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
|
|
|
CSR_API(CsrRegisterServicesProcess)
|
|
|
|
{
|
2005-08-11 02:58:54 +00:00
|
|
|
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
|
2005-08-16 23:05:33 +00:00
|
|
|
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
|
2002-10-20 14:54:34 +00:00
|
|
|
|
|
|
|
if (ServicesProcessIdValid == TRUE)
|
|
|
|
{
|
|
|
|
/* Only accept a single call */
|
2008-08-02 22:09:22 +00:00
|
|
|
return STATUS_INVALID_PARAMETER;
|
2002-10-20 14:54:34 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-10-26 15:23:00 +00:00
|
|
|
ServicesProcessId = (ULONG_PTR)Request->Data.RegisterServicesProcessRequest.ProcessId;
|
2002-10-20 14:54:34 +00:00
|
|
|
ServicesProcessIdValid = TRUE;
|
2008-08-02 22:09:22 +00:00
|
|
|
return STATUS_SUCCESS;
|
2002-10-20 14:54:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|