How to programmatically disable a playback in the sound control panel?

Victor Chen 106 Reputation points
2020-09-23T11:59:32.183+00:00

The original requirement was to switch the communication device in Skype for Business, but since there is no such api (please tell me if there is any way to do this), so I gave up. Then I found that by disable/enable the device, Skype for Business seems to be able to detect this action and prompt the user to switch the communication device.

I know to use devcon.exe in the WDK to disable/enable a device, but when the device is playing sound, disabling the device will be prompted to reboot the system, so this method does not work.

So is there any way to help me do this?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,454 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 82,206 Reputation points
    2020-09-23T13:48:05.51+00:00

    If you're talking about this : https://i.ibb.co/mvrpKCQ/Deactivate-Device.jpg

    It is done with IPolicyConfig.SetEndpointVisibility

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. xiaoguo 0 Reputation points
    2024-05-14T08:44:24.4233333+00:00

    Can you provide a demo or a link to use IPolicyConfig.SetEndpointVisibility ? Bro

    0 comments No comments