The following code illustrates how to determine the default connection for waveaudio.

   MCI_DEFAULT_CONNECTION_PARMS    defaultconnparms;

   defaultconnparms.ulConnectorType = MCI_WAVE_STREAM_CONNECTOR;
   defaultconnparms.pszDevice = MCI_DEVTYPE_WAVEFORM_AUDIO_NAME;

                     /* Determine the default connection for waveaudio */

   mciSendCommand ( 0,                   /* Ignore field               */
      MCI_DEFAULT_CONNECTION,            /* Default connection message */
      MCI_QUERY_CONNECTION | MCI_CONNECTOR_TYPE | MCI_WAIT,
                                         /* Flags for this message     */
      (PVOID) &defaultconnparms,         /* Data structure             */
      0 );                               /* No user parm               */

    /* Note: defaultconnparms.pszToDevice now contains the name of
       the device with default connection to the waveaudio (ampmixNN). */


[Back] [Next]