On Mon Jun 16 11:45:58 2025 +0000, Nikolay Sivov wrote:
Which API from propsys are you planning to use from Windows.Devices.Enumeration ?
From my current understanding of `Windows.Devices.Enumeration`, I plan to use it in two ways:
* The `DeviceInformation` interface allows accessing a device node's properties with `get_Properties`, which returns an `IMap<HSTRING, IInspectable *>` object. The string keys are the property IDs, as opposed to `DEVPROPKEY` types that you'd see in Win32 device enumeration. Once we have a list of device properties (either from `SetupDiGetDevicePropertyKeys` or `DevGetObjectProperties`), the idea is to use `IPropertySystem::GetPropertyDescription` or `PSGetNameFromPropertyKey` to get the canonical name associated with the PROPKEY value. * While parsing AQS filter strings, we need a way to do the reverse, i.e, go from canonical names to a `DEVPROPKEY` value. For that, `PSGetPropertyKeyFromName` exists.
The WinRT docs for `Windows.Devices.Enumeration` also does suggest that these names are from `propsys` [here](https://learn.microsoft.com/en-us/uwp/api/windows.devices.enumeration.device...):
System.Devices.Aep.ProtocolId is the protocol's name in propsys; and DEVPKEY_Aep_ProtocolId is the Win32 DEVPKEY.