Partager via


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 vers un objet d’inscription 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 ENLISTMENT_INFORMATION_CLASS-typée 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 par l’appelant qui reçoit les informations que le paramètre EnlistmentInformationClass spécifie. 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, ce type de mémoire tampon doit correspondre au type défini par l’appelant utilisé lors de son appel ZwSetInformationEnlistment.

[in] EnlistmentInformationLength

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

[out, optional] ReturnLength

Pointeur vers une variable allouée par 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 de retour

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

Retourner le code 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 s’exécuter à IRQL = PASSIVE_LEVEL.

NtQueryInformationEnlistment et ZwQueryInformationEnlistment sont deux versions de la même routine Windows Native System Services.

Pour les appels à partir de pilotes en mode noyau, les versions NtXxx et ZwXxx d’une routine Windows Native System Services peuvent se comporter différemment de 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.

Exigences

Exigence Valeur
client minimum pris en charge Disponible dans Windows Vista et versions ultérieures du système d’exploitation.
plateforme cible Universel
d’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

à l’aide de versions Nt et Zw des routines natives des services système

ZwCreateEnlistment

ZwOpenEnlistment

ZwSetInformationEnlistment