440c98d1310a21534c5bb4ae412b54908d101b8f
[reactos.git] / reactos / ntoskrnl / lpc / query.c
1 /* $Id: query.c,v 1.8 2003/12/30 18:52:05 fireball 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 <internal/port.h>
17 #include <internal/dbg.h>
18
19 #define NDEBUG
20 #include <internal/debug.h>
21
22 /* FUNCTIONS *****************************************************************/
23
24 /**********************************************************************
25 * NAME EXPORTED
26 * NtQueryInformationPort@20
27 *
28 * DESCRIPTION
29 *
30 * ARGUMENTS
31 * PortHandle [IN]
32 * PortInformationClass [IN]
33 * PortInformation [OUT]
34 * PortInformationLength [IN]
35 * ReturnLength [OUT]
36 *
37 * RETURN VALUE
38 * STATUS_SUCCESS if the call succedeed. An error code
39 * otherwise.
40 *
41 * NOTES
42 * P. Dabak reports that this system service seems to return
43 * no information.
44 */
45 /*EXPORTED*/ NTSTATUS STDCALL
46 NtQueryInformationPort (IN HANDLE PortHandle,
47 IN CINT PortInformationClass,
48 OUT PVOID PortInformation,
49 IN ULONG PortInformationLength,
50 OUT PULONG ReturnLength)
51 {
52 NTSTATUS Status;
53 PEPORT Port;
54
55 Status = ObReferenceObjectByHandle (PortHandle,
56 PORT_ALL_ACCESS, /* AccessRequired */
57 ExPortType,
58 UserMode,
59 (PVOID *) & Port,
60 NULL);
61 if (!NT_SUCCESS(Status))
62 {
63 DPRINT("NtQueryInformationPort() = %x\n", Status);
64 return (Status);
65 }
66 /*
67 * FIXME: NT does nothing here!
68 */
69 ObDereferenceObject (Port);
70 return STATUS_SUCCESS;
71 }
72
73
74 /* EOF */