-/* $Id: object.c,v 1.45 2002/03/01 00:47:40 ekohl Exp $
+/* $Id: object.c,v 1.46 2002/03/05 00:19:28 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* ObGetObjectPointerCount@4
*
* DESCRIPTION
- * Retrieves the reference count of the given object.
+ * Retrieves the pointer(reference) count of the given object.
*
* ARGUMENTS
* ObjectBody = Body of the object.
return(Header->RefCount);
}
+
+/**********************************************************************
+ * NAME INTERNAL
+ * ObGetObjectHandleCount@4
+ *
+ * DESCRIPTION
+ * Retrieves the handle count of the given object.
+ *
+ * ARGUMENTS
+ * ObjectBody = Body of the object.
+ *
+ * RETURN VALUE
+ * Reference count.
+ */
+ULONG
+ObGetObjectHandleCount(PVOID Object)
+{
+ POBJECT_HEADER Header;
+
+ assert(Object);
+ Header = BODY_TO_HEADER(Object);
+
+ return(Header->HandleCount);
+}
+
/* EOF */
-/* $Id: create.c,v 1.45 2002/02/20 20:15:07 ekohl Exp $
+/* $Id: create.c,v 1.46 2002/03/05 00:20:54 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
DPRINT("Process %x(%d)\n",
Thread->ThreadsProcess,
- ObGetReferenceCount(Thread->ThreadsProcess));
+ ObGetObjectPointerCount(Thread->ThreadsProcess));
ObDereferenceObject(Thread->ThreadsProcess);
Thread->ThreadsProcess = NULL;
PiNrThreads--;
ULONG HandleCount)
{
DPRINT("PiCloseThread(ObjectBody %x)\n", ObjectBody);
- DPRINT("ObGetReferenceCount(ObjectBody) %d "
- "ObGetHandleCount(ObjectBody) %d\n",
- ObGetReferenceCount(ObjectBody),
- ObGetHandleCount(ObjectBody));
+ DPRINT("ObGetObjectPointerCount(ObjectBody) %d "
+ "ObGetObjectHandleCount(ObjectBody) %d\n",
+ ObGetObjectPointerCount(ObjectBody),
+ ObGetObjectHandleCount(ObjectBody));
}
NTSTATUS