- Add RegisterServiceCtrlHandlerExA/W

- Add stubs for CheckTokenMembership and LsaGetUserName

svn path=/trunk/; revision=13450
This commit is contained in:
Gé van Geldorp 2005-02-06 21:57:44 +00:00
parent 9e799af696
commit 97bae25ad4
4 changed files with 98 additions and 5 deletions

View file

@ -45,6 +45,7 @@ BuildTrusteeWithSidA@8
BuildTrusteeWithSidW@8
ChangeServiceConfigA@44
ChangeServiceConfigW@44
CheckTokenMembership@12
ClearEventLogA@8
ClearEventLogW@8
CloseEventLog@4
@ -235,7 +236,7 @@ LsaClose@4
LsaFreeMemory@4
;LsaGetQuotasForAccount@8
;LsaGetSystemAccessAccount@8
;LsaGetUserName@8
LsaGetUserName@8
;LsaICLookupNames@32
;LsaICLookupSids@32
;LsaLookupNames@20
@ -359,6 +360,8 @@ RegisterEventSourceA@8
RegisterEventSourceW@8
RegisterServiceCtrlHandlerA@8
RegisterServiceCtrlHandlerW@8
RegisterServiceCtrlHandlerExA@12
RegisterServiceCtrlHandlerExW@12
;ReplaceAllAccessRightsA
;ReplaceAllAccessRightsW
ReportEventA@36

View file

@ -1,5 +1,4 @@
/* $Id$
*
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/advapi32/sec/lsa.c
@ -493,3 +492,19 @@ LsaStorePrivateData(
{
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
STDCALL
LsaGetUserName(
PUNICODE_STRING *UserName,
PUNICODE_STRING *DomainName)
{
DPRINT1("LsaGetUserName not implemented\n");
return STATUS_NOT_IMPLEMENTED;
}
/* EOF */

View file

@ -31,6 +31,8 @@ typedef struct _ACTIVE_SERVICE
LPSERVICE_MAIN_FUNCTIONW lpFuncW;
} Main;
LPHANDLER_FUNCTION HandlerFunction;
LPHANDLER_FUNCTION_EX HandlerFunctionEx;
LPVOID HandlerContext;
SERVICE_STATUS ServiceStatus;
BOOL bUnicode;
LPWSTR Arguments;
@ -326,6 +328,64 @@ RegisterServiceCtrlHandlerW(LPCWSTR lpServiceName,
}
Service->HandlerFunction = lpHandlerProc;
Service->HandlerFunctionEx = NULL;
return (SERVICE_STATUS_HANDLE)Service->ThreadId;
}
/**********************************************************************
* RegisterServiceCtrlHandlerExA
*
* @implemented
*/
SERVICE_STATUS_HANDLE STDCALL
RegisterServiceCtrlHandlerExA(LPCSTR lpServiceName,
LPHANDLER_FUNCTION_EX lpHandlerProc,
LPVOID lpContext)
{
ANSI_STRING ServiceNameA;
UNICODE_STRING ServiceNameU;
SERVICE_STATUS_HANDLE SHandle;
RtlInitAnsiString(&ServiceNameA, (LPSTR)lpServiceName);
if (!NT_SUCCESS(RtlAnsiStringToUnicodeString(&ServiceNameU, &ServiceNameA, TRUE)))
{
SetLastError(ERROR_OUTOFMEMORY);
return (SERVICE_STATUS_HANDLE)0;
}
SHandle = RegisterServiceCtrlHandlerExW(ServiceNameU.Buffer,
lpHandlerProc,
lpContext);
RtlFreeUnicodeString(&ServiceNameU);
return SHandle;
}
/**********************************************************************
* RegisterServiceCtrlHandlerExW
*
* @implemented
*/
SERVICE_STATUS_HANDLE STDCALL
RegisterServiceCtrlHandlerExW(LPCWSTR lpServiceName,
LPHANDLER_FUNCTION_EX lpHandlerProc,
LPVOID lpContext)
{
PACTIVE_SERVICE Service;
Service = ScLookupServiceByServiceName((LPWSTR)lpServiceName);
if (Service == NULL)
{
return (SERVICE_STATUS_HANDLE)NULL;
}
Service->HandlerFunction = NULL;
Service->HandlerFunctionEx = lpHandlerProc;
Service->HandlerContext = lpContext;
return (SERVICE_STATUS_HANDLE)Service->ThreadId;
}

View file

@ -1,5 +1,4 @@
/* $Id$
*
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/advapi32/token/token.c
@ -11,6 +10,8 @@
#include "advapi32.h"
#define NDEBUG
#include <debug.h>
/*
* @implemented
@ -310,4 +311,18 @@ DuplicateToken (HANDLE ExistingTokenHandle,
DuplicateTokenHandle);
}
/*
* @unimplemented
*/
BOOL STDCALL
CheckTokenMembership(HANDLE Token, PSID SidToCheck, PBOOL IsMember)
{
DPRINT1("CheckTokenMembership not implemented\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* EOF */