ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

listen.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:         ReactOS Kernel
00003  * LICENSE:         GPL - See COPYING in the top level directory
00004  * FILE:            ntoskrnl/lpc/listen.c
00005  * PURPOSE:         Local Procedure Call: Listening
00006  * PROGRAMMERS:     Alex Ionescu (alex.ionescu@reactos.org)
00007  */
00008 
00009 /* INCLUDES ******************************************************************/
00010 
00011 #include <ntoskrnl.h>
00012 #define NDEBUG
00013 #include <debug.h>
00014 
00015 /* PUBLIC FUNCTIONS **********************************************************/
00016 
00017 /*
00018  * @implemented
00019  */
00020 NTSTATUS
00021 NTAPI
00022 NtListenPort(IN HANDLE PortHandle,
00023              OUT PPORT_MESSAGE ConnectMessage)
00024 {
00025     NTSTATUS Status;
00026     PAGED_CODE();
00027     LPCTRACE(LPC_LISTEN_DEBUG, "Handle: %lx\n", PortHandle);
00028 
00029     /* Wait forever for a connection request. */
00030     for (;;)
00031     {
00032         /* Do the wait */
00033         Status = NtReplyWaitReceivePort(PortHandle,
00034                                         NULL,
00035                                         NULL,
00036                                         ConnectMessage);
00037 
00038         /* Accept only LPC_CONNECTION_REQUEST requests. */
00039         if ((Status != STATUS_SUCCESS) ||
00040             (LpcpGetMessageType(ConnectMessage) == LPC_CONNECTION_REQUEST))
00041         {
00042             /* Break out */
00043             break;
00044         }
00045     }
00046 
00047     /* Return status */
00048     return Status;
00049 }
00050 
00051 
00052 /* EOF */

Generated on Sat May 26 2012 04:26:36 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.