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
*
*
@ -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 */

View file

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