// wdffdo.h
VOID WdfFdoInitSetEventCallbacks(
[in] PWDFDEVICE_INIT DeviceInit,
[in] PWDF_FDO_EVENT_CALLBACKS FdoEventCallbacks
);
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF only]
The WdfFdoInitSetEventCallbacks method registers a framework-based function driver's event callback functions, for a specified device.
DeviceInit
[in]A pointer to a WDFDEVICE_INIT structure that the driver obtained from its EvtDriverDeviceAdd callback function.
FdoEventCallbacks
[in]A pointer to a driver-allocated WDF_FDO_EVENT_CALLBACKS structure.
Before calling WdfFdoInitSetEventCallbacks, the driver must allocate a WDF_FDO_EVENT_CALLBACKS structure and fill in the structure with pointers to the driver's event callback functions.
The driver must call WdfFdoInitSetEventCallbacks before calling WdfDeviceCreate. For more information about calling WdfDeviceCreate, see Creating a Framework Device Object.
For more information about the WdfFdoInitSetEventCallbacks method, see Creating Device Objects in a Function Driver.
The following code example initializes a WDF_FDO_EVENT_CALLBACKS structure and then calls WdfFdoInitSetEventCallbacks.
WDF_FDO_EVENT_CALLBACKS fdoCallbacks;
WDF_FDO_EVENT_CALLBACKS_INIT(&fdoCallbacks);
fdoCallbacks.EvtDeviceFilterAddResourceRequirements = MyEvtDeviceFilterAddResourceRequirements;
fdoCallbacks.EvtDeviceFilterRemoveResourceRequirements = MyEvtDeviceFilterRemoveResourceRequirements;
fdoCallbacks.EvtDeviceRemoveAddedResources = MyEvtDeviceRemoveAddedResources;
WdfFdoInitSetEventCallbacks(
DeviceInit,
&fdoCallbacks
);