Added waiting for port requests

svn path=/trunk/; revision=849
This commit is contained in:
Eric Kohl 1999-12-11 01:42:44 +00:00
parent b14104f1e7
commit 45043db6ff
2 changed files with 38 additions and 11 deletions

View file

@ -1,4 +1,5 @@
/* /* $Id: smapi.c,v 1.2 1999/12/11 01:42:44 ekohl Exp $
*
* Reactos Session Manager * Reactos Session Manager
* *
* *
@ -9,28 +10,53 @@
#include "smss.h" #include "smss.h"
//#define NDEBUG
VOID STDCALL 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 for (;;)
NtSuspendThread (NtCurrentThread(), &count);
while (TRUE)
{ {
#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 #endif
DisplayString (L"SmApiThread terminating...\n"); NtTerminateThread (NtCurrentThread (), STATUS_UNSUCCESSFUL);
NtTerminateThread(NtCurrentThread(), 0);
} }
/* EOF */ /* EOF */

View file

@ -20,6 +20,7 @@ BOOL InitSessionManager (HANDLE Children[]);
/* smss.c */ /* smss.c */
void DisplayString (LPCWSTR lpwString); void DisplayString (LPCWSTR lpwString);
void PrintString (char* fmt,...);
/* smapi.c */ /* smapi.c */