EvtDeviceFilterRemoveResourceRequirements
A driver's EvtDeviceFilterRemoveResourceRequirements event callback function can remove resources from a set of hardware resource requirements before the system assigns resources to a device.
構文
EVT_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS EvtDeviceFilterRemoveResourceRequirements;
NTSTATUS EvtDeviceFilterRemoveResourceRequirements(
__in WDFDEVICE Device,
__in WDFIORESREQLIST IoResourceRequirementsList
)
{ ... }
パラメーター
Device [in]
A handle to the framework device object to which resources will be assigned.IoResourceRequirementsList [in]
A handle to a resource-requirements-list object, which represents the device's resource requirements list.
戻り値
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.
解説
Framework-based function drivers can provide an EvtDeviceFilterRemoveResourceRequirements callback function. To register this callback function, drivers call WdfFdoInitSetEventCallbacks.
To remove items from a resource requirements list, the driver calls framework resource-requirements-list object methods and framework resource-range-list object methods, which remove resources from the resource-requirements-list object that is represented by the IoResourceRequirementsList parameter.
For more information about the EvtDeviceFilterRemoveResourceRequirements callback function, see Modifying a Resource Requirements List.
For more information about hardware resources and resource requirements lists, see Hardware Resources for Framework-Based Drivers.
例
The function type is declared in Wdffdo.h, as follows.
typedef NTSTATUS
(EVT_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS)(
IN WDFDEVICE Device,
IN WDFIORESREQLIST IoResourceRequirementsList
);
To define an EvtDeviceFilterRemoveResourceRequirements callback function that is named MyDeviceFilterRemoveResourceRequirements, you must first provide a function declaration that SDV and other verification tools require, as follows:
EVT_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS MyDeviceFilterRemoveResourceRequirements;
Then, implement your callback function as follows:
NTSTATUS
MyDeviceFilterRemoveResourceRequirements (
IN WDFDEVICE Device,
IN WDFIORESREQLIST IoResourceRequirementsList
)
{...}
要件
バージョン |
Supported by version 1.0 and later versions of KMDF. |
ヘッダー |
Wdffdo.h (includeWdf.h) |
IRQL |
PASSIVE_LEVEL |