[ros-diffs] [hpoussin] 24476: Formatting and add a call to StartServiceCtrlDispatcher

hpoussin at svn.reactos.org hpoussin at svn.reactos.org
Mon Oct 9 21:16:47 CEST 2006


Author: hpoussin
Date: Mon Oct  9 23:16:47 2006
New Revision: 24476

URL: http://svn.reactos.org/svn/reactos?rev=24476&view=rev
Log:
Formatting and add a call to StartServiceCtrlDispatcher

Modified:
    trunk/reactos/base/system/lsass/lsass.c
    trunk/reactos/base/system/lsass/lsass.rbuild

Modified: trunk/reactos/base/system/lsass/lsass.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/lsass/lsass.c?rev=24476&r1=24475&r2=24476&view=diff
==============================================================================
--- trunk/reactos/base/system/lsass/lsass.c (original)
+++ trunk/reactos/base/system/lsass/lsass.c Mon Oct  9 23:16:47 2006
@@ -37,44 +37,63 @@
 #define NDEBUG
 #include <debug.h>
 
+static VOID CALLBACK
+ServiceMain(DWORD argc, LPTSTR *argv);
 
-int STDCALL
-WinMain(HINSTANCE hInstance,
-        HINSTANCE hPrevInstance,
-        LPSTR lpCmdLine,
-        int nShowCmd)
+static SERVICE_TABLE_ENTRY ServiceTable[2] =
 {
-  NTSTATUS Status = STATUS_SUCCESS;
+	{TEXT("NetLogon"), ServiceMain},
+	{NULL, NULL}
+};
 
-  DPRINT("Local Security Authority Subsystem\n");
-  DPRINT("  Initializing...\n");
+static VOID CALLBACK
+ServiceMain(
+	IN DWORD argc,
+	IN LPWSTR *argv)
+{
+	DPRINT1("ServiceMain() called\n");
+}
 
-  /* Initialize the LSA server DLL. */
-  Status = LsapInitLsa();
-  if (!NT_SUCCESS(Status))
-  {
-    DPRINT1("LsapInitLsa() failed (Status 0x%08lX)\n", Status);
-    goto ByeBye;
-  }
+INT WINAPI
+WinMain(
+	IN HINSTANCE hInstance,
+	IN HINSTANCE hPrevInstance,
+	IN LPSTR lpCmdLine,
+	IN INT nShowCmd)
+{
+	NTSTATUS Status = STATUS_SUCCESS;
+
+	DPRINT("Local Security Authority Subsystem\n");
+	DPRINT("  Initializing...\n");
+
+	/* Initialize the LSA server DLL. */
+	Status = LsapInitLsa();
+	if (!NT_SUCCESS(Status))
+	{
+		DPRINT1("LsapInitLsa() failed (Status 0x%08lX)\n", Status);
+		goto ByeBye;
+	}
 
 #if 0
-  /* Initialize the SAM server DLL. */
-  Status = SamIInitialize();
-  if (!NT_SUCCESS(Status))
-  {
-    DPRINT1("SamIInitialize() failed (Status 0x%08lX)\n", Status);
-    goto ByeBye;
-  }
+	/* Initialize the SAM server DLL. */
+	Status = SamIInitialize();
+	if (!NT_SUCCESS(Status))
+	{
+		DPRINT1("SamIInitialize() failed (Status 0x%08lX)\n", Status);
+		goto ByeBye;
+	}
 #endif
 
-  /* FIXME: More initialization */
+	/* FIXME: More initialization */
 
-  DPRINT("  Done...\n");
+	StartServiceCtrlDispatcher(ServiceTable);
+
+	DPRINT("  Done...\n");
 
 ByeBye:
-  NtTerminateThread(NtCurrentThread(), Status);
+	NtTerminateThread(NtCurrentThread(), Status);
 
-  return 0;
+	return 0;
 }
 
 /* EOF */

Modified: trunk/reactos/base/system/lsass/lsass.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/lsass/lsass.rbuild?rev=24476&r1=24475&r2=24476&view=diff
==============================================================================
--- trunk/reactos/base/system/lsass/lsass.rbuild (original)
+++ trunk/reactos/base/system/lsass/lsass.rbuild Mon Oct  9 23:16:47 2006
@@ -6,6 +6,7 @@
 	<define name="UNICODE" />
 	<define name="_UNICODE" />
 	<define name="__USE_W32API" />
+	<library>advapi32</library>
 	<library>ntdll</library>
 	<library>kernel32</library>
 	<library>lsasrv</library>




More information about the Ros-diffs mailing list