NTSTATUS
ObpReferenceProcessObjectByHandle(
  IN  HANDLE Handle,
  IN  PEPROCESS Process,
  IN  PHANDLE_TABLE HandleTable,
  IN  KPROCESSOR_MODE AccessMode,
  OUT PVOID *Object,
  OUT POBJECT_HANDLE_INFORMATION HandleInformation,
  OUT PACCESS_MASK AuditMask
  );

Routine Description:

    Given a handle to an object a process and its handle table
    this routine returns a pointer to the body of the object with
    proper ref counts

Arguments:

    Handle - Supplies a handle to the object being referenced.  It can
        also be the result of NtCurrentProcess or NtCurrentThread

    Process - Process that the handle should be referenced from.

    HandleTable - Handle table of target process

    AccessMode - Supplies the processor mode of the access

    Object - Receives a pointer to the object body if the operation
        is successful

    HandleInformation - receives information regarding the
        input handle.

    AuditMask - Pointer to any audit mask associated with the handle.

Return Value:

    An appropriate NTSTATUS value