Formatting and add a call to StartServiceCtrlDispatcher

svn path=/trunk/; revision=24476
This commit is contained in:
Hervé Poussineau 2006-10-09 19:16:47 +00:00
parent f86ee0a05c
commit e16a26e1f2
2 changed files with 46 additions and 26 deletions

View file

@ -37,12 +37,29 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
static VOID CALLBACK
ServiceMain(DWORD argc, LPTSTR *argv);
int STDCALL static SERVICE_TABLE_ENTRY ServiceTable[2] =
WinMain(HINSTANCE hInstance, {
HINSTANCE hPrevInstance, {TEXT("NetLogon"), ServiceMain},
LPSTR lpCmdLine, {NULL, NULL}
int nShowCmd) };
static VOID CALLBACK
ServiceMain(
IN DWORD argc,
IN LPWSTR *argv)
{
DPRINT1("ServiceMain() called\n");
}
INT WINAPI
WinMain(
IN HINSTANCE hInstance,
IN HINSTANCE hPrevInstance,
IN LPSTR lpCmdLine,
IN INT nShowCmd)
{ {
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
@ -69,6 +86,8 @@ WinMain(HINSTANCE hInstance,
/* FIXME: More initialization */ /* FIXME: More initialization */
StartServiceCtrlDispatcher(ServiceTable);
DPRINT(" Done...\n"); DPRINT(" Done...\n");
ByeBye: ByeBye:

View file

@ -6,6 +6,7 @@
<define name="UNICODE" /> <define name="UNICODE" />
<define name="_UNICODE" /> <define name="_UNICODE" />
<define name="__USE_W32API" /> <define name="__USE_W32API" />
<library>advapi32</library>
<library>ntdll</library> <library>ntdll</library>
<library>kernel32</library> <library>kernel32</library>
<library>lsasrv</library> <library>lsasrv</library>