diff --git a/reactos/subsys/smss/smapi.c b/reactos/subsys/smss/smapi.c index 42c2ad0aa8c..a16c3216013 100644 --- a/reactos/subsys/smss/smapi.c +++ b/reactos/subsys/smss/smapi.c @@ -1,4 +1,5 @@ -/* +/* $Id: smapi.c,v 1.2 1999/12/11 01:42:44 ekohl Exp $ + * * Reactos Session Manager * * @@ -9,28 +10,53 @@ #include "smss.h" +//#define NDEBUG VOID STDCALL -SmApiThread(HANDLE Port) +SmApiThread (HANDLE Port) { - ULONG count; + NTSTATUS Status; + ULONG Unknown; + PLPCMESSAGE Reply = NULL; + LPCMESSAGE Message; - DisplayString (L"SmApiThread running...\n"); +#ifndef NDEBUG + DisplayString (L"SmApiThread: running\n"); +#endif -#if 0 - NtSuspendThread (NtCurrentThread(), &count); - - while (TRUE) + for (;;) { +#ifndef NDEBUG + DisplayString (L"SmApiThread: waiting for message\n"); +#endif + Status = NtReplyWaitReceivePort (Port, + &Unknown, + Reply, + &Message); + if (NT_SUCCESS(Status)) + { +#ifndef NDEBUG + DisplayString (L"SmApiThread: message received\n"); +#endif + if (Message.MessageType == LPC_CONNECTION_REQUEST) + { + + } + else + { + + } + + } } +#ifndef NDEBUG + DisplayString (L"SmApiThread: terminating\n"); #endif - DisplayString (L"SmApiThread terminating...\n"); - - NtTerminateThread(NtCurrentThread(), 0); + NtTerminateThread (NtCurrentThread (), STATUS_UNSUCCESSFUL); } /* EOF */ diff --git a/reactos/subsys/smss/smss.h b/reactos/subsys/smss/smss.h index eccdba9ac82..71d07245dff 100644 --- a/reactos/subsys/smss/smss.h +++ b/reactos/subsys/smss/smss.h @@ -20,6 +20,7 @@ BOOL InitSessionManager (HANDLE Children[]); /* smss.c */ void DisplayString (LPCWSTR lpwString); +void PrintString (char* fmt,...); /* smapi.c */