EvtChildListIdentificationDescriptionCleanup

A driver's EvtChildListIdentificationDescriptionCleanup event callback function frees any memory allocations for an identification description that the driver's EvtChildListIdentificationDescriptionDuplicate callback function allocated.

構文

EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP EvtChildListIdentificationDescriptionCleanup;

VOID EvtChildListIdentificationDescriptionCleanup(
  __in   WDFCHILDLIST ChildList,
  __out  PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
)
{ ... }

パラメーター

ChildList [in]

A handle to a framework child-list object.

IdentificationDescription [out]

A pointer to a WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER structure that identifies an identification description.

戻り値

None

解説

If a bus driver is using dynamic enumeration, it can register an EvtChildListIdentificationDescriptionCleanup callback function by calling WdfFdoInitSetDefaultChildListConfig or WdfChildListCreate.

If an identification description points to additional information that is stored in dynamically allocated memory, and if that memory is allocated by an EvtChildListIdentificationDescriptionDuplicate callback function, the driver must provide an EvtChildListIdentificationDescriptionCleanup callback function.

Typically, the EvtChildListIdentificationDescriptionDuplicate callback function allocates memory by calling ExAllocatePool. The EvtChildListIdentificationDescriptionCleanup callback function must deallocate that memory by calling ExFreePool. This callback function must not attempt to deallocate the rest of the identification description. In other words, the callback function must not deallocate the address description structure that the IdentificationDescription parameter points to; it must deallocate only additional memory allocations that the description structure points to.

For more information about dynamic enumeration, see Enumerating the Devices on a Bus.

The function type is declared in WdfChildlist.h, as follows.

typedef VOID
  (EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP)(
 WDFCHILDLIST  ChildList,
    PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER  IdentificationDescription
    );

To define an EvtChildListIdentificationDescriptionCleanup callback function that is named MyChildListIdentificationDescriptionCleanup, you must first provide a function declaration that SDV and other verification tools require, as follows:

EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP  MyChildListIdentificationDescriptionCleanup;

Then, implement your callback function as follows:

VOID
 MyChildListIdentificationDescriptionCleanup (
 WDFCHILDLIST  ChildList,
    PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER  IdentificationDescription
    )
  {...}

要件

バージョン

Supported by version 1.0 and later versions of KMDF.

ヘッダー

WdfChildlist.h (includeWdf.h)

IRQL

<= DISPATCH_LEVEL

参照

ExAllocatePool
ExFreePool
EvtChildListIdentificationDescriptionDuplicate
WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER
WdfChildListCreate
WdfFdoInitSetDefaultChildListConfig

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft