WDFDEVICE_INIT

[Applies to KMDF and UMDF]

The WDFDEVICE_INIT structure is an opaque structure that is defined and allocated by the framework.

Function and filter drivers receive a pointer to this structure as input to a EvtDriverDeviceAdd callback function or as a return value from WdfControlDeviceInitAllocate.

Bus drivers receive a structure pointer as input to a EvtChildListCreateDevice callback function or as the return value from WdfPdoInitAllocate.

After a driver receives a WDFDEVICE_INIT structure, it passes the structure pointer to initialization functions. These functions use the WDFDEVICE_INIT structure to store information that the framework uses to create a framework device object. There are three sets of initialization methods:

Framework device object initialization methods

Framework FDO initialization methods

Framework PDO initialization methods

After calling initialization functions, the driver must call WdfDeviceCreate to create the framework device object.

If your driver received the WDFDEVICE_INIT structure from a call to WdfPdoInitAllocate or WdfControlDeviceInitAllocate, and if the driver receives an error from calling an initialization function, the driver must call WdfDeviceInitFree instead of WdfDeviceCreate.

Your driver must not call WdfDeviceInitFree after a successful call to WdfDeviceCreate.

The WDFDEVICE_INIT structure is available in version 1.0 and later versions of KMDF.

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft