ObReferenceObjectSafe function (wdm.h)

The ObReferenceObjectSafe function increments the reference count for an object and determines if it is safe to use the object. It returns FALSE if the object is being deleted or TRUE if it's safe to use the object further.

Syntax

BOOLEAN ObReferenceObjectSafe(
  PVOID Object
);

Parameters

Object

Supplies a pointer to the object whose reference count is incremented.

Return value

ObReferenceObjectSafe returns one of the following values:

Return Value Meaning
TRUE The object was successfully referenced and safe to use.
FALSE The object is being deleted.

Requirements

Requirement Value
Header wdm.h
IRQL <= DISPATCH_LEVEL

See also