Partager via


EVT_WDF_CHILD_LIST_CREATE_DEVICE fonction de rappel (wdfchildlist.h)

[S’applique uniquement à KMDF]

La fonction de rappel d’événement evtChildListCreateDevice d’un pilote de bus crée un objet d’appareil framework pour un nouvel appareil qui a été énuméré dynamiquement.

Syntaxe

EVT_WDF_CHILD_LIST_CREATE_DEVICE EvtWdfChildListCreateDevice;

NTSTATUS EvtWdfChildListCreateDevice(
  [in] WDFCHILDLIST ChildList,
  [in] PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
  [in] PWDFDEVICE_INIT ChildInit
)
{...}

Paramètres

[in] ChildList

Handle de l’objet de liste enfant du framework spécifié par le pilote lorsqu’il a appelé WdfChildListAddOrUpdateChildDescriptionAsPresent.

[in] IdentificationDescription

Pointeur vers une copie de la structure WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER spécifiée par le pilote lorsqu’il a appelé WdfChildListAddOrUpdateChildDescriptionAsPresent.

[in] ChildInit

Pointeur vers une structure WDFDEVICE_INIT.

Valeur de retour

La fonction de rappel EvtChildListCreateDevice doit retourner STATUS_SUCCESS, ou une autre valeur d’état pour laquelle NT_SUCCESS(status) est égal à TRUE, si l’opération réussit. Dans le cas contraire, cette fonction doit retourner une valeur d’état pour laquelle NT_SUCCESS(status) est égal à FALSE.

Si l’opération a échoué, mais que vous pensez que votre pilote doit réessayer ultérieurement, et si la fonction de rappel EvtChildListCreateDevice n’a pas appelé WdfDeviceCreate, le pilote peut retourner STATUS_RETRY. Par conséquent, l’infrastructure appelle la EvtChildListCreateDevice fonction de rappel ultérieurement. Si votre pilote retourne STATUS_RETRY plusieurs fois, l’infrastructure cesse d’appeler la fonction de rappel pour l’appareil défaillant.

Remarques

Si un pilote de bus utilise énumération dynamique, il peut inscrire une fonction de rappel EvtChildListCreateDevice en appelant WdfFdoInitSetDefaultChildListConfig ou WdfChildListCreate.

Après qu’un pilote appelle WdfChildListAddOrUpdateChildDescriptionAsPresent ou WdfChildListUpdateAllChildDescriptionsAsPresent, le framework appelle la fonction de rappel EvtChildListCreateDevice. La fonction de rappel doit appeler WdfDeviceCreate pour créer un objet d’appareil framework (PDO).

Avant d’appeler WdfDeviceCreate, le pilote doit appeler des fonctions fournies par l’infrastructure qui initialisent la structure WDFDEVICE_INIT. Pour plus d’informations sur ces fonctions, consultez WDFDEVICE_INIT.

Pour plus d’informations sur l’appel WdfDeviceCreate, consultez Création d’un objet d’appareil Framework.

Pour plus d’informations sur l’énumération dynamique, consultez énumération des appareils sur un bus.

Exigences

Exigence Valeur
plateforme cible Universel
version minimale de KMDF 1.0
d’en-tête wdfchildlist.h (include Wdf.h)
IRQL PASSIVE_LEVEL

Voir aussi

WDFDEVICE_INIT

WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER

WdfChildListAddOrUpdateChildDescriptionAsPresent

WdfChildListCreate

WdfChildListUpdateAllChildDescriptionsAsPresent

WdfDeviceCreate

WdfFdoInitSetDefaultChildListConfig