mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 16:23:55 +00:00
Added ObGetObjectHandleCount().
svn path=/trunk/; revision=2672
This commit is contained in:
parent
193d7e020b
commit
8532827baf
3 changed files with 36 additions and 8 deletions
|
@ -98,4 +98,7 @@ PVOID ObDeleteHandle(struct _EPROCESS* Process,
|
|||
NTSTATUS
|
||||
ObpCreateTypeObject(POBJECT_TYPE ObjectType);
|
||||
|
||||
ULONG
|
||||
ObGetObjectHandleCount(PVOID Object);
|
||||
|
||||
#endif /* __INCLUDE_INTERNAL_OBJMGR_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $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
|
||||
|
@ -530,7 +530,7 @@ ObfDereferenceObject(IN PVOID Object)
|
|||
* 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.
|
||||
|
@ -549,4 +549,29 @@ ObGetObjectPointerCount(PVOID 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 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $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
|
||||
|
@ -322,7 +322,7 @@ PiDeleteThread(PVOID ObjectBody)
|
|||
|
||||
DPRINT("Process %x(%d)\n",
|
||||
Thread->ThreadsProcess,
|
||||
ObGetReferenceCount(Thread->ThreadsProcess));
|
||||
ObGetObjectPointerCount(Thread->ThreadsProcess));
|
||||
ObDereferenceObject(Thread->ThreadsProcess);
|
||||
Thread->ThreadsProcess = NULL;
|
||||
PiNrThreads--;
|
||||
|
@ -337,10 +337,10 @@ PiCloseThread(PVOID ObjectBody,
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue