X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fntoskrnl%2Fob%2Fobject.c;h=7e78bfeddb1ca8609383ab520287f281846200e9;hp=3c45b2bde1371b64820803409f40aa16bdbae226;hb=8532827bafa724a0d992ff227fecb10dc36ef539;hpb=193d7e020bb1b7d7e3998ffd5b03904a37e998c1 diff --git a/reactos/ntoskrnl/ob/object.c b/reactos/ntoskrnl/ob/object.c index 3c45b2bde13..7e78bfeddb1 100644 --- a/reactos/ntoskrnl/ob/object.c +++ b/reactos/ntoskrnl/ob/object.c @@ -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 */