1 /* $Id: complete.c,v 1.9 2003/07/11 01:23:15 royce Exp $
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/lpc/complete.c
6 * PURPOSE: Communication mechanism
7 * PROGRAMMER: David Welch (welch@cwcom.net)
12 /* INCLUDES ******************************************************************/
14 #include <ddk/ntddk.h>
15 #include <internal/ob.h>
16 #include <internal/port.h>
17 #include <internal/dbg.h>
20 #include <internal/debug.h>
22 /* FUNCTIONS *****************************************************************/
24 /***********************************************************************
26 * NtCompleteConnectPort@4
29 EXPORTED NTSTATUS STDCALL
30 NtCompleteConnectPort (HANDLE PortHandle
)
35 DPRINT("NtCompleteConnectPort(PortHandle %x)\n", PortHandle
);
37 Status
= ObReferenceObjectByHandle (PortHandle
,
43 if (!NT_SUCCESS(Status
))
48 OurPort
->State
= EPORT_CONNECTED_SERVER
;
50 KeReleaseSemaphore(&OurPort
->OtherPort
->Semaphore
, IO_NO_INCREMENT
, 1,
53 ObDereferenceObject (OurPort
);
55 return (STATUS_SUCCESS
);