Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

DevMode struct doesn't match WinAPI / TechNet ?

$
0
0
I am trying to make my own multi-monitor resolution changer. (yes, there are already examples of this.) I am trying to better understand what is going on here.


When I look up the Microsoft TechNet info for these functions I see this:

EnumDisplaySettings function (Windows)
http://msdn.microsoft.com/en-us/library/windows/desktop/dd162611%28v=vs.85%29.aspx


Which says it needs a DevMode struct, described here:

DEVMODE structure (Windows)
http://msdn.microsoft.com/en-us/library/windows/desktop/dd183565%28v=vs.85%29.aspx


Okay, that DevMode struct is huge, many many lines.

But when I search the forums for examples of people getting the screen resolutions, their DevMode struct is tiny. It looks nothing like that:

http://www.autoitscript.com/forum/topic/118507-how-to-modify-this-function-for-full-screenmode/
Local $DEVMODE = DllStructCreate("byte[32];int[10];byte[32];int[6]")

http://www.autoitscript.com/forum/topic/22074-how-to-change-the-refresh-rate/
Local $DEVMODE = DllStructCreate("byte[32];int[10];byte[32];int[6]")


I am not a DLLCall expert at all, but it is mysterious to me how Windows knows to put the right data in the right spot in that tiny struct that doesn't look anything like the proper struct in the Microsoft specifications.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>