Bewerken

Delen via


WDFDEVICE_INIT structure

[Applies to KMDF and UMDF]

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

Syntax

struct WDFDEVICE_INIT {
  ;      // Reserved.
};

Members

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.

To find documentation for device initialization methods, see wdfdevice.h header.

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.

Requirements

Header

Wdftypes.h (include Wdftypes.h)