// wdfdevice.h
VOID WdfDeviceInitSetDeviceType(
[in] PWDFDEVICE_INIT DeviceInit,
[in] DEVICE_TYPE DeviceType
);
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF only]
The WdfDeviceInitSetDeviceType method sets the device type for a specified device.
DeviceInit
[in]A pointer to a WDFDEVICE_INIT structure.
DeviceType
[in]A FILE_DEVICE_XXXX value that identifies the device type. For more information about FILE_DEVICE_XXXX values, see Specifying Device Types.
If a driver calls WdfDeviceInitSetDeviceType, it must do so before it calls WdfDeviceCreate.
For more information about calling WdfDeviceCreate, see Creating a Framework Device Object.
The device type that a driver specifies determines the default priority boost value that the framework uses when the driver completes an I/O request. For more information about priority boost values, see Specifying Priority Boosts When Completing I/O Requests.
If you are writing a UMDF driver, you must modify your driver's INF file or make registry changes to specify a device type. For more information about using the registry, see Setting Device Object Registry Properties During Installation.
The following code example indicates that a device is a serial device.
WdfDeviceInitSetDeviceType(
DeviceInit,
FILE_DEVICE_SERIAL_PORT
);