4 ms·
Yup, even with a code sample that addresses this situation: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-changedisplaysettingsexa#rema
by esprehn 4y ago
Yup, even with a code sample that addresses this situation:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-changedisplaysettingsexa#remarks https://docs.microsoft.com/en-us/windows/win32/api/winuser/n...
So the whole article is sort of "I reverse engineered software for fun instead of reading the docs"
It's a fun read about the quirks of the Windows API though.
- the_only_law 4y agoI don't blame them tbh, Microsoft seems to treat documentation that's not .NET as second class. The Win32 documentation admittedly can be pretty good, when you can easily find what you're looking for. There's ben multiple times where I've gone looking for documentation for a still supported API only to be told "oh yeah the best option is to check out this old ass sample code from 2008"
- legalcorrection 4y ago2008 would be too long ago for web stuff, but in Windows land, that’s plenty recent. Win32 APIs are forever.
- the_only_law 4y agoA single code sample, that's probably poorly commented in my experience is hardly what I'd consider good documentation. OTOH it's pretty easy to get help. People I know very skilled with the Windows API seems to be documentation themselves. I have seen RE guys casually bring up undocumented behavior of certain APIs off the top of their head.
- michidk 4y agoOh. This is embarrassing! I totally disregarded the remarks section when reading through all the different system calls. This example is actually quite helpful and would have saved me from hours of research. Lesson learned, i guess.