Redigera

Dela via


Creating a Framework Device Object

Every function driver, filter driver, and bus driver must create a framework device object for each instance of a supported device that is connected to the system.

Creating a framework device object involves three steps:

  1. Obtaining a pointer to a WDFDEVICE_INIT structure.

    This is an opaque, system-allocated structure, into which the driver stores information about a device.

  2. Initializing the WDFDEVICE_INIT structure.

    The driver calls a set of framework-supplied functions that add information to the structure.

  3. Calling WdfDeviceCreate.

    The driver passes the WDFDEVICE_INIT structure's pointer to the WdfDeviceCreate method. The method creates a framework device object and uses information in the WDFDEVICE_INIT structure to initialize the object.

For more information about creating framework device objects, see the following topics: