Cleanup isn't necessary after calling the driver in NtQueryDirectoryFile.
[reactos.git] / reactos / ntoskrnl / lpc / query.c
index e4769d1..3463047 100644 (file)
@@ -1,29 +1,25 @@
-/* $Id: query.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $
- * 
+/* $Id$
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/lpc/query.c
  * PURPOSE:         Communication mechanism
- * PROGRAMMER:      David Welch (welch@cwcom.net)
- * UPDATE HISTORY:
- *                  Created 22/05/98
+ *
+ * PROGRAMMERS:     David Welch (welch@cwcom.net)
  */
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <internal/ob.h>
-#include <internal/port.h>
-#include <internal/dbg.h>
-
+#include <ntoskrnl.h>
 #define NDEBUG
 #include <internal/debug.h>
 
+/* FUNCTIONS *****************************************************************/
 
 /**********************************************************************
  * NAME                                                        EXPORTED
  *     NtQueryInformationPort@20
- *     
+ *
  * DESCRIPTION
  *
  * ARGUMENTS
  *     P. Dabak reports that this system service seems to return
  *     no information.
  */
-EXPORTED
-NTSTATUS
-STDCALL
-NtQueryInformationPort (
-       IN      HANDLE  PortHandle,
-       IN      CINT    PortInformationClass,   
-       OUT     PVOID   PortInformation,    
-       IN      ULONG   PortInformationLength,
-       OUT     PULONG  ReturnLength
-       )
+/*EXPORTED*/ NTSTATUS STDCALL
+NtQueryInformationPort (IN     HANDLE  PortHandle,
+                       IN      PORT_INFORMATION_CLASS  PortInformationClass,
+                       OUT     PVOID   PortInformation,
+                       IN      ULONG   PortInformationLength,
+                       OUT     PULONG  ReturnLength)
 {
-       NTSTATUS        Status;
-       PEPORT          Port;
-       
-       Status = ObReferenceObjectByHandle (
-                       PortHandle,
-                       PORT_ALL_ACCESS,   /* AccessRequired */
-                       ExPortType,
-                       UserMode,
-                       (PVOID *) & Port,
-                       NULL
-                       );
-       if (!NT_SUCCESS(Status))
-       {
-               DPRINT("NtQueryInformationPort() = %x\n", Status);
-               return (Status);
-       }
-       /*
-        * FIXME: NT does nothing here!
-        */
-       ObDereferenceObject (Port);
-       return STATUS_SUCCESS;
+  NTSTATUS     Status;
+  PEPORT               Port;
+
+  Status = ObReferenceObjectByHandle (PortHandle,
+                                     PORT_ALL_ACCESS,   /* AccessRequired */
+                                     LpcPortObjectType,
+                                     UserMode,
+                                     (PVOID *) & Port,
+                                     NULL);
+  if (!NT_SUCCESS(Status))
+    {
+      DPRINT("NtQueryInformationPort() = %x\n", Status);
+      return (Status);
+    }
+  /*
+   * FIXME: NT does nothing here!
+   */
+  ObDereferenceObject (Port);
+  return STATUS_SUCCESS;
 }