EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_CLEANUP callback function (wdfchildlist.h)

[Applies to KMDF only]

A driver's EvtChildListAddressDescriptionCleanup event callback function frees any memory allocations for an address description that the driver's EvtChildListAddressDescriptionDuplicate callback function allocated.

Syntax

EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_CLEANUP EvtWdfChildListAddressDescriptionCleanup;

void EvtWdfChildListAddressDescriptionCleanup(
  [in]      WDFCHILDLIST ChildList,
  [in, out] PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
)
{...}

Parameters

[in] ChildList

A handle to a framework child-list object.

[in, out] AddressDescription

A pointer to a WDF_CHILD_ADDRESS_DESCRIPTION_HEADER structure that identifies an address description.

Return value

None

Remarks

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

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

Typically, the EvtChildListAddressDescriptionDuplicate callback function allocates memory by calling ExAllocatePool. The EvtChildListAddressDescriptionCleanup callback function must deallocate that memory by calling ExFreePool. This callback function must not attempt to deallocate the rest of the address description. In other words, the callback function must not deallocate the address description structure that the AddressDescription 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.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Header wdfchildlist.h (include Wdf.h)
IRQL <= DISPATCH_LEVEL

See also

EvtChildListAddressDescriptionDuplicate

ExAllocatePool

ExFreePool

WDF_CHILD_ADDRESS_DESCRIPTION_HEADER

WdfChildListCreate

WdfFdoInitSetDefaultChildListConfig