EVT_WDF_CHILD_LIST_CREATE_DEVICE fonction de rappel (wdfchildlist.h)

[S’applique à KMDF uniquement]

La fonction de rappel d’événementEvtChildListCreateDevice 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 que le pilote a spécifié quand il a appelé WdfChildListAddOrUpdateChildDescriptionAsPresent.

[in] IdentificationDescription

Pointeur vers une copie de la structure WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER que le pilote a spécifiée quand il a appelé WdfChildListAddOrUpdateChildDescriptionAsPresent.

[in] ChildInit

Pointeur vers une structure WDFDEVICE_INIT .

Valeur retournée

Si l’opération réussit, la fonction de rappel EvtChildListCreateDevice doit retourner STATUS_SUCCESS ou une autre valeur de status dont NT_SUCCESS(status) est égal à TRUE. Sinon, cette fonction doit retourner une valeur status pour laquelle NT_SUCCESS(status) est égal à FALSE.

Si l’opération a échoué, mais que vous pensez que votre pilote devrait réessayer ultérieurement, et si la fonction de rappel EvtChildListCreateDevice du pilote n’a pas appelé WdfDeviceCreate, le pilote peut retourner STATUS_RETRY. Par conséquent, l’infrastructure appelle à nouveau la fonction de rappel EvtChildListCreateDevice 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 une énumération dynamique, il peut inscrire une fonction de rappel EvtChildListCreateDevice en appelant WdfFdoInitSetDefaultChildListConfig ou WdfChildListCreate.

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

Avant d’appeler WdfDeviceCreate, le pilote doit appeler les 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 de 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.

Configuration requise

Condition requise Valeur
Plateforme cible Universal
Version KMDF minimale 1.0
En-tête wdfchildlist.h (inclure Wdf.h)
IRQL PASSIVE_LEVEL

Voir aussi

WDFDEVICE_INIT

WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER

WdfChildListAddOrUpdateChildDescriptionAsPresent

WdfChildListCreate

WdfChildListUpdateAllChildDescriptionsAsPresent

WdfDeviceCreate

WdfFdoInitSetDefaultChildListConfig