[wdmaudiodev] Re: Getting hardware ID from endpoint-ID

  • From: Matthew van Eerde <Matthew.van.Eerde@xxxxxxxxxxxxx>
  • To: Dadi <dadiku@xxxxxxxxx>, "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 4 Apr 2016 17:14:32 +0000

Reading directly from the registry is not a supported mechanism. The mechanism 
by which endpoint property stores are implemented is subject to change. Use the 
publically documented APIs like IMMDevice::OpenPropertyStore.

You can find the property keys for documented properties by looking in the 
SDK’s headers. None of those three properties are in the headers, so you should 
not use them – they are either internal Windows properties (which are subject 
to change) or properties defined by the audio driver vendor (which are also 
subject to change).

You can do the IMMDevice “connector dance” to go from an endpoint to its 
backing “adapter” device. The device instance ID is a property on the adapter 
device.

See 
https://blogs.msdn.microsoft.com/matthew_van_eerde/2008/06/13/sample-find-out-if-your-default-audio-playback-and-audio-capture-devices-are-on-the-same-hardware

From: Dadi<mailto:dadiku@xxxxxxxxx>
Sent: Wednesday, March 30, 2016 7:24 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Getting hardware ID from endpoint-ID

Hi,
I need to get the hardware-ID string based on a given audio endpoint-ID string 
or from an instance of IMMDevice. The best way is to use  
IMMDevice::OpenPropertyStore  to read the hardware-ID from some property.

Inspecting the registry (... \MMDevices\Audio\Render\<ep-guid>\Properties\) I 
found the following properties containing the information I need but I didn't 
find any header containing their PKEY_xxx definitions:

  {233164c8-1b2c-4c7d-bc68-b671687a2567},1
  {83da6326-97a6-4088-9453-a1923f573b29},3
  {b3f8fa53-0004-438e-9003-51a46e139bfc},2
Are these properties defined in some header?
If not defined, is it safe for me to define relevant PKEY and use it?
If I cannot use any of these properties, how do you recommend to read the 
hardware ID information of a given endpoint?
Thank you,
Dadi

Other related posts: