Device information properties

Each device has associated DeviceInformation properties that you can use when you need specific information or when you are building a device selector. An Advanced Query Syntax (AQS) filter can be used to specify these properties and limit the enumerated devices with the specified traits. You can also use these properties to indicate what information you want returned for each device. That enables you to specify the device information that is returned to your application.

Important APIs

For more information about using DeviceInformation properties in your device selector, see Build a device selector. This topic shows how to request information properties and describes some common properties.

A DeviceInformation object is composed of an identity (DeviceInformation.Id), a kind (DeviceInformation.Kind), and a property bag (DeviceInformation.Properties). All of the other properties of a DeviceInformation object are derived from the Properties property bag. For example, Name is derived from System.ItemNameDisplay. This means that the property bag always contains the information necessary to determine the other properties.

Requesting properties

A DeviceInformation object has some basic properties, such as Id and Kind, but most of the properties are stored in a property bag under Properties. Because of this, the property bag contains the properties used to source the properties out of the property bag. For example, use System.ItemNameDisplay to source the Name property. This is a case of a common and well-known property that has a user-friendly name. Windows provides several of these user-friendly names to make querying for properties easier.

When you are requesting properties, you are not limited to the common properties with user-friendly names. You can specify the underlying GUID and property ID (PID) to request any property that is available, even custom properties that are supplied by an individual device or driver. The format for specifying a custom property is "{GUID} PID". For example: "{744e3bed-3684-4e16-9f8a-07953a8bf2ab} 7".

Note

You can find the list of property GUIDs in the device property key header file of the device driver.

Some properties are common across all DeviceInformationKind objects, but most are unique to a specific kind. The following sections list some common properties sorted by the individual DeviceInformationKind. For more information about how the different kinds relate to one another, see DeviceInformationKind.

DeviceInterface properties

DeviceInterface is the default and most common DeviceInformationKind object used in app scenarios. This is the kind of object that you should use unless the device API indicates a different specific DeviceInformationKind.

Name Type Description
System.Devices.ContainerId GUID Identity of the DeviceInformationKind.DeviceContainer that contains the Device containing this DeviceInterface. You can pass this value to CreateFromIdAsync along with DeviceInformationKind.DeviceContainer to find the appropriate container.
System.Devices.InterfaceClassGuid GUID The interface class GUID this interface represents.
System.Devices.DeviceInstanceId String Identity of the parent DeviceInformationKind.Device. You can pass this value to CreateFromIdAsync along with DeviceInformationKind.Device to find the appropriate device.
System.Devices.InterfaceEnabled Boolean Indicates if the interface is enabled. DeviceInformation.IsEnabled is derived from this property.
System.Devices.GlyphIcon String Icon path for the glyph.
System.Devices.IsDefault Boolean Indicates whether this is the default device for the System.Devices.InterfaceClassGuid. This is mainly used for printers. This does not work for audio since there are multiple audio defaults. Use GetDefaultAudioRenderId or GetDefaultAudioCaptureId to get audio defaults.
System.Devices.Icon String Icon path.
System.ItemNameDisplay String The best display name for the device object.

 

Device properties

Name Type Description
System.Devices.ClassGuid GUID Device class used during device installation. For more information, see Device Setup Classes.
System.Devices.CompatibleIds String[] The compatible ids of the device. These are used when Windows is determining the best driver to install on the device. For more information, see Compatible ID.
System.Devices.ContainerId GUID Identity of the DeviceInformationKind.DeviceContainer that includes this device. You can pass this value to CreateFromIdAsync along with DeviceInformationKind.DeviceContainer to find the appropriate container.
System.Devices.DeviceCapabilities UInt32 A bitwise-OR of the CM_DEVCAP_X capabilities flags that are defined in CfgMgr32.h. For more information, see DEVPKEY_Device_Capabilities.
System.Devices.DeviceHasProblem Boolean The device currently has a problem and is likely not functioning correctly. This could be due to an outdated, missing, or invalid driver.
System.Devices.DeviceInstanceId String The identity of the device. This is also the value of DeviceInformation.Id.
System.Devices.DeviceManufacturer String The manufacturer of the device.
System.Devices.HardwareIds String[] The hardware ids of the device. Windows uses these ids when determining the best driver to install. Device vendors can use this property to identify their device from their app. For more information, see Hardware ID.
System.Devices.Parent String The DeviceInformation.Id of the parent device. This is the connection parent, not the DeviceContainer parent.
System.Devices.Present Boolean Indicates whether the device is currently present and available.
System.ItemNameDisplay String The best display name for this device object. In this case, this is not necessarily the best name for users. A more likely candidate for a user-friendly name could be found by referencing the System.ItemNameDisplay of the associated DeviceContainer or DeviceInterface.

 

DeviceContainer properties

