title: Get the full audio device name from Windows
body: <p>Is there a way to get the <strong>full</strong> audio device name in Windows XP and later?</p>
  
  <p>I can use MIXERCAPS but the szPname member will limit to 32 characters (including NULL). For an audio device name of "Microphone (High Definition Audio Device)", I only get back "Microphone (High Definition Aud". This is due to MAXPNAMELEN being defined to 32. I have tried redefining it to a larger number to no effect.</p>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>MIXERCAPS mc;
  ZeroMemory( &amp;mc, sizeof(MIXERCAPS) );
  mm = mixerGetDevCaps( reinterpret_cast&lt;UINT_PTR&gt;(m_hMixer), &amp;mc, sizeof(MIXERCAPS) );
  </code></pre>
  
  <p>I saw <a href="https://stackoverflow.com/questions/1075484/vista-win7-delphi-audio-device-information">this question</a>, but it references Vista and later.</p>