Bewerken

Delen via


Accessing device interface properties

In Windows Vista and later versions of Windows, applications and installers can access device interface properties by calling the following functions.

Note

SetupApi is not supported on all editions of Windows. When possible, you should use lower layer APIs such as those available via CfgMgr32.dll. See Porting from SetupApi to CfgMgr32 for tips.

For information about how to access device interface properties on Windows Server 2003, Windows XP, and Windows 2000, see Accessing device interface properties.

Retrieving properties

Property APIs such as CM_Get_Device_Interface_Property or SetupDiGetDeviceInterfaceProperty can be used to retrieve a device interface property.

Setting properties

Property APIs such as CM_Set_Device_Interface_Property or SetupDiSetDeviceInterfaceProperty can be used to set a device interface property.

Getting a list of available properties

Property APIs such as CM_Get_Device_Interface_Property_Keys or SetupDiGetDeviceInterfacePropertyKeys can be used to retrieve an array of the property keys that identify the properties that are currently set for a device interface. This can be used to determine the full set of properties set on a device interface. However, use of these functions, especially to then subsequently retrieve the value of all properties that these functions indicate are set on the device interface, should be used sparingly since the retrieval of the list of all properties and their values can be an expensive operation.