ZwSetInformationEnlistment, fonction (wdm.h)

La routine ZwSetInformationEnlistment définit des informations pour un objet d’inscription spécifié.

Syntaxe

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

Paramètres

[in] EnlistmentHandle

Handle d’un objet d’enrôlement obtenu par un appel précédent à ZwCreateEnlistment ou ZwOpenEnlistment. Le handle doit avoir ENLISTMENT_SET_INFORMATION accès à l’objet .

[in] EnlistmentInformationClass

Valeur d’énumération de type ENLISTMENT_INFORMATION_CLASS qui spécifie le type d’informations à définir. Cette valeur doit être EnlistmentRecoveryInformation.

Les valeurs EnlistmentBasicInformation et EnlistmentFullInformation de l’énumération ne sont pas utilisées avec ZwSetInformationEnlistment.

[in] EnlistmentInformation

Pointeur vers une mémoire tampon allouée à l’appelant qui contient des informations de récupération définies par l’appelant pour l’inscription.

[in] EnlistmentInformationLength

Longueur, en octets, de la mémoire tampon vers laquelle pointe le paramètre EnlistmentInformation .

Valeur retournée

ZwSetInformationEnlistment retourne STATUS_SUCCESS si l’opération réussit. Sinon, cette routine peut retourner l’une des valeurs suivantes :

Code de retour Description
STATUS_OBJECT_TYPE_MISMATCH
Le handle spécifié n’est pas un handle pour un objet d’inscription.
STATUS_INVALID_HANDLE
Le handle d’objet n’est pas valide.
STATUS_INVALID_INFO_CLASS
La valeur du paramètre EnlistmentInformationClass n’est pas valide.
STATUS_INFO_LENGTH_MISMATCH
La valeur du paramètre EnlistmentInformationLength n’est pas valide.
STATUS_ACCESS_DENIED
L’appelant n’a pas l’accès approprié à l’objet d’inscription.
 

La routine peut retourner d’autres valeurs NTSTATUS.

Remarques

Un gestionnaire de ressources peut utiliser la routine ZwSetInformationEnlistment pour définir les informations de récupération d’un enrôlement. KTM écrit les informations de récupération dans le flux de journal, et le gestionnaire de ressources peut appeler ZwQueryInformationEnlistment pour lire ces informations à partir du flux de journal à tout moment.

Chaque appel suivant à ZwSetInformationEnlistment supprime les informations de récupération spécifiées par l’appel précédent avant de stocker les nouvelles informations de récupération.

Pour plus d’informations sur l’utilisation de ZwSetInformationEnlistment, consultez Utilisation de flux de journaux avec KTM.

NtSetInformationEnlistment et ZwSetInformationEnlistment sont deux versions de la même routine Windows Native System Services.

Pour les appels provenant de pilotes en mode noyau, les versions NtXxx et ZwXxx d’une routine Windows Native System Services peuvent se comporter différemment dans la façon dont elles gèrent et interprètent les paramètres d’entrée. Pour plus d’informations sur la relation entre les versions NtXxx et ZwXxx d’une routine, consultez Using Nt and Zw Versions of the Native System Services Routines.

Configuration requise

Condition requise Valeur
Client minimal pris en charge Disponible dans Windows Vista et versions ultérieures du système d’exploitation.
Plateforme cible Universal
En-tête wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Bibliothèque NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
Règles de conformité DDI HwStorPortProhibitedDDIs(storport), PowerIrpDDis(wdm)

Voir aussi

ENLISTMENT_INFORMATION_CLASS

Utilisation des versions Nt et Zw des routines des services système natifs

ZwCreateEnlistment

ZwOpenEnlistment

ZwQueryInformationEnlistment