EVT_WDF_DEVICE_REMOVE_ADDED_RESOURCES callback function (wdffdo.h)

[Applies to KMDF only]

A driver's EvtDeviceRemoveAddedResources event callback function removes hardware resources that the driver's EvtDeviceFilterAddResourceRequirements callback function added.

Syntax

EVT_WDF_DEVICE_REMOVE_ADDED_RESOURCES EvtWdfDeviceRemoveAddedResources;

NTSTATUS EvtWdfDeviceRemoveAddedResources(
  [in] WDFDEVICE Device,
  [in] WDFCMRESLIST ResourcesRaw,
  [in] WDFCMRESLIST ResourcesTranslated
)
{...}

Parameters

[in] Device

A handle to the framework device object to which resources will be assigned.

[in] ResourcesRaw

A handle to a resource list object that identifies the raw hardware resources that the PnP manager has assigned to the device.

[in] ResourcesTranslated

A handle to a resource list object that identifies the translated hardware resources that the PnP manager has assigned to the device.

Return value

If the driver encountered no errors it must return STATUS_SUCCESS. Otherwise it must return an NTSTATUS value that NT_SUCCESS evaluates as FALSE.

For more information about return values, see Reporting Device Failures.

Remarks

Framework-based function drivers can provide an EvtDeviceRemoveAddedResources callback function. To register this callback function, drivers call WdfFdoInitSetEventCallbacks.

If a driver provides an EvtDeviceFilterAddResourceRequirements callback function that adds resources to a device's hardware requirements list, the driver must also provide an EvtDeviceRemoveAddedResources callback function. The EvtDeviceRemoveAddedResources callback function examines the resource list that the PnP manager has assigned to the device, and removes the resources from the list that the EvtDeviceFilterAddResourceRequirements callback function added. If the driver removes a resource, it must remove it from both the raw and translated resource lists.

For more information about resource lists and the order in which the resources appear, see raw and translated hardware resources.

The framework calls the driver's EvtDeviceRemoveAddedResources callback function immediately before it passes the device's resource list to the bus driver. This callback function removes added resources so that the bus driver will not attempt to use them.

For more information about the EvtDeviceRemoveAddedResources callback function, see Modifying a Resource List.

For more information about hardware resources, see Hardware Resources for Framework-Based Drivers.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Header wdffdo.h (include Wdf.h)
IRQL PASSIVE_LEVEL

See also

EvtDeviceFilterAddResourceRequirements

EvtDeviceFilterRemoveResourceRequirements