0

I am trying to replicate the disable playback device behaviour from my c# solution. So far I have managed to set the DeviceState registry key of the device I want to disable but it does not route the output of the currently playing applications to another device like when I disable it through the GUI.

I read somewhere that the GUI throws a SendMessage after the registry changes. I tried to throw it from my application with no luck.

halfer
  • 19,824
  • 17
  • 99
  • 186
Ilias.P
  • 179
  • 7
  • The registry only plays the role as the persistent store for the setting, changing the registry entry certainly does not disable the device. Unless you reboot I guess. Tinkering with devices requires using the plug & play SetupAPI, C# isn't exactly the best tool for that job. Otherwise already covered in [this Q+A](http://stackoverflow.com/questions/1438371/win32-api-function-to-programmatically-enable-disable-device). – Hans Passant May 13 '16 at 10:51
  • Hi again.To be honest i played aroung with SetupAPI and managed to disable my preferred device, but in a different way, it disabled totally from the device management, while the sounds disable option disables it in a "virtual" way. Is there maybe an option on SetupApi to do that? – Ilias.P May 13 '16 at 12:01

0 Answers0