// wdfpdo.h
VOID WdfPdoInitSetEventCallbacks(
[in] PWDFDEVICE_INIT DeviceInit,
[in] PWDF_PDO_EVENT_CALLBACKS DispatchTable
);
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF only]
The WdfPdoInitSetEventCallbacks method registers a bus driver's event callback functions.
DeviceInit
[in]A pointer to a WDFDEVICE_INIT structure.
DispatchTable
[in]A pointer to a caller-allocated WDF_PDO_EVENT_CALLBACKS structure.
The bus driver must allocate a WDF_PDO_EVENT_CALLBACKS structure and fill in the structure with pointers to the driver's event callback functions.
The driver must call WdfPdoInitSetEventCallbacks before calling WdfDeviceCreate. For more information about calling WdfPdoInitSetEventCallbacks and WdfDeviceCreate, see Creating Device Objects in a Bus Driver.
The following code example initializes a WDF_PDO_EVENT_CALLBACKS structure and then calls WdfPdoInitSetEventCallbacks.
PWDFDEVICE_INIT pDeviceInit = NULL;
WDF_PDO_EVENT_CALLBACKS pdoCallbacks;
pDeviceInit = WdfPdoInitAllocate(Device);
WDF_PDO_EVENT_CALLBACKS_INIT(&pdoCallbacks);
pdoCallbacks.EvtDeviceResourceRequirementsQuery = Bus_Pdo_EvtDeviceResourceRequirementsQuery;
WdfPdoInitSetEventCallbacks(
pDeviceInit,
&pdoCallbacks
);