// wdfdevice.h
VOID WdfDeviceSetCharacteristics(
[in] WDFDEVICE Device,
[in] ULONG DeviceCharacteristics
);
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF only]
The WdfDeviceSetCharacteristics method sets device characteristics for a specified device.
Device
[in]A handle to a framework device object.
DeviceCharacteristics
[in]A value that consists of ORed system-defined constants that represent device characteristics. For more information, see the Characteristics member of the DEVICE_OBJECT structure.
A bug check occurs if the driver supplies an invalid object handle.
You should set device characteristics by calling the WdfDeviceInitSetCharacteristics method in your EvtDriverDeviceAdd callback function before calling WdfDeviceCreate. If your driver cannot determine a device's characteristics until after the EvtDriverDeviceAdd callback function returns, the driver typically should call WdfDeviceSetCharacteristics in its EvtDevicePrepareHardware callback function.
Each call to WdfDeviceSetCharacteristics overwrites the settings of any previous call.
The following code example sets the FILE_REMOVABLE_MEDIA characteristic for a specified device.
WdfDeviceSetCharacteristics(
Device,
FILE_REMOVABLE_MEDIA
);
WdfDeviceInitSetCharacteristics