The Windows XP (and earlier) mixer API is the kind of Byzantine, bodged-together Rube Goldberg monstrosity that gives “crawling horror” a bad name. This page (by Alberto di Bene?) was instrumental in saving my sanity.
… And then Microsoft said “Let there be Vista.” And lo, there was much confusion. Setting the master volume using the old API doesn’t work in Vista and later. The new interface is much simpler to use, and this page (by Sayyeid Mostafa Hashemi) was extremely helpful to me in making it work. Of course, the new Vista method won’t work in Windows XP and earlier; so this plugin must incorporate two utterly different routines to get and set the volume and mute state. Isn’t Windows amazing?
This page, by Kent Reisdorph, was useful in battling through the bizarre complexities of the Windows shell namespace. (May 2021: Page is gone; try the Wayback Machine.)
The syntax of the SCREENRES
command
borrows shamelessly from Anders Kjersem’s QRES utility.
I compress the binary using UPX.