Expand Minimize

WdfFdoInitSetEventCallbacks method

[Applies to KMDF only]

The WdfFdoInitSetEventCallbacks method registers a framework-based function driver's event callback functions, for a specified device.

Syntax


VOID WdfFdoInitSetEventCallbacks(
  [in]  PWDFDEVICE_INIT DeviceInit,
  [in]  PWDF_FDO_EVENT_CALLBACKS FdoEventCallbacks
);

Parameters

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.

Return value

None

Remarks

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.

Examples

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
                            );

Requirements

Minimum KMDF version

1.0

Header

Wdffdo.h (include Wdf.h)

Library

Wdf01000.sys (see Framework Library Versioning.)

IRQL

PASSIVE_LEVEL

DDI compliance rules

DeviceInitAPI, DriverCreate, KmdfIrql, KmdfIrql2

See also

WDF_FDO_EVENT_CALLBACKS_INIT

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft