'Pausing a video on Windows with Win32/COM

Is there a way to pause the currently running media - like, the media that displays on the windows lock screen?

Windows lock screen

I wish to programmatically achieve the same thing as clicking that pause button in that image in the bottom right (except when the machine is not locked). What COM interface could I use to do this? They are very confusing to look through and there seems to be at least a couple related to media on Windows.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source