TmDereferenceEnlistmentKey - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

NTSTATUS TmDereferenceEnlistmentKey(
  [in]            PKENLISTMENT Enlistment,
  [out, optional] PBOOLEAN     LastReference
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-tmdereferenceenlistmentkey)

TmDereferenceEnlistmentKey function

Description

The TmDereferenceEnlistmentKey routine decrements the reference count for the key of a specified enlistment object.

Parameters

Enlistment [in]

A pointer to an enlistment object. Your component can receive this pointer as input to a ResourceManagerNotification callback routine. Alternatively, your component can call ObReferenceObjectByHandle and supply the object handle that a previous call to ZwCreateEnlistment, TmCreateEnlistment, or ZwOpenEnlistment provided.

LastReference [out, optional]

A pointer to a BOOLEAN-typed variable. This variable receives TRUE if the reference count is zero after TmDereferenceEnlistmentKey decrements it. Otherwise, the variable receives FALSE.

Return value

TmDereferenceEnlistmentKey returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return one of the following values:

Return code Description
STATUS_UNSUCCESSFUL The reference count of the specified enlistment object is zero and cannot be decremented.

The routine might return other NTSTATUS values.

Remarks

The TmReferenceEnlistmentKey routine increments the reference count for an enlistment object's key, and the TmDereferenceEnlistmentKey routine decrements the count.

For information about when to use KTM's Tm*Xxx* routines instead of Zw*Xxx* routines, see Using TmXxx Routines.

See also

ObReferenceObjectByHandle

ResourceManagerNotification

TmCreateEnlistment

TmReferenceEnlistmentKey

ZwCreateEnlistment

ZwOpenEnlistment