Name Type Description
System.Devices.Category String[] A list of descriptions of the categories the device belongs to. This list is provided as singular categories. For example, "Display", "Phone", or "Audio device".
System.Devices.CategoryIds String[] Contains a list of categories this device belongs to. For example, Audio.Headphone, Display.Monitor, or Input.Gaming.
System.Devices.CategoryPlural String[] A list of descriptions of the categories the device belongs to. This list is provided as plural categories. For example, "Displays", "Phones", or "Audio devices".
System.Devices.CompatibleIds String[] The collection of compatible ids for all the child DeviceInformationKind.Device objects.
System.Devices.Connected Boolean Indicates whether the device is currently connected to the system or not.
System.Devices.GlyphIcon String Icon path for the glyph.
System.Devices.HardwareIds String[] The collection of hardware ids for all the child DeviceInformationKind.Device objects.
System.Devices.Icon String Icon path.
System.Devices.LocalMachine Boolean True if this DeviceContainer represents the system itself, false if the device is external to the system.
System.Devices.Manufacturer String The manufacturer of the device.
System.Devices.ModelName String Model name of the device container.
System.Devices.Paired Boolean Indicates whether any of the child DeviceInformationKind.Device objects are wireless or network devices that are currently paired with the system.
System.ItemNameDisplay String The best display name for this device.

 

DeviceInterfaceClass properties

Name Type Description
System.ItemNameDisplay String The best display name for this device.

 

DevicePanel properties

Name Type Description
System.Devices.Panel.PanelId String The identifier of the DevicePanel object.
System.Devices.Panel.PanelGroup String The identifier of the parent PanelGroup.

AssociationEndpoint properties

Name Type Description
System.Devices.Aep.AepId String Identity of this device. This is also the value of DeviceInformation.Id.
System.Devices.Aep.CanPair Boolean Indicates if the device can be paired with the system or not. DeviceInformationPairing.CanPair is derived from this property.
System.Devices.Aep.Category String[] The categories that the device is part of. For example, printer or camera.
System.Devices.Aep.ContainerId GUID The id of the parent AssociationEndpointContainer object.
System.Devices.Aep.DeviceAddress String The address of the device. If the device is a network device, this is the IP address.
System.Devices.Aep.IsConnected Boolean Indicates if the device is currently connected to the system.
System.Devices.Aep.IsPaired Boolean Indicates if the device is currently paired. DeviceInformationPairing.IsPaired is derived from this property.
System.Devices.Aep.IsPresent Boolean Indicates if the device is currently present, meaning the device is live and discovered over the network or wireless protocol. Once a device has been paired with the system, the device is cached. After this, the device will be automatically discovered when querying for AssociationEndpoint objects. Because of this, you cannot rely on just discovering the device with a query to indicate whether or not it is currently usable. That is why this property is important.
System.Devices.Aep.Manufacturer String The manufacturer of the device.
System.Devices.Aep.ModelId GUID The model id of the device.
System.Devices.Aep.ModelName String The model name of the device.
System.Devices.Aep.ProtocolId GUID Indicates the protocol used to discover this AssocationEndpoint device.
System.Devices.Aep.SignalStrength Int32 The signal strength of the device. This property is only applicable for some protocols.
System.ItemNameDisplay String The best display name for the device.

 

AssociationEndpointContainer properties

Name Type Description
System.Devices.AepContainer.Categories String[] The categories that the device is part of. For example, printer or camera.
System.Devices.AepContainer.Children String[] The collection of ids for the AssocationEndpoint objects that are part of this container.
System.Devices.AepContainer.CanPair Boolean Indicates if one of the child AssociationEndpoint devices can be paired with the system or not. DeviceInformationPairing.CanPair is derived from this property.
System.Devices.AepContainer.ContainerId GUID Identity of this device. This is also the value of DeviceInformation.Id, but in GUID form.
System.Devices.AepContainer.IsPaired Boolean Indicates if one of the child AssociationEndpoint devices is currently paired. DeviceInformationPairing.IsPaired is derived from this property.
System.Devices.AepContainer.IsPresent Boolean Indicates if one of the child AssociationEndpoint devices is currently present, meaning the device is live and discovered over the network or wireless protocol. Once a device has been paired with the system, the device is cached. After this, the device will be automatically discovered when querying for AssociationEndpoint objects. Because of this, you cannot rely on just discovering the device with a query to indicate whether or not it is currently usable. That is why this property is important.
System.Devices.AepContainer.Manufacturer String The manufacturer of the device.
System.Devices.AepContainer.ModelIds String[] A list of model ids for the device. Each model is a GUID in string form.
System.Devices.AepContainer.ModelName String The model name of the device.
System.Devices.AepContainer.ProtocolIds GUID[] A list of protocol ids that have contributed to building this AssociationEndpointContainer object. Keep in mind that an AssociationEndpointContainer device is created by collecting all AssociationEndpoint devices discovered over different protocols for the same physical device.
System.Devices.AepContainer.SupportedUriSchemes String[] List of casting URI schemes supported by this device.
System.Devices.AepContainer.SupportsAudio Boolean Indicates if this device supports audio casting.
System.Devices.AepContainer.SupportsImages Boolean Indicates if this device supports image casting.
System.Devices.AepContainer.SupportsVideo Boolean Indicates if this device supports video casting.
System.ItemNameDisplay String The best display name for the device.

 

AssociationEndpointService properties

Name Type Description
System.Devices.AepService.AepId String The identifier of the parent AssociationEndpoint object.
System.Devices.AepService.ContainerId GUID The identifier of the parent AssociationEndpointContainer object.
System.Devices.AepService.ParentAepIsPaired Boolean Indicates whether the parent AssociationEndpoint object is paired with the system.
System.Devices.AepService.ProtocolId GUID Identity of the protocol used to discover this device.
System.Devices.AepService.ServiceClassId GUID Identity of the service represented by this device.
System.Devices.AepService.ServiceId String Identity of this service. This is also the value of DeviceInformation.Id.
System.ItemNameDisplay String The best display name for the service.