I need help programmatically changing the default sound playback device in windows 2000-XP, Vista is another issue to be addressed later. Please find the attached program containing the code I cannot get to work. This is a VS 2005 project. Look at the code behind the “Test Pref Device” button found on MainForm. I am trying to call the windows API waveoutMessage() with a DRVM_MAPPER_PREFERRED_SET message to change the default playback device to the computers sound card. My application makes use of a Bluetooth headset. When the headset connects Windows, it sets the default recording and playback devices to the headset. This is the intended behavior for the microphone, but the sound playback needs to continue to be routed through the PC speakers, thus the need to change it programmatically.