Bewerken

Delen via


TmReadOnlyEnlistment function (wdm.h)

The TmReadOnlyEnlistment routine sets a specified enlistment to be read-only.

Syntax

NTSTATUS TmReadOnlyEnlistment(
  [in] PKENLISTMENT   Enlistment,
  [in] PLARGE_INTEGER TmVirtualClock
);

Parameters

[in] Enlistment

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.

[in] TmVirtualClock

A pointer to a virtual clock value. This parameter is optional and can be NULL.

Return value

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

Return code Description
STATUS_TRANSACTION_NOT_REQUESTED
The transaction or its enlistment is not in the correct state. For example, an enlistment cannot be read-only if the ENLISTMENT_SUPERIOR flag was specified to ZwCreateEnlistment.
 

The routine might return other NTSTATUS values.

Remarks

The TmReadOnlyEnlistment routine is a pointer-based version of the ZwReadOnlyEnlistment routine.

For information about when to use KTM's TmXxx routines instead of ZwXxx routines, see Using TmXxx Routines.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later operating system versions.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

See also

ObReferenceObjectByHandle

ResourceManagerNotification

TmCreateEnlistment

ZwCreateEnlistment

ZwOpenEnlistment

ZwReadOnlyEnlistment