NtSetInformationEnlistment function (wdm.h)

The ZwSetInformationEnlistment routine sets information for a specified enlistment object.

Syntax

__kernel_entry NTSYSCALLAPI NTSTATUS NtSetInformationEnlistment(
  [in] HANDLE                       EnlistmentHandle,
  [in] ENLISTMENT_INFORMATION_CLASS EnlistmentInformationClass,
  [in] PVOID                        EnlistmentInformation,
  [in] ULONG                        EnlistmentInformationLength
);

Parameters

[in] EnlistmentHandle

A handle to an enlistment object that was obtained by a previous call to ZwCreateEnlistment or ZwOpenEnlistment. The handle must have ENLISTMENT_SET_INFORMATION access to the object.

[in] EnlistmentInformationClass

A ENLISTMENT_INFORMATION_CLASS-typed enumeration value that specifies the type of information to be set. This value must be EnlistmentRecoveryInformation.

The enumeration's EnlistmentBasicInformation and EnlistmentFullInformation values are not used with ZwSetInformationEnlistment.

[in] EnlistmentInformation

A pointer to a caller-allocated buffer that contains caller-defined recovery information for the enlistment.

[in] EnlistmentInformationLength

The length, in bytes, of the buffer that the EnlistmentInformation parameter points to.

Return value

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

Return code Description
STATUS_OBJECT_TYPE_MISMATCH
The specified handle is not a handle to an enlistment object.
STATUS_INVALID_HANDLE
The object handle is invalid.
STATUS_INVALID_INFO_CLASS
The EnlistmentInformationClass parameter's value is invalid.
STATUS_INFO_LENGTH_MISMATCH
The EnlistmentInformationLength parameter's value is invalid.
STATUS_ACCESS_DENIED
The caller does not have appropriate access to the enlistment object.
 

The routine might return other NTSTATUS values.

Remarks

A resource manager can use the ZwSetInformationEnlistment routine to set recovery information for an enlistment. KTM writes the recovery information to the log stream, and the resource manager can call ZwQueryInformationEnlistment to read this information from the log stream at any time.

Each subsequent call to ZwSetInformationEnlistment deletes the recovery information that the previous call specified before it stores the new recovery information.

For more information about how to use ZwSetInformationEnlistment, see Using Log Streams with KTM.

NtSetInformationEnlistment and ZwSetInformationEnlistment are two versions of the same Windows Native System Services routine.

For calls from kernel-mode drivers, the NtXxx and ZwXxx versions of a Windows Native System Services routine can behave differently in the way that they handle and interpret input parameters. For more information about the relationship between the NtXxx and ZwXxx versions of a routine, see Using Nt and Zw Versions of the Native System Services 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
DDI compliance rules HwStorPortProhibitedDDIs, PowerIrpDDis

See also

ENLISTMENT_INFORMATION_CLASS

Using Nt and Zw Versions of the Native System Services Routines

ZwCreateEnlistment

ZwOpenEnlistment

ZwQueryInformationEnlistment