This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for

The Waveform Audio interface includes functionality to query and set the preferred audio device. Messages are sent using the waveInMessageand waveOutMessagefunctions.

The following table shows the messages that retrieve and set the audio device ids.

Message Description


This message is sent to the audio driver to configure the device ID of an audio device.


This message is sent to the audio driver to query the current device ID of an audio device.

When an audio device is added or removed from the system, or when the preferred audio device changes, RequestDeviceNotificationsis used to notify interested applications of the new device configuration. An application registers to be notified of changes by passing a GUID specifying which device class it is interested in and a message queue handle into which a message should be posted when a notification occurs.

Two GUIDs are defined for audio devices, one for wave output and one for wave input. The definitions are as follows:

Copy Code
// {25D535D0-5D7A-4a35-9741-ECD0B09FDB46}
0x25d535d0, 0x5d7a, 0x4a35, 0x97, 0x41, 0xec, 0xd0, 0xb0, 0x9f,
0xdb, 0x46);

// {4A7B3B17-0996-4a91-9C09-C28EB44295D7}
0x4a7b3b17, 0x996, 0x4a91, 0x9c, 0x9, 0xc2, 0x8e, 0xb4, 0x42, 0x95,

When an application receives a device change notification in its associated message queue, the notification will include a DEVDETAILstructure containing the GUID information.

See Also