- Add RegisterServiceCtrlHandlerExA/W
- Add stubs for CheckTokenMembership and LsaGetUserName
Modified: trunk/reactos/lib/advapi32/advapi32.def
Modified: trunk/reactos/lib/advapi32/sec/lsa.c
Modified: trunk/reactos/lib/advapi32/service/sctrl.c
Modified: trunk/reactos/lib/advapi32/token/token.c
_____
Modified: trunk/reactos/lib/advapi32/advapi32.def
--- trunk/reactos/lib/advapi32/advapi32.def 2005-02-06 21:55:07 UTC
(rev 13449)
+++ trunk/reactos/lib/advapi32/advapi32.def 2005-02-06 21:57:44 UTC
(rev 13450)
@@ -45,6 +45,7 @@
BuildTrusteeWithSidW@8
ChangeServiceConfigA@44
ChangeServiceConfigW@44
+CheckTokenMembership@12
ClearEventLogA@8
ClearEventLogW@8
CloseEventLog@4
@@ -235,7 +236,7 @@
LsaFreeMemory@4
;LsaGetQuotasForAccount@8
;LsaGetSystemAccessAccount@8
-;LsaGetUserName@8
+LsaGetUserName@8
;LsaICLookupNames@32
;LsaICLookupSids@32
;LsaLookupNames@20
@@ -359,6 +360,8 @@
RegisterEventSourceW@8
RegisterServiceCtrlHandlerA@8
RegisterServiceCtrlHandlerW@8
+RegisterServiceCtrlHandlerExA@12
+RegisterServiceCtrlHandlerExW@12
;ReplaceAllAccessRightsA
;ReplaceAllAccessRightsW
ReportEventA@36
_____
Modified: trunk/reactos/lib/advapi32/sec/lsa.c
--- trunk/reactos/lib/advapi32/sec/lsa.c 2005-02-06 21:55:07 UTC
(rev 13449)
+++ trunk/reactos/lib/advapi32/sec/lsa.c 2005-02-06 21:57:44 UTC
(rev 13450)
@@ -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 @@
{
return STATUS_NOT_IMPLEMENTED;
}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS
+STDCALL
+LsaGetUserName(
+ PUNICODE_STRING *UserName,
+ PUNICODE_STRING *DomainName)
+{
+ DPRINT1("LsaGetUserName not implemented\n");
+
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+/* EOF */
_____
Modified: trunk/reactos/lib/advapi32/service/sctrl.c
--- trunk/reactos/lib/advapi32/service/sctrl.c 2005-02-06 21:55:07 UTC
(rev 13449)
+++ trunk/reactos/lib/advapi32/service/sctrl.c 2005-02-06 21:57:44 UTC
(rev 13450)
@@ -31,6 +31,8 @@
LPSERVICE_MAIN_FUNCTIONW lpFuncW;
} Main;
LPHANDLER_FUNCTION HandlerFunction;
+ LPHANDLER_FUNCTION_EX HandlerFunctionEx;
+ LPVOID HandlerContext;
SERVICE_STATUS ServiceStatus;
BOOL bUnicode;
LPWSTR Arguments;
@@ -326,12 +328,70 @@
}
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;
+}
+
+
+/**********************************************************************
* SetServiceBits
*
* @unimplemented
_____
Modified: trunk/reactos/lib/advapi32/token/token.c
--- trunk/reactos/lib/advapi32/token/token.c 2005-02-06 21:55:07 UTC
(rev 13449)
+++ trunk/reactos/lib/advapi32/token/token.c 2005-02-06 21:57:44 UTC
(rev 13450)
@@ -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 @@
DuplicateTokenHandle);
}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+CheckTokenMembership(HANDLE Token, PSID SidToCheck, PBOOL IsMember)
+{
+ DPRINT1("CheckTokenMembership not implemented\n");
+
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+
+ return FALSE;
+}
+
/* EOF */
Show replies by date