Fonction NtQueryInformationEnlistment (wdm.h)

La routine ZwQueryInformationEnlistment récupère des informations sur un objet d’inscription spécifié.

Syntaxe

__kernel_entry NTSYSCALLAPI NTSTATUS NtQueryInformationEnlistment(
  [in]            HANDLE                       EnlistmentHandle,
  [in]            ENLISTMENT_INFORMATION_CLASS EnlistmentInformationClass,
  [out]           PVOID                        EnlistmentInformation,
  [in]            ULONG                        EnlistmentInformationLength,
  [out, optional] PULONG                       ReturnLength
);

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_QUERY_INFORMATION accès à l’objet .

[in] EnlistmentInformationClass

Valeur d’énumération de type ENLISTMENT_INFORMATION_CLASS qui spécifie les informations à obtenir. Cette valeur doit être l’une des valeurs suivantes :

  • EnlistmentBasicInformation
  • EnlistmentRecoveryInformation
La valeur EnlistmentFullInformation de l’énumération n’est pas utilisée avec ZwQueryInformationEnlistment.

[out] EnlistmentInformation

Pointeur vers une mémoire tampon allouée à l’appelant qui reçoit les informations spécifiées par le paramètre EnlistmentInformationClass . Si la valeur du paramètre EnlistmentInformationClass est EnlistmentBasicInformation, le type de structure de cette mémoire tampon doit être ENLISTMENT_BASIC_INFORMATION. Si la valeur du paramètre EnlistmentInformationClass est EnlistmentRecoveryInformation, le type de cette mémoire tampon doit correspondre au type défini par l’appelant utilisé par l’appelant lorsqu’il a appelé ZwSetInformationEnlistment.

[in] EnlistmentInformationLength

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

[out, optional] ReturnLength

Pointeur vers une variable allouée à l’appelant qui reçoit la longueur, en octets, des informations que KTM écrit dans la mémoire tampon EnlistmentInformation . Ce paramètre est facultatif et peut être NULL.

Valeur retournée

ZwQueryInformationEnlistment 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 appeler ZwSetInformationEnlistment pour définir des informations de récupération spécifiques à l’inscription pour un objet d’inscription, puis appeler ZwQueryInformationEnlistment pour récupérer les informations de récupération.

Pour plus d’informations sur ZwQueryInformationEnlistment, consultez Gestion des opérations de récupération.

Les appelants de ZwQueryInformationEnlistment doivent être en cours d’exécution sur IRQL = PASSIVE_LEVEL.

NtQueryInformationEnlistment et ZwQueryInformationEnlistment 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, PowerIrpDDis

Voir aussi

ENLISTMENT_BASIC_INFORMATION

ENLISTMENT_INFORMATION_CLASS

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

ZwCreateEnlistment

ZwOpenEnlistment

ZwSetInformationEnlistment