Cleanup isn't necessary after calling the driver in NtQueryDirectoryFile.
[reactos.git] / reactos / ntoskrnl / lpc / query.c
1 /* $Id$
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 *
8 * PROGRAMMERS: David Welch (welch@cwcom.net)
9 */
10
11 /* INCLUDES *****************************************************************/
12
13 #include <ntoskrnl.h>
14 #define NDEBUG
15 #include <internal/debug.h>
16
17 /* FUNCTIONS *****************************************************************/
18
19 /**********************************************************************
20 * NAME EXPORTED
21 * NtQueryInformationPort@20
22 *
23 * DESCRIPTION
24 *
25 * ARGUMENTS
26 * PortHandle [IN]
27 * PortInformationClass [IN]
28 * PortInformation [OUT]
29 * PortInformationLength [IN]
30 * ReturnLength [OUT]
31 *
32 * RETURN VALUE
33 * STATUS_SUCCESS if the call succedeed. An error code
34 * otherwise.
35 *
36 * NOTES
37 * P. Dabak reports that this system service seems to return
38 * no information.
39 */
40 /*EXPORTED*/ NTSTATUS STDCALL
41 NtQueryInformationPort (IN HANDLE PortHandle,
42 IN PORT_INFORMATION_CLASS PortInformationClass,
43 OUT PVOID PortInformation,
44 IN ULONG PortInformationLength,
45 OUT PULONG ReturnLength)
46 {
47 NTSTATUS Status;
48 PEPORT Port;
49
50 Status = ObReferenceObjectByHandle (PortHandle,
51 PORT_ALL_ACCESS, /* AccessRequired */
52 LpcPortObjectType,
53 UserMode,
54 (PVOID *) & Port,
55 NULL);
56 if (!NT_SUCCESS(Status))
57 {
58 DPRINT("NtQueryInformationPort() = %x\n", Status);
59 return (Status);
60 }
61 /*
62 * FIXME: NT does nothing here!
63 */
64 ObDereferenceObject (Port);
65 return STATUS_SUCCESS;
66 }
67
68
69 /* EOF */