Made and new ntoskrnl/lpc directory for the LPC subsystem.
[reactos.git] / reactos / ntoskrnl / lpc / query.c
1 /* $Id: query.c,v 1.1 2000/06/04 17:27:39 ea Exp $
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/lpc/query.c
6 * PURPOSE: Communication mechanism
7 * PROGRAMMER: David Welch (welch@cwcom.net)
8 * UPDATE HISTORY:
9 * Created 22/05/98
10 */
11
12 /* INCLUDES *****************************************************************/
13
14 #include <ddk/ntddk.h>
15 #include <internal/ob.h>
16 #include <string.h>
17 #include <internal/string.h>
18 #include <internal/port.h>
19 #include <internal/dbg.h>
20
21 #define NDEBUG
22 #include <internal/debug.h>
23
24
25 /**********************************************************************
26 * NAME EXPORTED
27 * NtQueryInformationPort@20
28 *
29 * DESCRIPTION
30 *
31 * ARGUMENTS
32 * PortHandle [IN]
33 * PortInformationClass [IN]
34 * PortInformation [OUT]
35 * PortInformationLength [IN]
36 * ReturnLength [OUT]
37 *
38 * RETURN VALUE
39 * STATUS_SUCCESS if the call succedeed. An error code
40 * otherwise.
41 *
42 * NOTES
43 * P. Dabak reports that this system service seems to return
44 * no information.
45 */
46 EXPORTED
47 NTSTATUS
48 STDCALL
49 NtQueryInformationPort (
50 IN HANDLE PortHandle,
51 IN CINT PortInformationClass,
52 OUT PVOID PortInformation,
53 IN ULONG PortInformationLength,
54 OUT PULONG ReturnLength
55 )
56 {
57 NTSTATUS Status;
58 PEPORT Port;
59
60 Status = ObReferenceObjectByHandle (
61 PortHandle,
62 PORT_ALL_ACCESS, /* AccessRequired */
63 ExPortType,
64 UserMode,
65 (PVOID *) & Port,
66 NULL
67 );
68 if (!NT_SUCCESS(Status))
69 {
70 DPRINT("NtQueryInformationPort() = %x\n", Status);
71 return (Status);
72 }
73 /*
74 * FIXME: NT does nothing here!
75 */
76 ObDereferenceObject (Port);
77 return STATUS_SUCCESS;
78 }
79
80
81 /* EOF */