Thanks, Martin. I did not look at OS/2 Multi-Media functions. DiveQueryCaps will give the information for the currently booted system, which is useful.
My main need was to work on a system that is not booted, and can't be booted to the desktop because of a wrong screen resolution. But my method doesn't work as well for the currently booted system, so I will be looking into DiveQueryCaps to do that better.