All methods seem to be fallible in a way or another. Searching among the list of display modes is no safer. The very list may have frequencies of 0 - this used to be my case with my previous gfx card. I admit that now I see no zeroes in the caps viewer, still I don't feel safe. Then again the default frequency isn't necessarily the lowest of the lot. Take my case of 800x600 R5G6B5. I know my Default frequency is 60 Hz. But I see my monitor also supports 800x600 R5G6B5 56 Hz. Imagine the surprise when I saw that.
So far my idea is that the default frequency is the one common to *all* available display modes. 60 Hz for me. But if said Default is altered by the user through DxDiag, then it could be anything else. I don't suppose you know the Registry key that holds the user-specified override for the DirectDraw's default frequency? Knowing that might solve the problem (if, and I stress *IF*, the default frequency is indeed the one common to all display modes).
If at least Windows wasn't in the way of the I/O ports, one could read the settings for the PIC's second counter, and from there derive the monitor's frequency in use. Now *that* would be infallible. Naturally I'm in ring 3... and tools like WinIO are overkill.
Any and every method I find that could be used to retrieve the monitor's frequency will warn against a possible return of 0 or 1 to indicate the misty Default frequency.
The only method that doesn't say anything about Defaults is IDirectDraw7::GetMonitorFrequency(). Does it guarantee success??
Right now it sounds like my best bet, so I'll go that route.