Hello Jacek, I am unsure about that point:
+ service_ok(mi.dwFlags & MONITORINFOF_PRIMARY, "Unexpected secondary monitor info.\n");
Are those flags consistent between Windows version? It would be better to test all flags here.
In /include/winuser.h there is just that flag and I found also no other flags used inside the other display drivers.
Also MSDN states just that only possible flag for the dwFlags member of the tagMONITORINFO structure.
Do you know of some other flag values or can we assume that point as checked?
Kind regards, Bernhard