Accessing device properties

You must not discover or change device properties by directly accessing registry keys. Registry keys do not contain required information to discover or change device properties. In addition, the location, format, and meaning of these keys might change between different versions of Windows.

The SetupAPI and configuration manager functions provide consistent behavior and enforce access permissions to protect device properties. To safely access device properties, follow these guidelines: