Vista Audio Control Functions

Set default sound device has the following problems: Some applications don't respect the change while running (mainly games), so you have to restart them. A better solution is to deactivate all sound devices you don't want, this is always respected. I have written a script for this:

The problem is, that a have to go to Desktop with Alt+Tab to work (could be integrated) but not all games accept Alt+Tab. So I am looking for a way to deactivate a sound device with a command. devcon doesn't work, it needs a reboot. The API you have discovered looks promising, but I have no clue about it. Especially http://msdn.microsof...9(v=vs.85).aspx