list of structs with parameters (sizes and types)

Put simple Tips and Tricks that are not entire Tutorials in this forum
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

list of structs with parameters (sizes and types)

13 Apr 2017, 00:37

I am collecting structs with parameter types and sizes for quick reference. The list is essentially complete, but may be expanded whenever new structs are found.

- The basic rules are the same for both 64-bit and 32-bit processes.
- An n-byte parameter must start at an n-byte offset.
- The overall size of the struct must be divisible by the size of the biggest parameter.
- Note: because of these alignment rules you can get a fair number of gaps in a struct (padding), including at the end of the struct.
- Note: some items are made of smaller items, e.g. a RECT has size 16, but is treated as 4 consecutive Ints. A RECT starts an offset that is a multiple of 4, and the size of a struct that contains a RECT must be a multiple of 4.

Ints and UInts start at offsets divisible by 4.
In 32-bit, Ptrs have size 4, so start at offsets divisible by 4.
In 64-bit, Ptrs have size 8, so start at offsets divisible by 8.

Notes:
- * - if an asterisk is present, then that normally means the parameter is a Ptr type
- [] - a parameter can have a value in square brackets, e.g. '[3]' means that 3 items of the same type appear consecutively, e.g. '[MAX_PATH]' (where MAX_PATH = 260) means that the parameter appears 260 times, you get an 'array' of parameters

Unions:
- Here is a definition of a union.
Unions | Microsoft Docs
https://docs.microsoft.com/en-us/cpp/cpp/unions?view=vs-2017
A union is a user-defined type in which all members share the same memory location. This means that at any given time a union can contain no more than one object from its list of members. It also means that no matter how many members a union has, it always uses only enough memory to store the largest member.
- So a union is a bit like a drop-down list, you choose one of the possible items.
- The size of a union is the size of its largest member.
- The offset and overall size requirements of a union are determined by combining the demands of all members. So if at least one member of union requires starting at an offset divisible by 8 (and that the overall struct size is divisible by 8), this applies to the union as a whole. Similarly, the union must be as big as the biggest member.

Sizes:

Code: Select all

CHAR	1 byte (1 byte = 8 bits)
SHORT	2 bytes (2 bytes = 16 bits)
INT	4 bytes (4 bytes = 32 bits) (UINT has 4 letters, INT/UINT are 4 bytes in size)
INT64	8 bytes (8 bytes = 64 bits)

WORD	2 bytes (2 bytes = 16 bits) (WORD is UShort)
DWORD	4 bytes (4 bytes = 32 bits) (DWORD is UInt) (double word)
QWORD	8 bytes (8 bytes = 64 bits) (quadword)

LONG	4 bytes (4 bytes = 32 bits) (LONG is Int)

(SH*OR*T and W*OR*D are 2 bytes in size)

note: BOOLEAN is UChar, but BOOL is Int
note: most handles are Ptr, but HFILE and HRESULT are Int
Links:
Window Data Types (Compact 2013)
https://msdn.microsoft.com/en-us/library/ee504522.aspx
Hungarian Notation
https://msdn.microsoft.com/en-us/library/aa260976(v=vs.60).aspx
C++: structs: get struct sizes, get member offsets/sizes - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=23&t=61987

Note: some structs have '[CHECK]' indicating uncertainty about the correct offsets/overall size.

Note: some parameters/structs can differ depending on the operating system version, program bitness (32-bit/64-bit), or whether the program is ANSI/Unicode. E.g. TBYTE/TCHAR depend on whether the program is ANSI/Unicode.

Note: in the structs below we assume that TCHAR refers to a Unicode character, and is thus a UShort of size 2.

Note: if a struct refers to another type of struct, then that struct is also in the list below.

Code: Select all

;list of Winapi structs
;[first released: 2017-04-13]
;[updated: 2019-11-12]

;162 structs
;11 with '[CHECK]' status
;STRUCT=SizeInBytes64Bit:SizeInBytes32Bit (where the process is Unicode)

;note: no structs (although 'EX' versions exist):
;GETTEXT, GETTEXTLENGTH, INITCOMMONCONTROLS, SETTEXT

;the information is presented in the way it is,
;to copy and paste code for use with NumGet/NumPut, to do things like:
;vSize := (A_PtrSize=8?48:32)
;MsgBox, % NumGet(&MENUBARINFO, A_PtrSize=8?40:28, "Int") ;fBarFocused / fFocused

==================================================

;;ACCEL=6:6
;;ACCESSTIMEOUT=12:12
;;ANIMATIONINFO=8:8
;;API_VERSION=8:8
;;APPBARDATA=48:36
;;AUDIODESCRIPTION=12:12
;;BIND_OPTS=16:16
;;BITMAP=32:24
;;BITMAPINFO=44:44
;;BITMAPINFOHEADER=40:40
;;BLENDFUNCTION=4:4
;;BROWSEINFO=64:32
;;CHARFORMAT2=116:116
;;CHARFORMAT=92:92
;;CHOOSECOLOR=72:36
;;CHOOSEFONT=104:60
;;CLIENTCREATESTRUCT=16:8
;;CM_COLUMNINFO=184:184
;;CMINVOKECOMMANDINFO=56:36
;;CMINVOKECOMMANDINFOEX=104:64
;;COMBOBOXINFO=64:52
;;COMDLG_FILTERSPEC=16:8
;;COPYDATASTRUCT=24:12
;;COSERVERINFO=32:16
;;CREATESTRUCT=80:48
;;CURSORINFO=24:20
;;DEVMODE=220:220
;;DEVPROPKEY=20:20
;;DIBSECTION=104:84
;;DISPLAY_DEVICE=840:840
;;DISPPARAMS=24:16
;;DLGTEMPLATE=18:18
;;DLGTEMPLATEEX=?:?
;;DLLVERSIONINFO2=32:32
;;DLLVERSIONINFO=20:20
;;DRAWTEXTPARAMS=20:20
;;EDITSTREAM=20:12
;;EVENTLOGRECORD=56:56
;;FILETIME=8:8
;;FILTERKEYS=24:24
;;FINDREPLACE=80:40
;;FORMATETC=32:20
;;GdiplusStartupInput=24:16
;;GETTEXTEX=28:20
;;GETTEXTLENGTHEX=8:8
;;GLYPHSET=20:20
;;GOPHER_FIND_DATA=1588:1588
;;GUID=16:16
;;GUITHREADINFO=72:48
;;HDITEM=72:48
;;HH_AKLINK=56:32
;;HIGHCONTRAST=16:12
;;HOSTENT=32:16
;;ICONINFO=32:20
;;ICONMETRICS=108:108
;;IMAGELISTDRAWPARAMS=88:68
;;IN6_ADDR=16:16
;;IN_ADDR=4:4
;;INITCOMMONCONTROLSEX=8:8
;;ITEMIDLIST=3:3
;;LIST_ENTRY=16:8
;;LOADED_IMAGE=88:48
;;LOGFONT=92:92
;;LOGFONTA=60:60
;;LOGFONTW=92:92
;;LOGPALETTE=8:8
;;LOGPEN=16:16
;;LUID=8:8
;;LUID_AND_ATTRIBUTES=12:12
;;LVITEM=88:60
;;MDICREATESTRUCT=56:36
;;MEASUREITEMSTRUCT=32:24
;;MEMORY_BASIC_INFORMATION=48:28
;;MENUBARINFO=48:32
;;MENUINFO=40:28
;;MENUITEMINFO=80:48
;;MIDIOUTCAPS=84:84
;;MINIMIZEDMETRICS=20:20
;;MINMAXINFO=40:40
;;MODULEENTRY32=1080:1064
;;MONITORINFO=40:40
;;MONITORINFOEX=104:104
;;MOUSEKEYS=28:28
;;MSG=48:28
;;MSGBOXPARAMS=80:40
;;MULTI_QI=24:12
;;NMHDR=24:12
;;NMLVKEYDOWN=30:18
;;NONCLIENTMETRICS=504:504
;;NOTIFYICONDATA=976:956
;;NOTIFYITEM=56:40
;;OLECMD=8:8
;;OPENFILENAME_NT4=136:76
;;OPENFILENAMEA=152:88
;;OPENFILENAMEW=152:88
;;OSVERSIONINFO=276:276
;;OSVERSIONINFOEX=284:284
;;OVERLAPPED=32:20
;;PAGESETUPDLG=128:84
;;PALETTEENTRY=4:4
;;PEB=712:472
;;POINT=8:8
;;PREVENT_MEDIA_REMOVAL=1:1
;;PRINTDLG=120:66
;;PRINTDLGEX=136:84
;;PROCESS_BASIC_INFORMATION=48:24
;;PROCESS_INFORMATION=24:16
;;PROPERTYKEY=20:20
;;REBARBANDINFO=128:100
;;RECT=16:16
;;REG_TZI_FORMAT=44:44
;;RGBQUAD=4:4
;;SAFEARRAY=32:24
;;SAFEARRAYBOUND=8:8
;;SECURITY_ATTRIBUTES=24:12
;;SETTEXTEX=8:8
;;SHARDAPPIDINFOLINK=16:8
;;SHELLEXECUTEINFO=112:60
;;SHELLSTATE=32:32
;;SHFILEINFO=696:692
;;SHFILEOPSTRUCT=56:30
;;SHITEMID=3:3
;;SHQUERYRBINFO=24:20
;;SIZE=8:8
;;SOUNDSENTRY=56:48
;;SP_CLASSINSTALL_HEADER=8:8
;;SP_DEVINFO_DATA=32:28
;;SP_PROPCHANGE_PARAMS=20:20
;;STARTUPINFO=104:68
;;STARTUPINFOEX=112:72
;;STGMEDIUM=24:12
;;STICKYKEYS=8:8
;;STRRET=272:264
;;SYSTEM_INFO=48:36
;;SYSTEM_POWER_STATUS=12:12
;;SYSTEMTIME=16:16
;;TBBUTTON=32:20
;;TBBUTTONINFO=48:32
;;TCITEM=40:28
;;TEXTMETRIC=60:60
;;THREADENTRY32=28:28
;;TIME_ZONE_INFORMATION=172:172
;;TIMECAPS=8:8
;;TOGGLEKEYS=8:8
;;TOKEN_PRIVILEGES=16:16
;;TOOLINFO=72:48
;;TPMPARAMS=20:20
;;TRAYDATA=32:24
;;TVHITTESTINFO=24:16
;;TVINSERTSTRUCT=96:68
;;TVITEM=56:40
;;TVITEMEX=80:60
;;VARIANT=24:16
;;VS_FIXEDFILEINFO=52:52
;;WAVEFORMAT=14:14
;;WAVEFORMATEX=18:18
;;WCRANGE=4:4
;;WIN32_FIND_DATA=592:592
;;WINDOWINFO=60:60
;;WNDCLASS=72:40
;;WNDCLASSEX=80:48
;;WSADATA=408:400

==================================================

;HEADER FILES

;[MSDN: https://docs.microsoft.com/en-us/windows/win32/api/timezoneapi/ns-timezoneapi-time_zone_information]
REG_TZI_FORMAT

;[MSDN: not defined in any standard header file]
DLGTEMPLATEEX

;[undocumented]
NOTIFYITEM
TRAYDATA

;CommCtrl.h
HDITEM
IMAGELISTDRAWPARAMS
INITCOMMONCONTROLSEX
LVITEM
NMLVKEYDOWN
REBARBANDINFO
TBBUTTON
TBBUTTONINFO
TCITEM
TOOLINFO
TVHITTESTINFO
TVINSERTSTRUCT
TVITEM
TVITEMEX

;commdlg.h
CHOOSECOLOR
CHOOSEFONT
FINDREPLACE
OPENFILENAME_NT4
OPENFILENAMEA
OPENFILENAMEW
PAGESETUPDLG
PRINTDLG
PRINTDLGEX

;DbgHelp.h
API_VERSION
LOADED_IMAGE

;devpropdef.h
DEVPROPKEY

;DocObj.h
OLECMD

;gdiplusinit.h
GdiplusStartupInput

;guiddef.h
GUID

;HtmlHelp.h
HH_AKLINK

;in6addr.h
IN6_ADDR

;inaddr.h
IN_ADDR

;minwinbase.h
FILETIME
OVERLAPPED
SYSTEMTIME

;minwinbase.h [MSDN: Winbase.h (include Windows.h)]
SECURITY_ATTRIBUTES

;mmeapi.h
MIDIOUTCAPS

;mmreg.h
WAVEFORMAT
WAVEFORMATEX

;ntdef.h
LIST_ENTRY
LUID

;OAIdl.h
DISPPARAMS
SAFEARRAY
SAFEARRAYBOUND
VARIANT

;ObjIdl.h
BIND_OPTS
FORMATETC
MULTI_QI
STGMEDIUM

;ObjIdlbase.h
COSERVERINFO

;processthreadsapi.h
PROCESS_INFORMATION
STARTUPINFO

;Richedit.h
CHARFORMAT
CHARFORMAT2
EDITSTREAM
GETTEXTEX
GETTEXTLENGTHEX
SETTEXTEX

;SetupAPI.h
SP_CLASSINSTALL_HEADER
SP_DEVINFO_DATA
SP_PROPCHANGE_PARAMS

;shellapi.h
APPBARDATA
NOTIFYICONDATA
SHELLEXECUTEINFO
SHFILEINFO
SHFILEOPSTRUCT
SHQUERYRBINFO

;ShlObj.h
BROWSEINFO
SHARDAPPIDINFOLINK
SHELLSTATE

;Shlwapi.h
DLLVERSIONINFO
DLLVERSIONINFO2

;ShObjIdl.h
CM_COLUMNINFO
CMINVOKECOMMANDINFO
CMINVOKECOMMANDINFOEX

;shtypes.h
COMDLG_FILTERSPEC
ITEMIDLIST
SHITEMID
STRRET
WIN32_FIND_DATA

;sysinfoapi.h
SYSTEM_INFO

;timeapi.h
TIMECAPS

;timezoneapi.h
TIME_ZONE_INFORMATION

;TlHelp32.h
MODULEENTRY32
THREADENTRY32

;verrsrc.h
VS_FIXEDFILEINFO

;WinBase.h
STARTUPINFOEX
SYSTEM_POWER_STATUS

;windef.h
POINT
RECT
SIZE

;wingdi.h
BITMAP
BITMAPINFO
BITMAPINFOHEADER
BLENDFUNCTION
DEVMODE
DIBSECTION
DISPLAY_DEVICE
GLYPHSET
LOGFONT
LOGFONTA
LOGFONTW
LOGPALETTE
LOGPEN
PALETTEENTRY
RGBQUAD
TEXTMETRIC
WCRANGE

;WinInet.h
GOPHER_FIND_DATA

;winioctl.h
PREVENT_MEDIA_REMOVAL

;winnt.h
EVENTLOGRECORD
LUID_AND_ATTRIBUTES
MEMORY_BASIC_INFORMATION
OSVERSIONINFO
OSVERSIONINFOEX
TOKEN_PRIVILEGES

;winsock.h
HOSTENT
WSADATA

;winternl.h
PEB
PROCESS_BASIC_INFORMATION

;WinUser.h
ACCEL
ACCESSTIMEOUT
ANIMATIONINFO
AUDIODESCRIPTION
CLIENTCREATESTRUCT
COMBOBOXINFO
COPYDATASTRUCT
CREATESTRUCT
CURSORINFO
DLGTEMPLATE
DRAWTEXTPARAMS
FILTERKEYS
GUITHREADINFO
HIGHCONTRAST
ICONINFO
ICONMETRICS
MDICREATESTRUCT
MEASUREITEMSTRUCT
MENUBARINFO
MENUINFO
MENUITEMINFO
MINIMIZEDMETRICS
MINMAXINFO
MONITORINFO
MONITORINFOEX
MOUSEKEYS
MSG
MSGBOXPARAMS
NMHDR
NONCLIENTMETRICS
SOUNDSENTRY
STICKYKEYS
TOGGLEKEYS
TPMPARAMS
WINDOWINFO
WNDCLASS
WNDCLASSEX

;wtypes.h
PROPERTYKEY

==================================================

;;ACCEL=6:6

		typedef struct tagACCEL {
0:0, "UChar"	  BYTE fVirt;
2:2, "UShort"	  WORD key;
4:4, "UShort"	  WORD cmd;
		} ACCEL, *LPACCEL;
6:6

==================================================

;;ACCESSTIMEOUT=12:12

		typedef struct tagACCESSTIMEOUT {
0:0, "UInt"	  UINT  cbSize;
4:4, "UInt"	  DWORD dwFlags;
8:8, "UInt"	  DWORD iTimeOutMSec;
		} ACCESSTIMEOUT, *LPACCESSTIMEOUT;
12:12

==================================================

;;ANIMATIONINFO=8:8

		typedef struct tagANIMATIONINFO {
0:0, "UInt"	  UINT cbSize;
4:4, "Int"	  int  iMinAnimate;
		} ANIMATIONINFO, *LPANIMATIONINFO;
8:8

==================================================

;;API_VERSION=8:8

		typedef struct API_VERSION {
0:0, "UShort"	  USHORT MajorVersion;
2:2, "UShort"	  USHORT MinorVersion;
4:4, "UShort"	  USHORT Revision;
6:6, "UShort"	  USHORT Reserved;
		} API_VERSION, *LPAPI_VERSION;
8:8

==================================================

;;APPBARDATA=48:36

		typedef struct _AppBarData {
0:0, "UInt"	  DWORD  cbSize;
8:4, "Ptr"	  HWND   hWnd;
16:8, "UInt"	  UINT   uCallbackMessage;
20:12, "UInt"	  UINT   uEdge;
24:16, ""	  RECT   rc;
40:32, "Ptr"	  LPARAM lParam;
		} APPBARDATA, *PAPPBARDATA;
48:36

==================================================

;;AUDIODESCRIPTION=12:12

		typedef struct tagAUDIODESCRIPTION {
0:0, "UInt"	  UINT cbSize;
4:4, "Int"	  BOOL Enabled;
8:8, "UInt"	  LCID Locale;
		} AUDIODESCRIPTION, *LPAUDIODESCRIPTION;
12:12

==================================================

;;BIND_OPTS=16:16

		typedef struct tagBIND_OPTS {
0:0, "UInt"	  DWORD cbStruct;
4:4, "UInt"	  DWORD grfFlags;
8:8, "UInt"	  DWORD grfMode;
12:12, "UInt"	  DWORD dwTickCountDeadline;
		} BIND_OPTS, *LPBIND_OPTS;
16:16

==================================================

;;BITMAP=32:24

		typedef struct tagBITMAP {
0:0, "Int"	  LONG   bmType;
4:4, "Int"	  LONG   bmWidth;
8:8, "Int"	  LONG   bmHeight;
12:12, "Int"	  LONG   bmWidthBytes;
16:16, "UShort"	  WORD   bmPlanes;
18:18, "UShort"	  WORD   bmBitsPixel;
24:20, "Ptr"	  LPVOID bmBits;
		} BITMAP, *PBITMAP;
32:24

==================================================

;;BITMAPINFO=44:44

		typedef struct tagBITMAPINFO {
0:0, ""	  BITMAPINFOHEADER bmiHeader;
40:40, ""	  RGBQUAD          bmiColors[1];
		} BITMAPINFO, *PBITMAPINFO;
44:44

==================================================

;;BITMAPINFOHEADER=40:40

		typedef struct tagBITMAPINFOHEADER {
0:0, "UInt"	  DWORD biSize;
4:4, "Int"	  LONG  biWidth;
8:8, "Int"	  LONG  biHeight;
12:12, "UShort"	  WORD  biPlanes;
14:14, "UShort"	  WORD  biBitCount;
16:16, "UInt"	  DWORD biCompression;
20:20, "UInt"	  DWORD biSizeImage;
24:24, "Int"	  LONG  biXPelsPerMeter;
28:28, "Int"	  LONG  biYPelsPerMeter;
32:32, "UInt"	  DWORD biClrUsed;
36:36, "UInt"	  DWORD biClrImportant;
		} BITMAPINFOHEADER, *PBITMAPINFOHEADER;
40:40

==================================================

;;BLENDFUNCTION=4:4

		typedef struct _BLENDFUNCTION {
0:0, "UChar"	  BYTE BlendOp;
1:1, "UChar"	  BYTE BlendFlags;
2:2, "UChar"	  BYTE SourceConstantAlpha;
3:3, "UChar"	  BYTE AlphaFormat;
		} BLENDFUNCTION, *PBLENDFUNCTION, *LPBLENDFUNCTION;
4:4

==================================================

;;BROWSEINFO=64:32

		typedef struct _browseinfoA {
0:0, "Ptr"	  HWND              hwndOwner;
8:4, "Ptr"	  PCIDLIST_ABSOLUTE pidlRoot;
16:8, "Ptr"	  LPSTR             pszDisplayName;
24:12, "Ptr"	  LPCSTR            lpszTitle;
32:16, "UInt"	  UINT              ulFlags;
40:20, "Ptr"	  BFFCALLBACK       lpfn;
48:24, "Ptr"	  LPARAM            lParam;
56:28, "Int"	  int               iImage;
		} BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
64:32

==================================================

;;CHARFORMAT2=116:116

;source: wingdi.h
;LF_FACESIZE := 32

		typedef struct _charformat2 {
0:0, "UInt"	  UINT     cbSize;
4:4, "UInt"	  DWORD    dwMask;
8:8, "UInt"	  DWORD    dwEffects;
12:12, "Int"	  LONG     yHeight;
16:16, "Int"	  LONG     yOffset;
20:20, "UInt"	  COLORREF crTextColor;
24:24, "UChar"	  BYTE     bCharSet;
25:25, "UChar"	  BYTE     bPitchAndFamily;
26:26, ""	  TCHAR    szFaceName[LF_FACESIZE];
90:90, "UShort"	  WORD     wWeight;
92:92, "Short"	  SHORT    sSpacing;
96:96, "UInt"	  COLORREF crBackColor;
100:100, "UInt"	  LCID     lcid;
		#if (_RICHEDIT_VER >= 0x0500)
104:104, "UInt"	  union {
		    DWORD dwReserved;
		    DWORD dwCookie;
		  };
		#else
		  DWORD    dwReserved;
		#endif
106:106, "Short"	  SHORT    sStyle;
108:108, "UShort"	  WORD     wKerning;
110:110, "UChar"	  BYTE     bUnderlineType;
111:111, "UChar"	  BYTE     bAnimation;
112:112, "UChar"	  BYTE     bRevAuthor;
		#if (_RICHEDIT_VER >= 0x0800)
113:113, "UChar"	  BYTE     bUnderlineColor;
		#endif
		} CHARFORMAT2;
116:116

==================================================

;;CHARFORMAT=92:92

;source: wingdi.h
;LF_FACESIZE := 32

;link:
;_charformatw | Microsoft Docs
;https://docs.microsoft.com/en-us/windows/desktop/api/richedit/ns-richedit-_charformatw

		typedef struct _charformatw {
0:0, "UInt"	  UINT     cbSize;
4:4, "UInt"	  DWORD    dwMask;
8:8, "UInt"	  DWORD    dwEffects;
12:12, "Int"	  LONG     yHeight;
16:16, "Int"	  LONG     yOffset;
20:20, "UInt"	  COLORREF crTextColor;
24:24, "UChar"	  BYTE     bCharSet;
25:25, "UChar"	  BYTE     bPitchAndFamily;
26:26, ""	  WCHAR    szFaceName[LF_FACESIZE];
		} CHARFORMATW;
92:92

==================================================

;;CHOOSECOLOR=72:36

		typedef struct {
0:0, "UInt"	  DWORD        lStructSize;
8:4, "Ptr"	  HWND         hwndOwner;
16:8, "Ptr"	  HWND         hInstance;
24:12, "UInt"	  COLORREF     rgbResult;
32:16, "Ptr"	  COLORREF     *lpCustColors;
40:20, "UInt"	  DWORD        Flags;
48:24, "Ptr"	  LPARAM       lCustData;
56:28, "Ptr"	  LPCCHOOKPROC lpfnHook;
64:32, "Ptr"	  LPCTSTR      lpTemplateName;
		} CHOOSECOLOR, *LPCHOOSECOLOR;
72:36

==================================================

;;CHOOSEFONT=104:60

		typedef struct tagCHOOSEFONTA {
0:0, "UInt"	  DWORD        lStructSize;
8:4, "Ptr"	  HWND         hwndOwner;
16:8, "Ptr"	  HDC          hDC;
24:12, "Ptr"	  LPLOGFONTA   lpLogFont;
32:16, "Int"	  INT          iPointSize;
36:20, "UInt"	  DWORD        Flags;
40:24, "UInt"	  COLORREF     rgbColors;
48:28, "Ptr"	  LPARAM       lCustData;
56:32, "Ptr"	  LPCFHOOKPROC lpfnHook;
64:36, "Ptr"	  LPCSTR       lpTemplateName;
72:40, "Ptr"	  HINSTANCE    hInstance;
80:44, "Ptr"	  LPSTR        lpszStyle;
88:48, "UShort"	  WORD         nFontType;
90:50, "UShort"	  WORD         ___MISSING_ALIGNMENT__;
92:52, "Int"	  INT          nSizeMin;
96:56, "Int"	  INT          nSizeMax;
		} CHOOSEFONTA;
104:60

==================================================

;;CLIENTCREATESTRUCT=16:8

		typedef struct tagCLIENTCREATESTRUCT {
0:0, "Ptr"	  HANDLE hWindowMenu;
8:4, "UInt"	  UINT   idFirstChild;
		} CLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
16:8

==================================================

;;CM_COLUMNINFO=184:184

		typedef struct CM_COLUMNINFO {
0:0, "UInt"	  DWORD cbSize;
4:4, "UInt"	  DWORD dwMask;
8:8, "UInt"	  DWORD dwState;
12:12, "UInt"	  UINT  uWidth;
16:16, "UInt"	  UINT  uDefaultWidth;
20:20, "UInt"	  UINT  uIdealWidth;
24:24, ""	  WCHAR wszName[80];
		} CM_COLUMNINFO;
184:184

==================================================

;;CMINVOKECOMMANDINFO=56:36

		typedef struct _CMINVOKECOMMANDINFO {
0:0, "UInt"	  DWORD  cbSize;
4:4, "UInt"	  DWORD  fMask;
8:8, "Ptr"	  HWND   hwnd;
16:12, "Ptr"	  LPCSTR lpVerb;
24:16, "Ptr"	  LPCSTR lpParameters;
32:20, "Ptr"	  LPCSTR lpDirectory;
40:24, "Int"	  int    nShow;
44:28, "UInt"	  DWORD  dwHotKey;
48:32, "Ptr"	  HANDLE hIcon;
		} CMINVOKECOMMANDINFO;
56:36

==================================================

;;CMINVOKECOMMANDINFOEX=104:64

		typedef struct _CMINVOKECOMMANDINFOEX {
0:0, "UInt"	  DWORD   cbSize;
4:4, "UInt"	  DWORD   fMask;
8:8, "Ptr"	  HWND    hwnd;
16:12, "Ptr"	  LPCSTR  lpVerb;
24:16, "Ptr"	  LPCSTR  lpParameters;
32:20, "Ptr"	  LPCSTR  lpDirectory;
40:24, "Int"	  int     nShow;
44:28, "UInt"	  DWORD   dwHotKey;
48:32, "Ptr"	  HANDLE  hIcon;
56:36, "Ptr"	  LPCSTR  lpTitle;
64:40, "Ptr"	  LPCWSTR lpVerbW;
72:44, "Ptr"	  LPCWSTR lpParametersW;
80:48, "Ptr"	  LPCWSTR lpDirectoryW;
88:52, "Ptr"	  LPCWSTR lpTitleW;
96:56, "UInt64"	  POINT   ptInvoke;
		} CMINVOKECOMMANDINFOEX;
104:64

==================================================

;;COMBOBOXINFO=64:52

		typedef struct tagCOMBOBOXINFO {
0:0, "UInt"	  DWORD cbSize;
4:4, ""	  RECT  rcItem;
20:20, ""	  RECT  rcButton;
36:36, "UInt"	  DWORD stateButton;
40:40, "Ptr"	  HWND  hwndCombo;
48:44, "Ptr"	  HWND  hwndItem;
56:48, "Ptr"	  HWND  hwndList;
		} COMBOBOXINFO, *PCOMBOBOXINFO, *LPCOMBOBOXINFO;
64:52

==================================================

;;COMDLG_FILTERSPEC=16:8

		typedef struct _COMDLG_FILTERSPEC {
0:0, "Ptr"	  LPCWSTR pszName;
8:4, "Ptr"	  LPCWSTR pszSpec;
		} COMDLG_FILTERSPEC;
16:8

==================================================

;;COPYDATASTRUCT=24:12

		typedef struct tagCOPYDATASTRUCT {
0:0, "UPtr"	  ULONG_PTR dwData;
8:4, "UInt"	  DWORD     cbData;
16:8, "Ptr"	  PVOID     lpData;
		} COPYDATASTRUCT, *PCOPYDATASTRUCT;
24:12

==================================================

;;COSERVERINFO=32:16

		typedef struct _COSERVERINFO {
0:0, "UInt"	  DWORD      dwReserved1;
8:4, "Ptr"	  LPWSTR     pwszName;
16:8, "Ptr"	  COAUTHINFO *pAuthInfo;
24:12, "UInt"	  DWORD      dwReserved2;
		} COSERVERINFO;
32:16

==================================================

;;CREATESTRUCT=80:48

		typedef struct tagCREATESTRUCT {
0:0, "Ptr"	  LPVOID    lpCreateParams;
8:4, "Ptr"	  HINSTANCE hInstance;
16:8, "Ptr"	  HMENU     hMenu;
24:12, "Ptr"	  HWND      hwndParent;
32:16, "Int"	  int       cy;
36:20, "Int"	  int       cx;
40:24, "Int"	  int       y;
44:28, "Int"	  int       x;
48:32, "Int"	  LONG      style;
56:36, "Ptr"	  LPCTSTR   lpszName;
64:40, "Ptr"	  LPCTSTR   lpszClass;
72:44, "UInt"	  DWORD     dwExStyle;
		} CREATESTRUCT, *LPCREATESTRUCT;
80:48

==================================================

;;CURSORINFO=24:20

		typedef struct {
0:0, "UInt"	  DWORD   cbSize;
4:4, "UInt"	  DWORD   flags;
8:8, "Ptr"	  HCURSOR hCursor;
16:12, "UInt64"	  POINT   ptScreenPos;
		} CURSORINFO, *PCURSORINFO, *LPCURSORINFO;
24:20

==================================================

;;DEVMODE=220:220

;source: wingdi.h
;CCHDEVICENAME := 32
;CCHFORMNAME := 32

		typedef struct _devicemode {
0:0, ""	  TCHAR dmDeviceName[CCHDEVICENAME];
64:64, "UShort"	  WORD  dmSpecVersion;
66:66, "UShort"	  WORD  dmDriverVersion;
68:68, "UShort"	  WORD  dmSize;
70:70, "UShort"	  WORD  dmDriverExtra;
72:72, "UInt"	  DWORD dmFields;
76:76, ""	  union {
    struct {
      short dmOrientation;
      short dmPaperSize;
      short dmPaperLength;
      short dmPaperWidth;
      short dmScale;
      short dmCopies;
      short dmDefaultSource;
      short dmPrintQuality;
    };
    struct {
      POINTL dmPosition;
      DWORD  dmDisplayOrientation;
      DWORD  dmDisplayFixedOutput;
    };
  };
92:92, "Short"	  short dmColor;
94:94, "Short"	  short dmDuplex;
96:96, "Short"	  short dmYResolution;
98:98, "Short"	  short dmTTOption;
100:100, "Short"	  short dmCollate;
102:102, ""	  TCHAR dmFormName[CCHFORMNAME];
166:166, "UShort"	  WORD  dmLogPixels;
168:168, "UInt"	  DWORD dmBitsPerPel;
172:172, "UInt"	  DWORD dmPelsWidth;
176:176, "UInt"	  DWORD dmPelsHeight;
180:180, ""	  union {
		    DWORD dmDisplayFlags;
		    DWORD dmNup;
		  };
184:184, "UInt"	  DWORD dmDisplayFrequency;
		#if (WINVER >= 0x0400)
188:188, "UInt"	  DWORD dmICMMethod;
192:192, "UInt"	  DWORD dmICMIntent;
196:196, "UInt"	  DWORD dmMediaType;
200:200, "UInt"	  DWORD dmDitherType;
204:204, "UInt"	  DWORD dmReserved1;
208:208, "UInt"	  DWORD dmReserved2;
		#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
212:212, "UInt"	  DWORD dmPanningWidth;
216:216, "UInt"	  DWORD dmPanningHeight;
		#endif
		#endif
		} DEVMODE, *PDEVMODE, *LPDEVMODE;
220:220

==================================================

;;DEVPROPKEY=20:20

		struct DEVPROPKEY {
0:0, ""	  DEVPROPGUID fmtid;
16:16, "UInt"	  DEVPROPID   pid;
		};
20:20

==================================================

;;DIBSECTION=104:84

		typedef struct tagDIBSECTION {
0:0, ""	  BITMAP           dsBm;
32:24, ""	  BITMAPINFOHEADER dsBmih;
72:64, ""	  DWORD            dsBitfields[3];
88:76, "Ptr"	  HANDLE           dshSection;
96:80, "UInt"	  DWORD            dsOffset;
		} DIBSECTION, *PDIBSECTION;
104:84

==================================================

;;DISPLAY_DEVICE=840:840

		typedef struct _DISPLAY_DEVICE {
0:0, "UInt"	  DWORD cb;
4:4, ""	  TCHAR DeviceName[32];
68:68, ""	  TCHAR DeviceString[128];
324:324, "UInt"	  DWORD StateFlags;
328:328, ""	  TCHAR DeviceID[128];
584:584, ""	  TCHAR DeviceKey[128];
		} DISPLAY_DEVICE, *PDISPLAY_DEVICE;
840:840

==================================================

;;DISPPARAMS=24:16

		typedef struct tagDISPPARAMS {
0:0, "Ptr"	  VARIANTARG *rgvarg;
8:4, "Ptr"	  DISPID     *rgdispidNamedArgs;
16:8, "UInt"	  UINT       cArgs;
20:12, "UInt"	  UINT       cNamedArgs;
		} DISPPARAMS;
24:16

==================================================

;;DLGTEMPLATE=18:18

		typedef struct {
0:0, "UInt"	  DWORD style;
4:4, "UInt"	  DWORD dwExtendedStyle;
8:8, "UShort"	  WORD  cdit;
10:10, "Short"	  short x;
12:12, "Short"	  short y;
14:14, "Short"	  short cx;
16:16, "Short"	  short cy;
		} DLGTEMPLATE;
20:20 [CHECK][padding at end][Visual Studio states 18:18]

==================================================

;;DLGTEMPLATEEX=?:?

;note:
;DLGTEMPLATEEX structure - Windows applications | Microsoft Docs
;https://docs.microsoft.com/en-us/windows/desktop/dlgbox/dlgtemplateex
;The DLGTEMPLATEEX structure is not defined in any standard header file. The structure definition is provided here to explain the format of an extended template for a dialog box.

		typedef struct {
0:0, "UShort"	  WORD      dlgVer;
2:2, "UShort"	  WORD      signature;
4:4, "UInt"	  DWORD     helpID;
8:8, "UInt"	  DWORD     exStyle;
12:12, "UInt"	  DWORD     style;
16:16, "UShort"	  WORD      cDlgItems;
18:18, "Short"	  short     x;
20:20, "Short"	  short     y;
22:22, "Short"	  short     cx;
24:24, "Short"	  short     cy;
26:26, ""	  sz_Or_Ord menu;
?:?, ""	  sz_Or_Ord windowClass;
?:?, ""	  WCHAR     title[titleLen];
?:?, "UShort"	  WORD      pointsize;
?:?, "UShort"	  WORD      weight;
?:?, "UChar"	  BYTE      italic;
?:?, "UChar"	  BYTE      charset;
?:?, ""	  WCHAR     typeface[stringLen];
		} DLGTEMPLATEEX;
?:?

==================================================

;;DLLVERSIONINFO2=32:32

		typedef struct _DLLVERSIONINFO2 {
0:0, ""	  DLLVERSIONINFO info1;
20:20, "UInt"	  DWORD          dwFlags;
24:24, "Int64"	  ULONGLONG      ullVersion;
		} DLLVERSIONINFO2;
32:32

==================================================

;;DLLVERSIONINFO=20:20

		typedef struct _DllVersionInfo {
0:0, "UInt"	  DWORD cbSize;
4:4, "UInt"	  DWORD dwMajorVersion;
8:8, "UInt"	  DWORD dwMinorVersion;
12:12, "UInt"	  DWORD dwBuildNumber;
16:16, "UInt"	  DWORD dwPlatformID;
		} DLLVERSIONINFO;
20:20

==================================================

;;DRAWTEXTPARAMS=20:20

		typedef struct {
0:0, "UInt"	  UINT cbSize;
4:4, "Int"	  int  iTabLength;
8:8, "Int"	  int  iLeftMargin;
12:12, "Int"	  int  iRightMargin;
16:16, "UInt"	  UINT uiLengthDrawn;
		} DRAWTEXTPARAMS, *LPDRAWTEXTPARAMS;
20:20

==================================================

;;EDITSTREAM=20:12

		typedef struct _editstream {
0:0, "UPtr"	  DWORD_PTR          dwCookie;
8:4, "UInt"	  DWORD              dwError;
12:8, "Ptr"	  EDITSTREAMCALLBACK pfnCallback;
		} EDITSTREAM;
20:12

==================================================

;;EVENTLOGRECORD=56:56

		typedef struct _EVENTLOGRECORD {
0:0, "UInt"	  DWORD Length;
4:4, "UInt"	  DWORD Reserved;
8:8, "UInt"	  DWORD RecordNumber;
12:12, "UInt"	  DWORD TimeGenerated;
16:16, "UInt"	  DWORD TimeWritten;
20:20, "UInt"	  DWORD EventID;
24:24, "UShort"	  WORD  EventType;
26:26, "UShort"	  WORD  NumStrings;
28:28, "UShort"	  WORD  EventCategory;
30:30, "UShort"	  WORD  ReservedFlags;
32:32, "UInt"	  DWORD ClosingRecordNumber;
36:36, "UInt"	  DWORD StringOffset;
40:40, "UInt"	  DWORD UserSidLength;
44:44, "UInt"	  DWORD UserSidOffset;
48:48, "UInt"	  DWORD DataLength;
52:52, "UInt"	  DWORD DataOffset;
		} EVENTLOGRECORD, *PEVENTLOGRECORD;
56:56

==================================================

;;FILETIME=8:8

		typedef struct _FILETIME {
0:0, "UInt"	  DWORD dwLowDateTime;
4:4, "UInt"	  DWORD dwHighDateTime;
		} FILETIME, *PFILETIME;
8:8

==================================================

;;FILTERKEYS=24:24

		typedef struct tagFILTERKEYS {
0:0, "UInt"	  UINT  cbSize;
4:4, "UInt"	  DWORD dwFlags;
8:8, "UInt"	  DWORD iWaitMSec;
12:12, "UInt"	  DWORD iDelayMSec;
16:16, "UInt"	  DWORD iRepeatMSec;
20:20, "UInt"	  DWORD iBounceMSec;
		} FILTERKEYS, *LPFILTERKEYS;
24:24

==================================================

;;FINDREPLACE=80:40

		typedef struct tagFINDREPLACEA {
0:0, "UInt"	  DWORD        lStructSize;
8:4, "Ptr"	  HWND         hwndOwner;
16:8, "Ptr"	  HINSTANCE    hInstance;
24:12, "UInt"	  DWORD        Flags;
32:16, "Ptr"	  LPSTR        lpstrFindWhat;
40:20, "Ptr"	  LPSTR        lpstrReplaceWith;
48:24, "UShort"	  WORD         wFindWhatLen;
50:26, "UShort"	  WORD         wReplaceWithLen;
56:28, "Ptr"	  LPARAM       lCustData;
64:32, "Ptr"	  LPFRHOOKPROC lpfnHook;
72:36, "Ptr"	  LPCSTR       lpTemplateName;
		} FINDREPLACEA, *LPFINDREPLACEA;
80:40

==================================================

;;FORMATETC=32:20

		typedef struct tagFORMATETC {
0:0, "UShort"	  CLIPFORMAT     cfFormat;
8:4, "Ptr"	  DVTARGETDEVICE *ptd;
16:8, "UInt"	  DWORD          dwAspect;
20:12, "Int"	  LONG           lindex;
24:16, "UInt"	  DWORD          tymed;
		} FORMATETC, *LPFORMATETC;
32:20

==================================================

;;GdiplusStartupInput=24:16

;links:
;GdiplusStartupInput | Microsoft Docs
;https://docs.microsoft.com/en-us/windows/desktop/api/gdiplusinit/ns-gdiplusinit-gdiplusstartupinput
;Drawing a Line - Windows applications | Microsoft Docs
;https://docs.microsoft.com/en-us/windows/desktop/gdiplus/-gdiplus-drawing-a-line-use

		struct GdiplusStartupInput {
0:0, "UInt"	  UINT32         GdiplusVersion;
8:4, "Ptr"	  DebugEventProc DebugEventCallback;
16:8, "Int"	  BOOL           SuppressBackgroundThread;
20:12, "Int"	  BOOL           SuppressExternalCodecs;
		  void           GdiplusStartupInput( DebugEventProc debugEventCallback, BOOL           suppressBackgroundThread, BOOL           suppressExternalCodecs);
		};
24:16

==================================================

;;GETTEXTEX=28:20

		typedef struct _gettextex {
0:0, "UInt"	  DWORD  cb;
4:4, "UInt"	  DWORD  flags;
8:8, "UInt"	  UINT   codepage;
16:12, "Ptr"	  LPCSTR lpDefaultChar;
24:16, "Ptr"	  LPBOOL lpUsedDefChar;
		} GETTEXTEX;
32:20 [CHECK][Visual Studio states 28:20]

Visual Studio:
0:0
4:4
8:8
12:12
20:16

==================================================

;;GETTEXTLENGTHEX=8:8

		typedef struct _gettextlengthex {
0:0, "UInt"	  DWORD flags;
4:4, "UInt"	  UINT  codepage;
		} GETTEXTLENGTHEX;
8:8

==================================================

;;GLYPHSET=20:20

		typedef struct tagGLYPHSET {
0:0, "UInt"	  DWORD   cbThis;
4:4, "UInt"	  DWORD   flAccel;
8:8, "UInt"	  DWORD   cGlyphsSupported;
12:12, "UInt"	  DWORD   cRanges;
16:16, ""	  WCRANGE ranges[1];
		} GLYPHSET, *PGLYPHSET;
20:20

==================================================

;;GOPHER_FIND_DATA=1588:1588

;source: WinInet.h
;MAX_GOPHER_DISPLAY_TEXT := 128
;MAX_GOPHER_LOCATOR_LENGTH := 653

		typedef struct {
0:0, ""	  TCHAR    DisplayString[MAX_GOPHER_DISPLAY_TEXT + 1];
260:260, "UInt"	  DWORD    GopherType;
264:264, "UInt"	  DWORD    SizeLow;
268:268, "UInt"	  DWORD    SizeHigh;
272:272, ""	  FILETIME LastModificationTime;
280:280, ""	  TCHAR    Locator[MAX_GOPHER_LOCATOR_LENGTH + 1];
		} GOPHER_FIND_DATA, *LPGOPHER_FIND_DATA;
1588:1588

==================================================

;;GUID=16:16

		typedef struct _GUID {
0:0, "UInt"	  DWORD Data1;
4:4, "UShort"	  WORD  Data2;
6:6, "UShort"	  WORD  Data3;
8:8, ""	  BYTE  Data4[8];
		} GUID;
16:16

==================================================

;;GUITHREADINFO=72:48

		typedef struct tagGUITHREADINFO {
0:0, "UInt"	  DWORD cbSize;
4:4, "UInt"	  DWORD flags;
8:8, "Ptr"	  HWND  hwndActive;
16:12, "Ptr"	  HWND  hwndFocus;
24:16, "Ptr"	  HWND  hwndCapture;
32:20, "Ptr"	  HWND  hwndMenuOwner;
40:24, "Ptr"	  HWND  hwndMoveSize;
48:28, "Ptr"	  HWND  hwndCaret;
56:32, ""	  RECT  rcCaret;
		} GUITHREADINFO, *PGUITHREADINFO;
72:48

==================================================

;;HDITEM=72:48

		typedef struct _HDITEM {
0:0, "UInt"	  UINT    mask;
4:4, "Int"	  int     cxy;
8:8, "Ptr"	  LPTSTR  pszText;
16:12, "Ptr"	  HBITMAP hbm;
24:16, "Int"	  int     cchTextMax;
28:20, "Int"	  int     fmt;
32:24, "Ptr"	  LPARAM  lParam;
		#if (_WIN32_IE >= 0x0300)
40:28, "Int"	  int     iImage;
44:32, "Int"	  int     iOrder;
		#endif
		#if (_WIN32_IE >= 0x0500)
48:36, "UInt"	  UINT    type;
56:40, "Ptr"	  void    *pvFilter;
		#endif
		#if (_WIN32_WINNT >= 0x0600)
64:44, "UInt"	  UINT    state;
		#endif
		} HDITEM, *LPHDITEM;
72:48

==================================================

;;HH_AKLINK=56:32

		typedef struct tagHH_AKLINK {
0:0, "Int"	  int     cbStruct;
4:4, "Int"	  BOOL    fReserved;
8:8, "Ptr"	  LPCTSTR pszKeywords;
16:12, "Ptr"	  LPCTSTR pszUrl;
24:16, "Ptr"	  LPCTSTR pszMsgText;
32:20, "Ptr"	  LPCTSTR pszMsgTitle;
40:24, "Ptr"	  LPCTSTR pszWindow;
48:28, "Int"	  BOOL    fIndexOnFail;
		} HH_AKLINK;
56:32

==================================================

;;HIGHCONTRAST=16:12

		typedef struct tagHIGHCONTRAST {
0:0, "UInt"	  UINT   cbSize;
4:4, "UInt"	  DWORD  dwFlags;
8:8, "Ptr"	  LPTSTR lpszDefaultScheme;
		} HIGHCONTRAST, *LPHIGHCONTRAST;
16:12

==================================================

;;HOSTENT=32:16

		typedef struct hostent {
0:0, "Ptr"	  char  *h_name;
8:4, "Ptr"	  char  **h_aliases;
16:8, "Short"	  short h_addrtype;
18:10, "Short"	  short h_length;
24:12, "Ptr"	  char  **h_addr_list;
		} HOSTENT, *PHOSTENT, *LPHOSTENT;
32:16

==================================================

;;ICONINFO=32:20

		typedef struct _ICONINFO {
0:0, "Int"	  BOOL    fIcon;
4:4, "UInt"	  DWORD   xHotspot;
8:8, "UInt"	  DWORD   yHotspot;
16:12, "Ptr"	  HBITMAP hbmMask;
24:16, "Ptr"	  HBITMAP hbmColor;
		} ICONINFO, *PICONINFO;
32:20

==================================================

;;ICONMETRICS=108:108

		typedef struct tagICONMETRICS {
0:0, "UInt"	  UINT    cbSize;
4:4, "Int"	  int     iHorzSpacing;
8:8, "Int"	  int     iVertSpacing;
12:12, "Int"	  int     iTitleWrap;
16:16, ""	  LOGFONT lfFont;
		} ICONMETRICS, *PICONMETRICS, *LPICONMETRICS;
108:108

==================================================

;;IMAGELISTDRAWPARAMS=88:68

		typedef struct _IMAGELISTDRAWPARAMS {
0:0, "UInt"	  DWORD      cbSize;
8:4, "Ptr"	  HIMAGELIST himl;
16:8, "Int"	  int        i;
24:12, "Ptr"	  HDC        hdcDst;
32:16, "Int"	  int        x;
36:20, "Int"	  int        y;
40:24, "Int"	  int        cx;
44:28, "Int"	  int        cy;
48:32, "Int"	  int        xBitmap;
52:36, "Int"	  int        yBitmap;
56:40, "UInt"	  COLORREF   rgbBk;
60:44, "UInt"	  COLORREF   rgbFg;
64:48, "UInt"	  UINT       fStyle;
68:52, "UInt"	  DWORD      dwRop;
72:56, "UInt"	  DWORD      fState;
76:60, "UInt"	  DWORD      Frame;
80:64, "UInt"	  DWORD      crEffect;
		} IMAGELISTDRAWPARAMS;
88:68

==================================================

;;IN6_ADDR=16:16

		typedef struct in6_addr {
0:0, ""	  union {
		    u_char  Byte[16];
		    u_short Word[8];
		  } u;
		} IN6_ADDR, *PIN6_ADDR, FAR *LPIN6_ADDR;
16:16

==================================================

;;IN_ADDR=4:4

		typedef struct in_addr {
0:0, ""	  union {
		    struct {
		      u_char s_b1,s_b2,s_b3,s_b4;
		    } S_un_b;
		    struct {
		      u_short s_w1,s_w2;
		    } S_un_w;
		    u_long S_addr;
		  } S_un;
		} IN_ADDR, *PIN_ADDR, FAR *LPIN_ADDR;
4:4

==================================================

;;INITCOMMONCONTROLSEX=8:8

		typedef struct tagINITCOMMONCONTROLSEX {
0:0, "UInt"	  DWORD dwSize;
4:4, "UInt"	  DWORD dwICC;
		} INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
8:8

==================================================

;;ITEMIDLIST=3:3

		typedef struct _ITEMIDLIST {
0:0, ""	  SHITEMID mkid;
		} ITEMIDLIST;
3:3

==================================================

;;LIST_ENTRY=16:8

		typedef struct _LIST_ENTRY {
0:0, "Ptr"	  struct _LIST_ENTRY  *Flink;
8:4, "Ptr"	  struct _LIST_ENTRY  *Blink;
		} LIST_ENTRY, *PLIST_ENTRY;
16:8

==================================================

;;LOADED_IMAGE=88:48

		typedef struct _LOADED_IMAGE {
0:0, "Ptr"	  PSTR                  ModuleName;
8:4, "Ptr"	  HANDLE                hFile;
16:8, "Ptr"	  PUCHAR                MappedAddress;
24:12, "Ptr"	  PIMAGE_NT_HEADERS32   FileHeader;
32:16, "Ptr"	  PIMAGE_SECTION_HEADER LastRvaSection;
40:20, "UInt"	  ULONG                 NumberOfSections;
44:24, "Ptr"	  PIMAGE_SECTION_HEADER Sections;
52:28, "UInt"	  ULONG                 Characteristics;
56:32, "UChar"	  BOOLEAN               fSystemImage;
57:33, "UChar"	  BOOLEAN               fDOSImage;
58:34, "UChar"	  BOOLEAN               fReadOnly;
59:35, "UChar"	  UCHAR                 Version;
64:36, ""	  LIST_ENTRY            Links;
80:44, "UInt"	  ULONG                 SizeOfImage;
		} LOADED_IMAGE, *PLOADED_IMAGE;
88:48

==================================================

;;LOGFONT=92:92

;source: wingdi.h
;LF_FACESIZE := 32

		typedef struct tagLOGFONT {
0:0, "Int"	  LONG  lfHeight;
4:4, "Int"	  LONG  lfWidth;
8:8, "Int"	  LONG  lfEscapement;
12:12, "Int"	  LONG  lfOrientation;
16:16, "Int"	  LONG  lfWeight;
20:20, "UChar"	  BYTE  lfItalic;
21:21, "UChar"	  BYTE  lfUnderline;
22:22, "UChar"	  BYTE  lfStrikeOut;
23:23, "UChar"	  BYTE  lfCharSet;
24:24, "UChar"	  BYTE  lfOutPrecision;
25:25, "UChar"	  BYTE  lfClipPrecision;
26:26, "UChar"	  BYTE  lfQuality;
27:27, "UChar"	  BYTE  lfPitchAndFamily;
28:28, ""	  TCHAR lfFaceName[LF_FACESIZE];
		} LOGFONT, *PLOGFONT;
92:92

==================================================

;;LOGFONTA=60:60

;source: wingdi.h
;LF_FACESIZE := 32

		typedef struct tagLOGFONTA {
0:0, "Int"	  LONG lfHeight;
4:4, "Int"	  LONG lfWidth;
8:8, "Int"	  LONG lfEscapement;
12:12, "Int"	  LONG lfOrientation;
16:16, "Int"	  LONG lfWeight;
20:20, "UChar"	  BYTE lfItalic;
21:21, "UChar"	  BYTE lfUnderline;
22:22, "UChar"	  BYTE lfStrikeOut;
23:23, "UChar"	  BYTE lfCharSet;
24:24, "UChar"	  BYTE lfOutPrecision;
25:25, "UChar"	  BYTE lfClipPrecision;
26:26, "UChar"	  BYTE lfQuality;
27:27, "UChar"	  BYTE lfPitchAndFamily;
28:28, ""	  CHAR lfFaceName[LF_FACESIZE];
		} LOGFONTA, *PLOGFONTA, *NPLOGFONTA, *LPLOGFONTA;
60:60

==================================================

;;LOGFONTW=92:92

;source: wingdi.h
;LF_FACESIZE := 32

;link (it didn't appear in search results, I modified the LOGFONTA url):
;tagLOGFONTW | Microsoft Docs
;https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/ns-wingdi-taglogfontw

		typedef struct tagLOGFONTW {
0:0, "Int"	  LONG  lfHeight;
4:4, "Int"	  LONG  lfWidth;
8:8, "Int"	  LONG  lfEscapement;
12:12, "Int"	  LONG  lfOrientation;
16:16, "Int"	  LONG  lfWeight;
20:20, "UChar"	  BYTE  lfItalic;
21:21, "UChar"	  BYTE  lfUnderline;
22:22, "UChar"	  BYTE  lfStrikeOut;
23:23, "UChar"	  BYTE  lfCharSet;
24:24, "UChar"	  BYTE  lfOutPrecision;
25:25, "UChar"	  BYTE  lfClipPrecision;
26:26, "UChar"	  BYTE  lfQuality;
27:27, "UChar"	  BYTE  lfPitchAndFamily;
28:28, ""	  WCHAR lfFaceName[LF_FACESIZE];
		} LOGFONTW, *PLOGFONTW, *NPLOGFONTW, *LPLOGFONTW;
92:92

==================================================

;;LOGPALETTE=8:8

		typedef struct tagLOGPALETTE {
0:0, "UShort"	  WORD         palVersion;
2:2, "UShort"	  WORD         palNumEntries;
4:4, ""	  PALETTEENTRY palPalEntry[1];
		} LOGPALETTE;
8:8

==================================================

;;LOGPEN=16:16

		typedef struct tagLOGPEN {
0:0, "UInt"	  UINT     lopnStyle;
4:4, "UInt64"	  POINT    lopnWidth;
12:12, "UInt"	  COLORREF lopnColor;
		} LOGPEN, *PLOGPEN;
16:16

==================================================

;;LUID=8:8

		typedef struct _LUID {
0:0, "UInt"	  DWORD LowPart;
4:4, "Int"	  LONG  HighPart;
		} LUID, *PLUID;
8:8

==================================================

;;LUID_AND_ATTRIBUTES=12:12

		typedef struct _LUID_AND_ATTRIBUTES {
0:0, ""	  LUID  Luid;
8:8, "UInt"	  DWORD Attributes;
		} LUID_AND_ATTRIBUTES, *PLUID_AND_ATTRIBUTES;
12:12

==================================================

;;LVITEM=88:60

		typedef struct {
0:0, "UInt"	  UINT   mask;
4:4, "Int"	  int    iItem;
8:8, "Int"	  int    iSubItem;
12:12, "UInt"	  UINT   state;
16:16, "UInt"	  UINT   stateMask;
24:20, "Ptr"	  LPTSTR pszText;
32:24, "Int"	  int    cchTextMax;
36:28, "Int"	  int    iImage;
40:32, "Ptr"	  LPARAM lParam;
		#if (_WIN32_IE >= 0x0300)
48:36, "Int"	  int    iIndent;
		#endif
		#if (_WIN32_WINNT >= 0x0501)
52:40, "Int"	  int    iGroupId;
56:44, "UInt"	  UINT   cColumns;
64:48, "Ptr"	  PUINT  puColumns;
		#endif
		#if (_WIN32_WINNT >= 0x0600)
72:52, "Ptr"	  int    *piColFmt;
80:56, "Int"	  int    iGroup;
		#endif
		} LVITEM, *LPLVITEM;
88:60

==================================================

;;MDICREATESTRUCT=56:36

		typedef struct tagMDICREATESTRUCT {
0:0, "Ptr"	  LPCTSTR szClass;
8:4, "Ptr"	  LPCTSTR szTitle;
16:8, "Ptr"	  HANDLE  hOwner;
24:12, "Int"	  int     x;
28:16, "Int"	  int     y;
32:20, "Int"	  int     cx;
36:24, "Int"	  int     cy;
40:28, "UInt"	  DWORD   style;
48:32, "Ptr"	  LPARAM  lParam;
		} MDICREATESTRUCT, *LPMDICREATESTRUCT;
56:36

==================================================

;;MEASUREITEMSTRUCT=32:24

		typedef struct tagMEASUREITEMSTRUCT {
0:0, "UInt"	  UINT      CtlType;
4:4, "UInt"	  UINT      CtlID;
8:8, "UInt"	  UINT      itemID;
12:12, "UInt"	  UINT      itemWidth;
16:16, "UInt"	  UINT      itemHeight;
24:20, "UPtr"	  ULONG_PTR itemData;
		} MEASUREITEMSTRUCT, *PMEASUREITEMSTRUCT, *LPMEASUREITEMSTRUCT;
32:24

==================================================

;;MEMORY_BASIC_INFORMATION=48:28

		typedef struct _MEMORY_BASIC_INFORMATION {
0:0, "Ptr"	  PVOID  BaseAddress;
8:4, "Ptr"	  PVOID  AllocationBase;
16:8, "UInt"	  DWORD  AllocationProtect;
24:12, "UPtr"	  SIZE_T RegionSize;
32:16, "UInt"	  DWORD  State;
36:20, "UInt"	  DWORD  Protect;
40:24, "UInt"	  DWORD  Type;
		} MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION;
48:28

==================================================

;;MENUBARINFO=48:32

;note the use of bit fields for fBarFocused/fFocused which appear in the same BOOL
;fBarFocused := 1 & NumGet(&MENUBARINFO, A_PtrSize=8?40:28, "UInt")
;fFocused := !!(2 & NumGet(&MENUBARINFO, A_PtrSize=8?40:28, "UInt"))

		typedef struct tagMENUBARINFO {
0:0, "UInt"	  DWORD cbSize;
4:4, ""	  RECT  rcBar;
24:20, "Ptr"	  HMENU hMenu;
32:24, "Ptr"	  HWND  hwndMenu;
40:28, "Int"	  BOOL  fBarFocused : 1;
		  BOOL  fFocused : 1;
		} MENUBARINFO, *PMENUBARINFO, *LPMENUBARINFO;
48:32

==================================================

;;MENUINFO=40:28

		typedef struct tagMENUINFO {
0:0, "UInt"	  DWORD     cbSize;
4:4, "UInt"	  DWORD     fMask;
8:8, "UInt"	  DWORD     dwStyle;
12:12, "UInt"	  UINT      cyMax;
16:16, "Ptr"	  HBRUSH    hbrBack;
24:20, "UInt"	  DWORD     dwContextHelpID;
32:24, "UPtr"	  ULONG_PTR dwMenuData;
		} MENUINFO, *LPMENUINFO, const *LPCMENUINFO;
40:28

==================================================

;;MENUITEMINFO=80:48

		typedef struct tagMENUITEMINFO {
0:0, "UInt"	  UINT      cbSize;
4:4, "UInt"	  UINT      fMask;
8:8, "UInt"	  UINT      fType;
12:12, "UInt"	  UINT      fState;
16:16, "UInt"	  UINT      wID;
24:20, "Ptr"	  HMENU     hSubMenu;
32:24, "Ptr"	  HBITMAP   hbmpChecked;
40:28, "Ptr"	  HBITMAP   hbmpUnchecked;
48:32, "UPtr"	  ULONG_PTR dwItemData;
56:36, "Ptr"	  LPTSTR    dwTypeData;
64:40, "UInt"	  UINT      cch;
72:44, "Ptr"	  HBITMAP   hbmpItem;
		} MENUITEMINFO, *LPMENUITEMINFO;
80:48

==================================================

;;MIDIOUTCAPS=84:84

;source: mmsyscom.h
;MAXPNAMELEN := 32

		typedef struct {
0:0, "UShort"	  WORD      wMid;
2:2, "UShort"	  WORD      wPid;
4:4, "UInt"	  MMVERSION vDriverVersion;
8:8, ""	  TCHAR     szPname[MAXPNAMELEN];
72:72, "UShort"	  WORD      wTechnology;
74:74, "UShort"	  WORD      wVoices;
76:76, "UShort"	  WORD      wNotes;
78:78, "UShort"	  WORD      wChannelMask;
80:80, "UInt"	  DWORD     dwSupport;
		} MIDIOUTCAPS;
84:84

==================================================

;;MINIMIZEDMETRICS=20:20

		typedef struct tagMINIMIZEDMETRICS {
0:0, "UInt"	  UINT cbSize;
4:4, "Int"	  int  iWidth;
8:8, "Int"	  int  iHorzGap;
12:12, "Int"	  int  iVertGap;
16:16, "Int"	  int  iArrange;
		} MINIMIZEDMETRICS, *PMINIMIZEDMETRICS, *LPMINIMIZEDMETRICS;
20:20

==================================================

;;MINMAXINFO=40:40

		typedef struct tagMINMAXINFO {
0:0, "UInt64"	  POINT ptReserved;
8:8, "UInt64"	  POINT ptMaxSize;
16:16, "UInt64"	  POINT ptMaxPosition;
24:24, "UInt64"	  POINT ptMinTrackSize;
32:32, "UInt64"	  POINT ptMaxTrackSize;
		} MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
40:40

==================================================

;;MODULEENTRY32=1080:1064

;source: TlHelp32.h
;MAX_MODULE_NAME32 := 255

;source: minwindef.h
;MAX_PATH := 260

		typedef struct tagMODULEENTRY32 {
0:0, "UInt"	  DWORD   dwSize;
4:4, "UInt"	  DWORD   th32ModuleID;
8:8, "UInt"	  DWORD   th32ProcessID;
12:12, "UInt"	  DWORD   GlblcntUsage;
16:16, "UInt"	  DWORD   ProccntUsage;
24:20, "Ptr"	  BYTE    *modBaseAddr;
32:24, "UInt"	  DWORD   modBaseSize;
40:28, "Ptr"	  HMODULE hModule;
48:32, ""	  TCHAR   szModule[MAX_MODULE_NAME32 + 1];
560:544, ""	  TCHAR   szExePath[MAX_PATH];
		} MODULEENTRY32, *PMODULEENTRY32;
1080:1064

==================================================

;;MONITORINFO=40:40

		typedef struct tagMONITORINFO {
0:0, "UInt"	  DWORD cbSize;
4:4, ""	  RECT  rcMonitor;
20:20, ""	  RECT  rcWork;
36:36, "UInt"	  DWORD dwFlags;
		} MONITORINFO, *LPMONITORINFO;
40:40

==================================================

;;MONITORINFOEX=104:104

;source: wingdi.h
;CCHDEVICENAME := 32

		typedef struct tagMONITORINFOEX {
0:0, "UInt"	  DWORD cbSize;
4:4, ""	  RECT  rcMonitor;
20:20, ""	  RECT  rcWork;
36:36, "UInt"	  DWORD dwFlags;
40:40, ""	  TCHAR szDevice[CCHDEVICENAME];
		} MONITORINFOEX, *LPMONITORINFOEX;
104:104

==================================================

;;MOUSEKEYS=28:28

		typedef struct _MOUSEKEYS {
0:0, "UInt"	  DWORD cbSize;
4:4, "UInt"	  DWORD dwFlags;
8:8, "UInt"	  DWORD iMaxSpeed;
12:12, "UInt"	  DWORD iTimeToMaxSpeed;
16:16, "UInt"	  DWORD iCtrlSpeed;
20:20, "UInt"	  DWORD dwReserved1;
24:24, "UInt"	  DWORD dwReserved2;
		} MOUSEKEYS, *LPMOUSEKEYS;
28:28

==================================================

;;MSG=48:28

		typedef struct tagMSG {
0:0, "Ptr"	  HWND   hwnd;
8:4, "UInt"	  UINT   message;
16:8, "UPtr"	  WPARAM wParam;
24:12, "Ptr"	  LPARAM lParam;
32:16, "UInt"	  DWORD  time;
36:20, "UInt64"	  POINT  pt;
		} MSG, *PMSG, *LPMSG;
48:28

==================================================

;;MSGBOXPARAMS=80:40

		typedef struct tagMSGBOXPARAMSA {
0:0, "UInt"	  UINT           cbSize;
8:4, "Ptr"	  HWND           hwndOwner;
16:8, "Ptr"	  HINSTANCE      hInstance;
24:12, "Ptr"	  LPCSTR         lpszText;
32:16, "Ptr"	  LPCSTR         lpszCaption;
40:20, "UInt"	  DWORD          dwStyle;
48:24, "Ptr"	  LPCSTR         lpszIcon;
56:28, "UPtr"	  DWORD_PTR      dwContextHelpId;
64:32, "Ptr"	  MSGBOXCALLBACK lpfnMsgBoxCallback;
72:36, "UInt"	  DWORD          dwLanguageId;
		} MSGBOXPARAMSA, *PMSGBOXPARAMSA, *LPMSGBOXPARAMSA;
80:40

==================================================

;;MULTI_QI=24:12

		typedef struct tagMULTI_QI {
0:0, "Ptr"	  const IID *pIID;
8:4, "Ptr"	  IUnknown  *pItf;
16:8, "Int"	  HRESULT   hr;
		} MULTI_QI;
24:12

==================================================

;;NMHDR=24:12

;[CHECK][parameter size][page states idFrom as UINT and as UINT_PTR, if UINT, the struct should be 16:12]
;[a test on Visual Studio shows idFrom has size 8 in x64 processes, implying UINT_PTR]
;_nmhdr | Microsoft Docs
;https://docs.microsoft.com/en-us/windows/desktop/api/richedit/ns-richedit-_nmhdr

		typedef struct _nmhdr {
0:0, "Ptr"	  HWND hwndFrom;
8:4, "UPtr"	  UINT idFrom;
16:8, "UInt"	  UINT code;
		} NMHDR;
24:12

==================================================

;;NMLVKEYDOWN=30:18

		typedef struct tagLVKEYDOWN {
0:0, ""	  NMHDR hdr;
24:12, "UShort"	  WORD  wVKey;
28:16, "UInt"	  UINT  flags;
		} NMLVKEYDOWN, *LPNMLVKEYDOWN;
32:20 [CHECK][Visual Studio states 30:18]

Visual Studio:
0:0
24:12
26:14

==================================================

;;NONCLIENTMETRICS=504:504

		typedef struct tagNONCLIENTMETRICS {
0:0, "UInt"	  UINT    cbSize;
4:4, "Int"	  int     iBorderWidth;
8:8, "Int"	  int     iScrollWidth;
12:12, "Int"	  int     iScrollHeight;
16:16, "Int"	  int     iCaptionWidth;
20:20, "Int"	  int     iCaptionHeight;
24:24, ""	  LOGFONT lfCaptionFont;
116:116, "Int"	  int     iSmCaptionWidth;
120:120, "Int"	  int     iSmCaptionHeight;
124:124, ""	  LOGFONT lfSmCaptionFont;
216:216, "Int"	  int     iMenuWidth;
220:220, "Int"	  int     iMenuHeight;
224:224, ""	  LOGFONT lfMenuFont;
316:316, ""	  LOGFONT lfStatusFont;
408:408, ""	  LOGFONT lfMessageFont;
		#if (WINVER >= 0x0600)
500:500, "Int"	  int     iPaddedBorderWidth;
		#endif
		} NONCLIENTMETRICS, *PNONCLIENTMETRICS, *LPNONCLIENTMETRICS;
504:504

==================================================

;;NOTIFYICONDATA=976:956

;link:
;NOTIFYICONDATA structure (Windows)
;https://web.archive.org/web/20141030084122/http://msdn.microsoft.com/en-us/library/windows/desktop/bb773352(v=vs.85).aspx

		typedef struct _NOTIFYICONDATA {
0:0, "UInt"	  DWORD cbSize;
8:4, "Ptr"	  HWND  hWnd;
16:8, "UInt"	  UINT  uID;
20:12, "UInt"	  UINT  uFlags;
24:16, "UInt"	  UINT  uCallbackMessage;
32:20, "Ptr"	  HICON hIcon;
		#if ...
		  TCHAR  szTip[64];
		#else
40:24, ""	  TCHAR  szTip[128];
		#endif
296:280, "UInt"	  DWORD dwState;
300:284, "UInt"	  DWORD dwStateMask;
304:288, ""	  TCHAR szInfo[256];
816:800, "UInt"	  union {
		    UINT uTimeout;
		    UINT uVersion;
		  };
820:804, ""	  TCHAR szInfoTitle[64];
948:932, "UInt"	  DWORD dwInfoFlags;
952:936, ""	  GUID  guidItem;
968:952, "Ptr"	  HICON hBalloonIcon;
		} NOTIFYICONDATA, *PNOTIFYICONDATA;
976:956

==================================================

;;NOTIFYITEM=56:40

;Is there a way to put an icon outside the hidden tray icons by default? - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=76&t=58992

;NOTIFYITEM
;https://www.geoffchappell.com/studies/windows/shell/explorer/interfaces/notifyitem.htm
;The structure’s name is known from Microsoft’s symbol files. Names (and types) for the members are invented.

		typedef struct tagNOTIFYITEM {
0:0, "Ptr"	    PWSTR pszExeName;
8:4, "Ptr"	    PWSTR pszTip;
16:8, "Ptr"	    HICON hIcon;
24:12, "Ptr"	    HWND hWnd;
32:16, "UInt"	    DWORD dwPreference;
36:20, "UInt"	    UINT uID;
40:24, ""	    GUID guidItem;
		} NOTIFYITEM;
56:40

==================================================

;;OLECMD=8:8

		typedef struct _tagOLECMD {
0:0, "UInt"	  ULONG cmdID;
4:4, "UInt"	  DWORD cmdf;
		} OLECMD;
8:8

==================================================

;;OPENFILENAME_NT4=136:76

		typedef struct tagOFN_NT4A {
0:0, "UInt"	  DWORD         lStructSize;
8:4, "Ptr"	  HWND          hwndOwner;
16:8, "Ptr"	  HINSTANCE     hInstance;
24:12, "Ptr"	  LPCSTR        lpstrFilter;
32:16, "Ptr"	  LPSTR         lpstrCustomFilter;
40:20, "UInt"	  DWORD         nMaxCustFilter;
44:24, "UInt"	  DWORD         nFilterIndex;
48:28, "Ptr"	  LPSTR         lpstrFile;
56:32, "UInt"	  DWORD         nMaxFile;
64:36, "Ptr"	  LPSTR         lpstrFileTitle;
72:40, "UInt"	  DWORD         nMaxFileTitle;
80:44, "Ptr"	  LPCSTR        lpstrInitialDir;
88:48, "Ptr"	  LPCSTR        lpstrTitle;
96:52, "UInt"	  DWORD         Flags;
100:56, "UShort"	  WORD          nFileOffset;
102:58, "UShort"	  WORD          nFileExtension;
104:60, "Ptr"	  LPCSTR        lpstrDefExt;
112:64, "Ptr"	  LPARAM        lCustData;
120:68, "Ptr"	  LPOFNHOOKPROC lpfnHook;
128:72, "Ptr"	  LPCSTR        lpTemplateName;
		} OPENFILENAME_NT4A, *LPOPENFILENAME_NT4A;
136:76

==================================================

;;OPENFILENAMEA=152:88

		typedef struct tagOFNA {
0:0, "UInt"	  DWORD         lStructSize;
8:4, "Ptr"	  HWND          hwndOwner;
16:8, "Ptr"	  HINSTANCE     hInstance;
24:12, "Ptr"	  LPCSTR        lpstrFilter;
32:16, "Ptr"	  LPSTR         lpstrCustomFilter;
40:20, "UInt"	  DWORD         nMaxCustFilter;
44:24, "UInt"	  DWORD         nFilterIndex;
48:28, "Ptr"	  LPSTR         lpstrFile;
56:32, "UInt"	  DWORD         nMaxFile;
64:36, "Ptr"	  LPSTR         lpstrFileTitle;
72:40, "UInt"	  DWORD         nMaxFileTitle;
80:44, "Ptr"	  LPCSTR        lpstrInitialDir;
88:48, "Ptr"	  LPCSTR        lpstrTitle;
96:52, "UInt"	  DWORD         Flags;
100:56, "UShort"	  WORD          nFileOffset;
102:58, "UShort"	  WORD          nFileExtension;
104:60, "Ptr"	  LPCSTR        lpstrDefExt;
112:64, "Ptr"	  LPARAM        lCustData;
120:68, "Ptr"	  LPOFNHOOKPROC lpfnHook;
128:72, "Ptr"	  LPCSTR        lpTemplateName;
136:76, "Ptr"	  LPEDITMENU    lpEditInfo;
144:80, "Ptr"	  LPCSTR        lpstrPrompt;
152:88, "Ptr"	  void          *pvReserved;
160:92, "UInt"	  DWORD         dwReserved;
164:96, "UInt"	  DWORD         FlagsEx;
		} OPENFILENAMEA, *LPOPENFILENAMEA;
168:96 [CHECK][Visual Studio states 152:88]
[one definition has lpEditInfo and lpstrPrompt, only appear if #ifdef _MAC is true]

==================================================

;;OPENFILENAMEW=152:88

		typedef struct tagOFN {
0:0, "UInt"	  DWORD         lStructSize;
8:4, "Ptr"	  HWND          hwndOwner;
16:8, "Ptr"	  HINSTANCE     hInstance;
24:12, "Ptr"	  LPCTSTR       lpstrFilter;
32:16, "Ptr"	  LPTSTR        lpstrCustomFilter;
40:20, "UInt"	  DWORD         nMaxCustFilter;
44:24, "UInt"	  DWORD         nFilterIndex;
48:28, "Ptr"	  LPTSTR        lpstrFile;
56:32, "UInt"	  DWORD         nMaxFile;
64:36, "Ptr"	  LPTSTR        lpstrFileTitle;
72:40, "UInt"	  DWORD         nMaxFileTitle;
80:44, "Ptr"	  LPCTSTR       lpstrInitialDir;
88:48, "Ptr"	  LPCTSTR       lpstrTitle;
96:52, "UInt"	  DWORD         Flags;
100:56, "UShort"	  WORD          nFileOffset;
102:58, "UShort"	  WORD          nFileExtension;
104:60, "Ptr"	  LPCTSTR       lpstrDefExt;
112:64, "Ptr"	  LPARAM        lCustData;
120:68, "Ptr"	  LPOFNHOOKPROC lpfnHook;
128:72, "Ptr"	  LPCTSTR       lpTemplateName;
		#if (_WIN32_WINNT >= 0x0500)
136:76, "Ptr"	  void          *pvReserved;
144:80, "UInt"	  DWORD         dwReserved;
148:84, "UInt"	  DWORD         FlagsEx;
		#endif
		} OPENFILENAME, *LPOPENFILENAME;
152:88

==================================================

;;OSVERSIONINFO=276:276

		typedef struct _OSVERSIONINFO{
0:0, "UInt"	DWORD dwOSVersionInfoSize;
4:4, "UInt"	DWORD dwMajorVersion;
8:8, "UInt"	DWORD dwMinorVersion;
12:12, "UInt"	DWORD dwBuildNumber;
16:16, "UInt"	DWORD dwPlatformId;
20:20, ""	TCHAR szCSDVersion[128];
		} OSVERSIONINFO;
276:276

==================================================

;;OSVERSIONINFOEX=284:284

		typedef struct _OSVERSIONINFOEX {
0:0, "UInt"	  DWORD dwOSVersionInfoSize;
4:4, "UInt"	  DWORD dwMajorVersion;
8:8, "UInt"	  DWORD dwMinorVersion;
12:12, "UInt"	  DWORD dwBuildNumber;
16:16, "UInt"	  DWORD dwPlatformId;
20:20, ""	  TCHAR szCSDVersion[128];
276:276, "UShort"	  WORD  wServicePackMajor;
278:278, "UShort"	  WORD  wServicePackMinor;
280:280, "UShort"	  WORD  wSuiteMask;
282:282, "UChar"	  BYTE  wProductType;
283:283, "UChar"	  BYTE  wReserved;
		} OSVERSIONINFOEX, *POSVERSIONINFOEX, *LPOSVERSIONINFOEX;
284:284

==================================================

;;OVERLAPPED=32:20

		typedef struct _OVERLAPPED {
0:0, "UPtr"	  ULONG_PTR Internal;
8:4, "UPtr"	  ULONG_PTR InternalHigh;
16:8, ""	  union {
		    struct {
		      DWORD Offset;
		      DWORD OffsetHigh;
		    };
		    PVOID  Pointer;
		  };
24:16, "Ptr"	  HANDLE    hEvent;
		} OVERLAPPED, *LPOVERLAPPED;
32:20

==================================================

;;PAGESETUPDLG=128:84

		typedef struct tagPSDA {
0:0, "UInt"	  DWORD           lStructSize;
8:4, "Ptr"	  HWND            hwndOwner;
16:8, "Ptr"	  HGLOBAL         hDevMode;
24:12, "Ptr"	  HGLOBAL         hDevNames;
32:16, "UInt"	  DWORD           Flags;
36:20, "UInt64"	  POINT           ptPaperSize;
44:28, ""	  RECT            rtMinMargin;
60:44, ""	  RECT            rtMargin;
80:60, "Ptr"	  HINSTANCE       hInstance;
88:64, "Ptr"	  LPARAM          lCustData;
96:68, "Ptr"	  LPPAGESETUPHOOK lpfnPageSetupHook;
104:72, "Ptr"	  LPPAGEPAINTHOOK lpfnPagePaintHook;
112:76, "Ptr"	  LPCSTR          lpPageSetupTemplateName;
120:80, "Ptr"	  HGLOBAL         hPageSetupTemplate;
		} PAGESETUPDLGA, *LPPAGESETUPDLGA;
128:84

==================================================

;;PALETTEENTRY=4:4

		typedef struct tagPALETTEENTRY {
0:0, "UChar"	  BYTE peRed;
1:1, "UChar"	  BYTE peGreen;
2:2, "UChar"	  BYTE peBlue;
3:3, "UChar"	  BYTE peFlags;
		} PALETTEENTRY;
4:4

==================================================

;;PEB=712:472

		typedef struct _PEB {
0:0, ""	  BYTE                          Reserved1[2];
2:2, "UChar"	  BYTE                          BeingDebugged;
3:3, ""	  BYTE                          Reserved2[1];
4:4, ""	  PVOID                         Reserved3[2];
24:12, "Ptr"	  PPEB_LDR_DATA                 Ldr;
32:16, "Ptr"	  PRTL_USER_PROCESS_PARAMETERS  ProcessParameters;
40:20, ""	  PVOID                         Reserved4[3];
64:32, "Ptr"	  PVOID                         AtlThunkSListPtr;
72:36, "Ptr"	  PVOID                         Reserved5;
80:40, "UInt"	  ULONG                         Reserved6;
88:44, "Ptr"	  PVOID                         Reserved7;
96:48, "UInt"	  ULONG                         Reserved8;
100:52, "UInt"	  ULONG                         AtlThunkSListPtr32;
104:56, ""	  PVOID                         Reserved9[45];
464:236, ""	  BYTE                          Reserved10[96];
560:332, "Ptr"	  PPS_POST_PROCESS_INIT_ROUTINE PostProcessInitRoutine;
568:336, ""	  BYTE                          Reserved11[128];
696:464, ""	  PVOID                         Reserved12[1];
704:468, "UInt"	  ULONG                         SessionId;
		} PEB, *PPEB;
712:472

==================================================

;;POINT=8:8

		typedef struct tagPOINT {
0:0, "Int"	  LONG x;
4:4, "Int"	  LONG y;
		} POINT, *PPOINT;
8:8

==================================================

;;PREVENT_MEDIA_REMOVAL=1:1

		typedef struct _PREVENT_MEDIA_REMOVAL {
0:0, "UChar"	  BOOLEAN PreventMediaRemoval;
		} PREVENT_MEDIA_REMOVAL;
1:1

==================================================

;;PRINTDLG=120:66

		typedef struct tagPDA {
0:0, "UInt"	  DWORD           lStructSize;
8:4, "Ptr"	  HWND            hwndOwner;
16:8, "Ptr"	  HGLOBAL         hDevMode;
24:12, "Ptr"	  HGLOBAL         hDevNames;
32:16, "Ptr"	  HDC             hDC;
40:20, "UInt"	  DWORD           Flags;
44:24, "UShort"	  WORD            nFromPage;
46:26, "UShort"	  WORD            nToPage;
48:28, "UShort"	  WORD            nMinPage;
50:30, "UShort"	  WORD            nMaxPage;
52:32, "UShort"	  WORD            nCopies;
56:36, "Ptr"	  HINSTANCE       hInstance;
64:40, "Ptr"	  LPARAM          lCustData;
72:44, "Ptr"	  LPPRINTHOOKPROC lpfnPrintHook;
80:48, "Ptr"	  LPSETUPHOOKPROC lpfnSetupHook;
88:52, "Ptr"	  LPCSTR          lpPrintTemplateName;
96:56, "Ptr"	  LPCSTR          lpSetupTemplateName;
104:60, "Ptr"	  HGLOBAL         hPrintTemplate;
112:64, "Ptr"	  HGLOBAL         hSetupTemplate;
		} PRINTDLGA, *LPPRINTDLGA;
120:68 [CHECK][Visual Studio states 120:66]

==================================================

;;PRINTDLGEX=136:84

		typedef struct tagPDEXA {
0:0, "UInt"	  DWORD            lStructSize;
8:4, "Ptr"	  HWND             hwndOwner;
16:8, "Ptr"	  HGLOBAL          hDevMode;
24:12, "Ptr"	  HGLOBAL          hDevNames;
32:16, "Ptr"	  HDC              hDC;
40:20, "UInt"	  DWORD            Flags;
44:24, "UInt"	  DWORD            Flags2;
48:28, "UInt"	  DWORD            ExclusionFlags;
52:32, "UInt"	  DWORD            nPageRanges;
56:36, "UInt"	  DWORD            nMaxPageRanges;
64:40, "Ptr"	  LPPRINTPAGERANGE lpPageRanges;
72:44, "UInt"	  DWORD            nMinPage;
76:48, "UInt"	  DWORD            nMaxPage;
80:52, "UInt"	  DWORD            nCopies;
88:56, "Ptr"	  HINSTANCE        hInstance;
96:60, "Ptr"	  LPCSTR           lpPrintTemplateName;
104:64, "Ptr"	  LPUNKNOWN        lpCallback;
112:68, "UInt"	  DWORD            nPropertyPages;
120:72, "Ptr"	  HPROPSHEETPAGE   *lphPropertyPages;
128:76, "UInt"	  DWORD            nStartPage;
132:80, "UInt"	  DWORD            dwResultAction;
		} PRINTDLGEXA, *LPPRINTDLGEXA;
136:84

==================================================

;;PROCESS_BASIC_INFORMATION=48:24

;link:
;NtQueryInformationProcess function (winternl.h) - Win32 apps | Microsoft Docs
;https://docs.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntqueryinformationprocess

		typedef struct _PROCESS_BASIC_INFORMATION {
0:0, "Ptr"	    PVOID Reserved1;
8:4, "Ptr"	    PPEB PebBaseAddress;
16:8, ""	    PVOID Reserved2[2];
32:16, "UPtr"	    ULONG_PTR UniqueProcessId;
40:20, "Ptr"	    PVOID Reserved3;
		} PROCESS_BASIC_INFORMATION;
48:24

==================================================

;;PROCESS_INFORMATION=24:16

		typedef struct _PROCESS_INFORMATION {
0:0, "Ptr"	  HANDLE hProcess;
8:4, "Ptr"	  HANDLE hThread;
16:8, "UInt"	  DWORD  dwProcessId;
20:12, "UInt"	  DWORD  dwThreadId;
		} PROCESS_INFORMATION, *LPPROCESS_INFORMATION;
24:16

==================================================

;;PROPERTYKEY=20:20

		typedef struct _tagpropertykey {
0:0, ""	  GUID  fmtid;
16:16, "UInt"	  DWORD pid;
		} PROPERTYKEY;
20:20

==================================================

;;REBARBANDINFO=128:100

		typedef struct tagREBARBANDINFOA {
0:0, "UInt"	  UINT     cbSize;
4:4, "UInt"	  UINT     fMask;
8:8, "UInt"	  UINT     fStyle;
12:12, "UInt"	  COLORREF clrFore;
16:16, "UInt"	  COLORREF clrBack;
24:20, "Ptr"	  LPSTR    lpText;
32:24, "UInt"	  UINT     cch;
36:28, "Int"	  int      iImage;
40:32, "Ptr"	  HWND     hwndChild;
48:36, "UInt"	  UINT     cxMinChild;
52:40, "UInt"	  UINT     cyMinChild;
56:44, "UInt"	  UINT     cx;
64:48, "Ptr"	  HBITMAP  hbmBack;
72:52, "UInt"	  UINT     wID;
76:56, "UInt"	  UINT     cyChild;
80:60, "UInt"	  UINT     cyMaxChild;
84:64, "UInt"	  UINT     cyIntegral;
88:68, "UInt"	  UINT     cxIdeal;
96:72, "Ptr"	  LPARAM   lParam;
104:76, "UInt"	  UINT     cxHeader;
108:80, ""	  RECT     rcChevronLocation;
124:96, "UInt"	  UINT     uChevronState;
		} REBARBANDINFOA, *LPREBARBANDINFOA;
128:100

==================================================

;;RECT=16:16

		typedef struct _RECT {
0:0, "Int"	  LONG left;
4:4, "Int"	  LONG top;
8:8, "Int"	  LONG right;
12:12, "Int"	  LONG bottom;
		} RECT, *PRECT;
16:16

==================================================

;;REG_TZI_FORMAT=44:44

;link:
;_TIME_ZONE_INFORMATION | Microsoft Docs
;https://docs.microsoft.com/en-us/windows/desktop/api/timezoneapi/ns-timezoneapi-_time_zone_information

		typedef struct _REG_TZI_FORMAT
		{
0:0, "Int"	    LONG Bias;
4:4, "Int"	    LONG StandardBias;
8:8, "Int"	    LONG DaylightBias;
12:12, ""	    SYSTEMTIME StandardDate;
28:28, ""	    SYSTEMTIME DaylightDate;
		} REG_TZI_FORMAT;
44:44

==================================================

;;RGBQUAD=4:4

		typedef struct tagRGBQUAD {
0:0, "UChar"	  BYTE rgbBlue;
1:1, "UChar"	  BYTE rgbGreen;
2:2, "UChar"	  BYTE rgbRed;
3:3, "UChar"	  BYTE rgbReserved;
		} RGBQUAD;
4:4

==================================================

;;SAFEARRAY=32:24

		typedef struct tagSAFEARRAY {
0:0, "UShort"	  USHORT         cDims;
2:2, "UShort"	  USHORT         fFeatures;
4:4, "UInt"	  ULONG          cbElements;
8:8, "UInt"	  ULONG          cLocks;
16:12, "Ptr"	  PVOID          pvData;
24:16, ""	  SAFEARRAYBOUND rgsabound[1];
		} SAFEARRAY;
32:24

==================================================

;;SAFEARRAYBOUND=8:8

		typedef struct tagSAFEARRAYBOUND {
0:0, "UInt"	  ULONG cElements;
4:4, "Int"	  LONG  lLbound;
		} SAFEARRAYBOUND, *LPSAFEARRAYBOUND;
8:8

==================================================

;;SECURITY_ATTRIBUTES=24:12

		typedef struct _SECURITY_ATTRIBUTES {
0:0, "UInt"	  DWORD  nLength;
8:4, "Ptr"	  LPVOID lpSecurityDescriptor;
16:8, "Int"	  BOOL   bInheritHandle;
		} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
24:12

==================================================

;;SETTEXTEX=8:8

		typedef struct _settextex {
0:0, "UInt"	  DWORD flags;
4:4, "UInt"	  UINT  codepage;
		} SETTEXTEX;
8:8

==================================================

;;SHARDAPPIDINFOLINK=16:8

		typedef struct SHARDAPPIDINFOLINK {
0:0, "Ptr"	  IShellLink *psl;
8:4, "Ptr"	  PCWSTR     pszAppID;
		} SHARDAPPIDINFOLINK;
16:8

==================================================

;;SHELLEXECUTEINFO=112:60

		typedef struct _SHELLEXECUTEINFO {
0:0, "UInt"	  DWORD     cbSize;
4:4, "UInt"	  ULONG     fMask;
8:8, "Ptr"	  HWND      hwnd;
16:12, "Ptr"	  LPCTSTR   lpVerb;
24:16, "Ptr"	  LPCTSTR   lpFile;
32:20, "Ptr"	  LPCTSTR   lpParameters;
40:24, "Ptr"	  LPCTSTR   lpDirectory;
48:28, "Int"	  int       nShow;
56:32, "Ptr"	  HINSTANCE hInstApp;
64:36, "Ptr"	  LPVOID    lpIDList;
72:40, "Ptr"	  LPCTSTR   lpClass;
80:44, "Ptr"	  HKEY      hkeyClass;
88:48, "UInt"	  DWORD     dwHotKey;
96:52, "Ptr"	  union {
		    HANDLE hIcon;
		    HANDLE hMonitor;
		  } DUMMYUNIONNAME;
104:56, "Ptr"  HANDLE    hProcess;
		} SHELLEXECUTEINFO, *LPSHELLEXECUTEINFO;
112:60

==================================================

;;SHELLSTATE=32:32

		typedef struct {
0:0, "Int"	  BOOL  fShowAllObjects : 1;
		  BOOL  fShowExtensions : 1;
		  BOOL  fNoConfirmRecycle : 1;
		  BOOL  fShowSysFiles : 1;
		  BOOL  fShowCompColor : 1;
		  BOOL  fDoubleClickInWebView : 1;
		  BOOL  fDesktopHTML : 1;
		  BOOL  fWin95Classic : 1;
		  BOOL  fDontPrettyPath : 1;
		  BOOL  fShowAttribCol : 1;
		  BOOL  fMapNetDrvBtn : 1;
		  BOOL  fShowInfoTip : 1;
		  BOOL  fHideIcons : 1;
		  BOOL  fWebView : 1;
		  BOOL  fFilter : 1;
		  BOOL  fShowSuperHidden : 1;
		  BOOL  fNoNetCrawling : 1;
4:4, "UInt"	  DWORD dwWin95Unused;
8:8, "UInt"	  UINT  uWin95Unused;
12:12, "Int"	  LONG  lParamSort;
16:16, "Int"	  int   iSortDirection;
20:20, "UInt"	  UINT  version;
24:24, "UInt"	  UINT  uNotUsed;
28:28, "Int"	  BOOL  fSepProcess : 1;
		  BOOL  fStartPanelOn : 1;
		  BOOL  fShowStartPage : 1;
		  BOOL  fAutoCheckSelect : 1;
		  BOOL  fIconsOnly : 1;
		  BOOL  fShowTypeOverlay : 1;
		  BOOL  fShowStatusBar : 1;
		  UINT  fSpareFlags : 9;
		} SHELLSTATEA, *LPSHELLSTATEA;
32:32

==================================================

;;SHFILEINFO=696:692

;source: minwindef.h
;MAX_PATH := 260

		typedef struct _SHFILEINFO {
0:0, "Ptr"	  HICON hIcon;
8:4, "Int"	  int   iIcon;
12:8, "UInt"	  DWORD dwAttributes;
16:12, ""	  TCHAR szDisplayName[MAX_PATH];
536:532, ""	  TCHAR szTypeName[80];
		} SHFILEINFO;
696:692

==================================================

;;SHFILEOPSTRUCT=56:30

		typedef struct _SHFILEOPSTRUCTA {
0:0, "Ptr"	  HWND         hwnd;
8:4, "UInt"	  UINT         wFunc;
16:8, "Ptr"	  PCZZSTR      pFrom;
24:12, "Ptr"	  PCZZSTR      pTo;
32:16, "UShort"	  FILEOP_FLAGS fFlags;
36:20, "Int"	  BOOL         fAnyOperationsAborted;
40:24, "Ptr"	  LPVOID       hNameMappings;
48:28, "Ptr"	  PCSTR        lpszProgressTitle;
		} SHFILEOPSTRUCTA, *LPSHFILEOPSTRUCTA;
56:32 [CHECK][Visual Studio states 56:30]

Visual Studio:
0:0
8:4
16:8
24:12
32:16
36:18
40:22
48:26

==================================================

;;SHITEMID=3:3

		typedef struct _SHITEMID {
0:0, "UShort"	  USHORT cb;
2:2, ""	  BYTE   abID[1];
		} SHITEMID;
4:4 [CHECK][padding at end][Visual Studio states 3:3]

==================================================

;;SHQUERYRBINFO=24:20

		typedef struct {
0:0, "UInt"	  DWORD   cbSize;
8:8, "Int64"	  __int64 i64Size;
16:16, "Int64"	  __int64 i64NumItems;
		} SHQUERYRBINFO, *LPSHQUERYRBINFO;
24:24 [CHECK][Visual Studio states 24:20]

Visual Studio:
0:0
8:4
16:12

==================================================

;;SIZE=8:8

		typedef struct tagSIZE {
0:0, "Int"	  LONG cx;
4:4, "Int"	  LONG cy;
		} SIZE, *PSIZE;
8:8

==================================================

;;SOUNDSENTRY=56:48

		typedef struct tagSOUNDSENTRY {
0:0, "UInt"	  UINT   cbSize;
4:4, "UInt"	  DWORD  dwFlags;
8:8, "UInt"	  DWORD  iFSTextEffect;
12:12, "UInt"	  DWORD  iFSTextEffectMSec;
16:16, "UInt"	  DWORD  iFSTextEffectColorBits;
20:20, "UInt"	  DWORD  iFSGrafEffect;
24:24, "UInt"	  DWORD  iFSGrafEffectMSec;
28:28, "UInt"	  DWORD  iFSGrafEffectColor;
32:32, "UInt"	  DWORD  iWindowsEffect;
36:36, "UInt"	  DWORD  iWindowsEffectMSec;
40:40, "Ptr"	  LPTSTR lpszWindowsEffectDLL;
48:44, "UInt"	  DWORD  iWindowsEffectOrdinal;
		} SOUNDSENTRY, *LPSOUNDSENTRY;
56:48

==================================================

;;SP_CLASSINSTALL_HEADER=8:8

		typedef struct _SP_CLASSINSTALL_HEADER {
0:0, "UInt"	  DWORD       cbSize;
4:4, "UInt"	  DI_FUNCTION InstallFunction;
		} SP_CLASSINSTALL_HEADER, *PSP_CLASSINSTALL_HEADER;
4:4

==================================================

;;SP_DEVINFO_DATA=32:28

		typedef struct _SP_DEVINFO_DATA {
0:0, "UInt"	  DWORD     cbSize;
4:4, ""	  GUID      ClassGuid;
20:20, "UInt"	  DWORD     DevInst;
24:24, "UPtr"	  ULONG_PTR Reserved;
		} SP_DEVINFO_DATA, *PSP_DEVINFO_DATA;
32:28

==================================================

;;SP_PROPCHANGE_PARAMS=20:20

		typedef struct _SP_PROPCHANGE_PARAMS {
0:0, ""	  SP_CLASSINSTALL_HEADER ClassInstallHeader;
8:8, "UInt"	  DWORD                  StateChange;
12:12, "UInt"	  DWORD                  Scope;
16:16, "UInt"	  DWORD                  HwProfile;
		} SP_PROPCHANGE_PARAMS, *PSP_PROPCHANGE_PARAMS;
24:24

==================================================

;;STARTUPINFO=104:68

		typedef struct _STARTUPINFO {
0:0, "UInt"	  DWORD  cb;
8:4, "Ptr"	  LPTSTR lpReserved;
16:8, "Ptr"	  LPTSTR lpDesktop;
24:12, "Ptr"	  LPTSTR lpTitle;
32:16, "UInt"	  DWORD  dwX;
36:20, "UInt"	  DWORD  dwY;
40:24, "UInt"	  DWORD  dwXSize;
44:28, "UInt"	  DWORD  dwYSize;
48:32, "UInt"	  DWORD  dwXCountChars;
52:36, "UInt"	  DWORD  dwYCountChars;
56:40, "UInt"	  DWORD  dwFillAttribute;
60:44, "UInt"	  DWORD  dwFlags;
64:48, "UShort"	  WORD   wShowWindow;
66:50, "UShort"	  WORD   cbReserved2;
72:52, "Ptr"	  LPBYTE lpReserved2;
80:56, "Ptr"	  HANDLE hStdInput;
88:60, "Ptr"	  HANDLE hStdOutput;
96:64, "Ptr"	  HANDLE hStdError;
		} STARTUPINFO, *LPSTARTUPINFO;
104:68

==================================================

;;STARTUPINFOEX=112:72

		typedef struct _STARTUPINFOEX {
0:0, ""	  STARTUPINFO                 StartupInfo;
104:68, "Ptr"	  PPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
		} STARTUPINFOEX, *LPSTARTUPINFOEX;
112:72

==================================================

;;STGMEDIUM=24:12

typedef struct tagSTGMEDIUM {
0:0, "UInt"	  DWORD    tymed;
8:4, "Ptr"	  union {
		    HBITMAP       hBitmap;
		    HMETAFILEPICT hMetaFilePict;
		    HENHMETAFILE  hEnhMetaFile;
		    HGLOBAL       hGlobal;
		    LPOLESTR      lpszFileName;
		    IStream       *pstm;
		    IStorage      *pstg;
		  } u;
16:8, "Ptr"	  IUnknown *pUnkForRelease;
		} uSTGMEDIUM;
24:12

==================================================

;;STICKYKEYS=8:8

		typedef struct tagSTICKYKEYS {
0:0, "UInt"	  DWORD cbSize;
4:4, "UInt"	  DWORD dwFlags;
		} STICKYKEYS, *LPSTICKYKEYS;
8:8

==================================================

;;STRRET=272:264

;source: minwindef.h
;MAX_PATH := 260

		typedef struct _STRRET {
0:0, "UInt"	  UINT  uType;
8:4, ""	  union {
		    LPWSTR pOleStr;
		    UINT   uOffset;
		    CHAR   cStr[MAX_PATH];
		  };
		} STRRET, *LPSTRRET;
272:264

==================================================

;;SYSTEM_INFO=48:36

		typedef struct _SYSTEM_INFO {
0:0, ""	  union {
		    DWORD dwOemId;
		    struct {
		      WORD wProcessorArchitecture;
		      WORD wReserved;
		    } DUMMYSTRUCTNAME;
		  } DUMMYUNIONNAME;
4:4, "UInt"	  DWORD     dwPageSize;
8:8, "Ptr"	  LPVOID    lpMinimumApplicationAddress;
16:12, "Ptr"	  LPVOID    lpMaximumApplicationAddress;
24:16, "UPtr"	  DWORD_PTR dwActiveProcessorMask;
32:20, "UInt"	  DWORD     dwNumberOfProcessors;
36:24, "UInt"	  DWORD     dwProcessorType;
40:28, "UInt"	  DWORD     dwAllocationGranularity;
44:32, "UShort"	  WORD      wProcessorLevel;
46:34, "UShort"	  WORD      wProcessorRevision;
		} SYSTEM_INFO, *LPSYSTEM_INFO;
48:36

==================================================

;;SYSTEM_POWER_STATUS=12:12

		typedef struct _SYSTEM_POWER_STATUS {
0:0, "UChar"	  BYTE  ACLineStatus;
1:1, "UChar"	  BYTE  BatteryFlag;
2:2, "UChar"	  BYTE  BatteryLifePercent;
3:3, "UChar"	  BYTE  SystemStatusFlag;
4:4, "UInt"	  DWORD BatteryLifeTime;
8:8, "UInt"	  DWORD BatteryFullLifeTime;
		} SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;
12:12

==================================================

;;SYSTEMTIME=16:16

		typedef struct _SYSTEMTIME {
0:0, "UShort"	  WORD wYear;
2:2, "UShort"	  WORD wMonth;
4:4, "UShort"	  WORD wDayOfWeek;
6:6, "UShort"	  WORD wDay;
8:8, "UShort"	  WORD wHour;
10:10, "UShort"	  WORD wMinute;
12:12, "UShort"	  WORD wSecond;
14:14, "UShort"	  WORD wMilliseconds;
		} SYSTEMTIME, *PSYSTEMTIME;
16:16

==================================================

;;TBBUTTON=32:20

		typedef struct {
0:0, "Int"	  int       iBitmap;
4:4, "Int"	  int       idCommand;
8:8, "UChar"	  BYTE      fsState;
9:9, "UChar"	  BYTE      fsStyle;
		#ifdef _WIN64
10:_, ""	  BYTE      bReserved[6];
		#else
		#if defined(_WIN32)
_:10, ""	  BYTE      bReserved[2];
		#endif
		#endif
16:12, "UPtr"	  DWORD_PTR dwData;
24:16, "Ptr"	  INT_PTR   iString;
		} TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
32:20

==================================================

;;TBBUTTONINFO=48:32

		typedef struct {
0:0, "UInt"	  UINT      cbSize;
4:4, "UInt"	  DWORD     dwMask;
8:8, "Int"	  int       idCommand;
12:12, "Int"	  int       iImage;
16:16, "UChar"	  BYTE      fsState;
17:17, "UChar"	  BYTE      fsStyle;
18:18, "UShort"	  WORD      cx;
24:20, "UPtr"	  DWORD_PTR lParam;
32:24, "Ptr"	  LPTSTR    pszText;
40:28, "Int"	  int       cchText;
		} TBBUTTONINFO, *LPTBBUTTONINFO;
48:32

==================================================

;;TCITEM=40:28

		typedef struct {
0:0, "UInt"	  UINT   mask;
		#if (_WIN32_IE >= 0x0300)
4:4, "UInt"	  DWORD  dwState;
8:8, "UInt"	  DWORD  dwStateMask;
		#else
		  UINT   lpReserved1;
		  UINT   lpReserved2;
		#endif
16:12, "Ptr"	  LPTSTR pszText;
24:16, "Int"	  int    cchTextMax;
28:20, "Int"	  int    iImage;
32:24, "Ptr"	  LPARAM lParam;
		} TCITEM, *LPTCITEM;
40:28

==================================================

;;TEXTMETRIC=60:60

		typedef struct tagTEXTMETRICW {
0:0, "Int"	  LONG  tmHeight;
4:4, "Int"	  LONG  tmAscent;
8:8, "Int"	  LONG  tmDescent;
12:12, "Int"	  LONG  tmInternalLeading;
16:16, "Int"	  LONG  tmExternalLeading;
20:20, "Int"	  LONG  tmAveCharWidth;
24:24, "Int"	  LONG  tmMaxCharWidth;
28:28, "Int"	  LONG  tmWeight;
32:32, "Int"	  LONG  tmOverhang;
36:36, "Int"	  LONG  tmDigitizedAspectX;
40:40, "Int"	  LONG  tmDigitizedAspectY;
44:44, "UShort"	  WCHAR tmFirstChar;
46:46, "UShort"	  WCHAR tmLastChar;
48:48, "UShort"	  WCHAR tmDefaultChar;
50:50, "UShort"	  WCHAR tmBreakChar;
52:52, "UChar"	  BYTE  tmItalic;
53:53, "UChar"	  BYTE  tmUnderlined;
54:54, "UChar"	  BYTE  tmStruckOut;
55:55, "UChar"	  BYTE  tmPitchAndFamily;
56:56, "UChar"	  BYTE  tmCharSet;
		} TEXTMETRICW, *PTEXTMETRICW, *NPTEXTMETRICW, *LPTEXTMETRICW;
60:60

==================================================

;;THREADENTRY32=28:28

		typedef struct tagTHREADENTRY32 {
0:0, "UInt"	  DWORD dwSize;
4:4, "UInt"	  DWORD cntUsage;
8:8, "UInt"	  DWORD th32ThreadID;
12:12, "UInt"	  DWORD th32OwnerProcessID;
16:16, "Int"	  LONG  tpBasePri;
20:20, "Int"	  LONG  tpDeltaPri;
24:24, "UInt"	  DWORD dwFlags;
		} THREADENTRY32, *PTHREADENTRY32;
28:28

==================================================

;;TIME_ZONE_INFORMATION=172:172

		typedef struct _TIME_ZONE_INFORMATION {
0:0, "Int"	  LONG       Bias;
4:4, ""	  WCHAR      StandardName[32];
68:68, ""	  SYSTEMTIME StandardDate;
84:84, "Int"	  LONG       StandardBias;
88:88, ""	  WCHAR      DaylightName[32];
152:152, ""	  SYSTEMTIME DaylightDate;
168:168, "Int"	  LONG       DaylightBias;
		} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION;
172:172

==================================================

;;TIMECAPS=8:8

		typedef struct timecaps_tag {
0:0, "UInt"	  UINT wPeriodMin;
4:4, "UInt"	  UINT wPeriodMax;
		} TIMECAPS, *PTIMECAPS, *NPTIMECAPS, *LPTIMECAPS;
8:8

==================================================

;;TOGGLEKEYS=8:8

		typedef struct tagTOGGLEKEYS {
0:0, "UInt"	  DWORD cbSize;
4:4, "UInt"	  DWORD dwFlags;
		} TOGGLEKEYS, *LPTOGGLEKEYS;
8:8

==================================================

;;TOKEN_PRIVILEGES=16:16

;source: winnt.h
;ANYSIZE_ARRAY := 1

		typedef struct _TOKEN_PRIVILEGES {
0:0, "UInt"	  DWORD               PrivilegeCount;
4:4, ""	  LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
		} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
16:16

==================================================

;;TOOLINFO=72:48

		typedef struct tagTOOLINFOA {
0:0, "UInt"	  UINT      cbSize;
4:4, "UInt"	  UINT      uFlags;
8:8, "Ptr"	  HWND      hwnd;
16:12, "UPtr"	  UINT_PTR  uId;
24:16, ""	  RECT      rect;
40:32, "Ptr"	  HINSTANCE hinst;
48:36, "Ptr"	  LPSTR     lpszText;
56:40, "Ptr"	  LPARAM    lParam;
64:44, "Ptr"	  void      *lpReserved;
		} TTTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA;
72:48

==================================================

;;TPMPARAMS=20:20

		typedef struct tagTPMPARAMS {
0:0, "UInt"	  UINT cbSize;
4:4, ""	  RECT rcExclude;
		} TPMPARAMS, *LPTPMPARAMS;
20:20

==================================================

;;TRAYDATA=32:24

;note: TRAYDATA may be an unofficial name

;Shell Tray Info - Arrange your system tray icons - CodeProject
;https://www.codeproject.com/Articles/10807/%2FArticles%2F10807%2FShell-Tray-Info-Arrange-your-system-tray-icons
;The dwData member of each TBBUTTON structure of the toolbar points to an undocumented structure. The first few bytes of the structure are as follows (on XP anyway) :-

		struct TRAYDATA
		{
0:0, "Ptr"	    HWND hwnd;
8:4, "UInt"	    UINT uID;
12:8, "UInt"	    UINT uCallbackMessage;
16:12, ""	    DWORD Reserved[2];
24:20, "Ptr"	    HICON hIcon;
		};
32:24

==================================================

;;TVHITTESTINFO=24:16

		typedef struct tagTVHITTESTINFO {
0:0, "UInt64"	  POINT     pt;
8:8, "UInt"	  UINT      flags;
16:12, "Ptr"	  HTREEITEM hItem;
		} TVHITTESTINFO, *LPTVHITTESTINFO;
24:16

==================================================

;;TVINSERTSTRUCT=96:68

		typedef struct tagTVINSERTSTRUCTA {
0:0, "Ptr"	  HTREEITEM hParent;
8:4, "Ptr"	  HTREEITEM hInsertAfter;
16:8, ""	  union {
		    TVITEMEXA itemex;
		    TV_ITEMA  item;
		  } DUMMYUNIONNAME;
		} TVINSERTSTRUCTA, *LPTVINSERTSTRUCTA;
96:68

==================================================

;;TVITEM=56:40

		typedef struct tagTVITEM {
0:0, "UInt"	  UINT      mask;
8:4, "Ptr"	  HTREEITEM hItem;
16:8, "UInt"	  UINT      state;
20:12, "UInt"	  UINT      stateMask;
24:16, "Ptr"	  LPTSTR    pszText;
32:20, "Int"	  int       cchTextMax;
36:24, "Int"	  int       iImage;
40:28, "Int"	  int       iSelectedImage;
44:32, "Int"	  int       cChildren;
48:36, "Ptr"	  LPARAM    lParam;
		} TVITEM, *LPTVITEM;
56:40

==================================================

;;TVITEMEX=80:60

		typedef struct tagTVITEMEXA {
0:0, "UInt"	  UINT      mask;
8:4, "Ptr"	  HTREEITEM hItem;
16:8, "UInt"	  UINT      state;
20:12, "UInt"	  UINT      stateMask;
24:16, "Ptr"	  LPSTR     pszText;
32:20, "Int"	  int       cchTextMax;
36:24, "Int"	  int       iImage;
40:28, "Int"	  int       iSelectedImage;
44:32, "Int"	  int       cChildren;
48:36, "Ptr"	  LPARAM    lParam;
56:40, "Int"	  int       iIntegral;
60:44, "UInt"	  UINT      uStateEx;
64:48, "Ptr"	  HWND      hwnd;
72:52, "Int"	  int       iExpandedImage;
76:56, "Int"	  int       iReserved;
		} TVITEMEXA, *LPTVITEMEXA;
80:60

==================================================

;;VARIANT=24:16

;note: the max size of __VARIANT_NAME_3 is 16:8

		typedef struct tagVARIANT {
0:0, ""	  union {
		    struct __tagVARIANT {
		      VARTYPE vt;
		      WORD    wReserved1;
		      WORD    wReserved2;
		      WORD    wReserved3;
		      union {
		        LONGLONG            llVal;
		        LONG                lVal;
		        BYTE                bVal;
		        SHORT               iVal;
		        FLOAT               fltVal;
		        DOUBLE              dblVal;
		        VARIANT_BOOL        boolVal;
		        _VARIANT_BOOL       bool;
		        SCODE               scode;
		        CY                  cyVal;
		        DATE                date;
		        BSTR                bstrVal;
		        IUnknown            *punkVal;
		        IDispatch           *pdispVal;
		        SAFEARRAY           *parray;
		        BYTE                *pbVal;
		        SHORT               *piVal;
		        LONG                *plVal;
		        LONGLONG            *pllVal;
		        FLOAT               *pfltVal;
		        DOUBLE              *pdblVal;
		        VARIANT_BOOL        *pboolVal;
		        _VARIANT_BOOL       *pbool;
		        SCODE               *pscode;
		        CY                  *pcyVal;
		        DATE                *pdate;
		        BSTR                *pbstrVal;
		        IUnknown            **ppunkVal;
		        IDispatch           **ppdispVal;
		        SAFEARRAY           **pparray;
		        VARIANT             *pvarVal;
		        PVOID               byref;
		        CHAR                cVal;
		        USHORT              uiVal;
		        ULONG               ulVal;
		        ULONGLONG           ullVal;
		        INT                 intVal;
		        UINT                uintVal;
		        DECIMAL             *pdecVal;
		        CHAR                *pcVal;
		        USHORT              *puiVal;
		        ULONG               *pulVal;
		        ULONGLONG           *pullVal;
		        INT                 *pintVal;
		        UINT                *puintVal;
		        struct __tagBRECORD {
		          PVOID       pvRecord;
		          IRecordInfo *pRecInfo;
		        } __VARIANT_NAME_4;
		      } __VARIANT_NAME_3;
		    } __VARIANT_NAME_2;
		    DECIMAL             decVal;
		  } __VARIANT_NAME_1;
		} VARIANT, *LPVARIANT, VARIANTARG, *LPVARIANTARG;
24:16

==================================================

;;VS_FIXEDFILEINFO=52:52

		typedef struct tagVS_FIXEDFILEINFO {
0:0, "UInt"	  DWORD dwSignature;
4:4, "UInt"	  DWORD dwStrucVersion;
8:8, "UInt"	  DWORD dwFileVersionMS;
12:12, "UInt"	  DWORD dwFileVersionLS;
16:16, "UInt"	  DWORD dwProductVersionMS;
20:20, "UInt"	  DWORD dwProductVersionLS;
24:24, "UInt"	  DWORD dwFileFlagsMask;
28:28, "UInt"	  DWORD dwFileFlags;
32:32, "UInt"	  DWORD dwFileOS;
36:36, "UInt"	  DWORD dwFileType;
40:40, "UInt"	  DWORD dwFileSubtype;
44:44, "UInt"	  DWORD dwFileDateMS;
48:48, "UInt"	  DWORD dwFileDateLS;
		} VS_FIXEDFILEINFO;
52:52

==================================================

;;WAVEFORMAT=14:14

		typedef struct waveformat_tag {
0:0, "UShort"	  WORD  wFormatTag;
2:2, "UShort"	  WORD  nChannels;
4:4, "UInt"	  DWORD nSamplesPerSec;
8:8, "UInt"	  DWORD nAvgBytesPerSec;
12:12, "UShort"	  WORD  nBlockAlign;
		} WAVEFORMAT;
16:16 [CHECK][padding at end][Visual Studio states 14:14]

==================================================

;;WAVEFORMATEX=18:18

		typedef struct {
0:0, "UShort"	  WORD  wFormatTag;
2:2, "UShort"	  WORD  nChannels;
4:4, "UInt"	  DWORD nSamplesPerSec;
8:8, "UInt"	  DWORD nAvgBytesPerSec;
12:12, "UShort"	  WORD  nBlockAlign;
14:14, "UShort"	  WORD  wBitsPerSample;
16:16, "UShort"	  WORD  cbSize;
		} WAVEFORMATEX;
20:20 [CHECK][padding at end][Visual Studio states 18:18]

==================================================

;;WCRANGE=4:4

		typedef struct tagWCRANGE {
0:0, "UShort"	  WCHAR  wcLow;
2:2, "UShort"	  USHORT cGlyphs;
		} WCRANGE, *PWCRANGE;
4:4

==================================================

;;WIN32_FIND_DATA=592:592

;source: minwindef.h
;MAX_PATH := 260

		typedef struct _WIN32_FIND_DATA {
0:0, "UInt"	  DWORD    dwFileAttributes;
4:4, ""	  FILETIME ftCreationTime;
12:12, ""	  FILETIME ftLastAccessTime;
20:20, ""	  FILETIME ftLastWriteTime;
28:28, "UInt"	  DWORD    nFileSizeHigh;
32:32, "UInt"	  DWORD    nFileSizeLow;
36:36, "UInt"	  DWORD    dwReserved0;
40:40, "UInt"	  DWORD    dwReserved1;
44:44, ""	  TCHAR    cFileName[MAX_PATH];
564:564, ""	  TCHAR    cAlternateFileName[14];
		} WIN32_FIND_DATA, *PWIN32_FIND_DATA, *LPWIN32_FIND_DATA;
592:592

==================================================

;;WINDOWINFO=60:60

		typedef struct tagWINDOWINFO {
0:0, "UInt"	  DWORD cbSize;
4:4, ""	  RECT  rcWindow;
20:20, ""	  RECT  rcClient;
36:36, "UInt"	  DWORD dwStyle;
40:40, "UInt"	  DWORD dwExStyle;
44:44, "UInt"	  DWORD dwWindowStatus;
48:48, "UInt"	  UINT  cxWindowBorders;
52:52, "UInt"	  UINT  cyWindowBorders;
56:56, "UShort"	  ATOM  atomWindowType;
58:58, "UShort"	  WORD  wCreatorVersion;
		} WINDOWINFO, *PWINDOWINFO, *LPWINDOWINFO;
60:60

==================================================

;;WNDCLASS=72:40

		typedef struct tagWNDCLASS {
0:0, "UInt"	  UINT      style;
8:4, "Ptr"	  WNDPROC   lpfnWndProc;
16:8, "Int"	  int       cbClsExtra;
20:12, "Int"	  int       cbWndExtra;
24:16, "Ptr"	  HINSTANCE hInstance;
32:20, "Ptr"	  HICON     hIcon;
40:24, "Ptr"	  HCURSOR   hCursor;
48:28, "Ptr"	  HBRUSH    hbrBackground;
56:32, "Ptr"	  LPCTSTR   lpszMenuName;
64:36, "Ptr"	  LPCTSTR   lpszClassName;
		} WNDCLASS, *PWNDCLASS;
72:40

==================================================

;;WNDCLASSEX=80:48

		typedef struct tagWNDCLASSEX {
0:0, "UInt"	  UINT      cbSize;
4:4, "UInt"	  UINT      style;
8:8, "Ptr"	  WNDPROC   lpfnWndProc;
16:12, "Int"	  int       cbClsExtra;
20:16, "Int"	  int       cbWndExtra;
24:20, "Ptr"	  HINSTANCE hInstance;
32:24, "Ptr"	  HICON     hIcon;
40:28, "Ptr"	  HCURSOR   hCursor;
48:32, "Ptr"	  HBRUSH    hbrBackground;
56:36, "Ptr"	  LPCTSTR   lpszMenuName;
64:40, "Ptr"	  LPCTSTR   lpszClassName;
72:44, "Ptr"	  HICON     hIconSm;
		} WNDCLASSEX, *PWNDCLASSEX;
80:48

==================================================

;;WSADATA=408:400

;source: winsock.h
;WSADESCRIPTION_LEN := 256
;WSASYS_STATUS_LEN := 128

		typedef struct WSAData {
0:0, "UShort"	  WORD           wVersion;
2:2, "UShort"	  WORD           wHighVersion;
4:4, "Char"	  char           szDescription[WSADESCRIPTION_LEN+1];
261:261, "Char"	  char           szSystemStatus[WSASYS_STATUS_LEN+1];
390:390, "UShort"	  unsigned short iMaxSockets;
392:392, "UShort"	  unsigned short iMaxUdpDg;
400:396, "Ptr"	  char FAR       *lpVendorInfo;
		} WSADATA, *LPWSADATA;
408:400

==================================================
I struct gold.
Last edited by jeeswg on 12 Nov 2019, 13:06, edited 32 times in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
Drugwash
Posts: 739
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: list of structs with parameters (sizes and types)

13 Apr 2017, 04:00

For a long time now my dream has been a fully fledged struct parser that would have its own (complete) database of structures retrieved from old and new MSDN versions, so that it would provide the user with a struct list and by choosing the desired item it would return any and all possible information and code (usable in both AHK 1.0 and 1.1+) about it.
That combined with a user defined-struct builder would be an excellent tool for those that make extensive use of DllCall() and not only.
EDIT:
Of good help could be the WinStructs project together with _Struct() and Ahk-SizeOf-Checker, and maybe useful additions would make these scripts for GUID/UUID manipulation here and here.
/EDIT
Until recently I had no knowledge about structure alignment so some of my scripts may be buggy in this regard, most certainly in an x64 environment.

I know someone here might jump in with a "do it yourself!" statement so to make it clear: I'm not asking for things to be done - just speaking my mind. And maybe the scripts I pointed to could be useful for the current task.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
just me
Posts: 6652
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: list of structs with parameters (sizes and types)

13 Apr 2017, 09:07

AFAIK, AHK_H Struct() doesn't have built-in support for
  • non-default alignment
  • creating 32-bit structures on AHK x64 and vice versa.
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: list of structs with parameters (sizes and types)

13 Apr 2017, 10:11

@Drugwash
Haha 'do it yourself'. I think people should ask a lot, and give a lot, simples.

Also, I know if I'm expert in something I can save someone else a lot of time, when learning something new, and vice versa. A bit like 'comparative advantage'. A bit of help at the beginning is really useful, just to get a foothold.

I think that struct parsers/builders would be good too, although even if we did get one, I think it's important to have some hardcoded lists to confirm that the parsers/builders work, and to guarantee accuracy for common structures. Some attempts that I know of are: _Struct.ahk and sizeof.ahk.

Actually, also of use would be a (fairly) comprehensive list of parameter types and parameter/struct sizes, I have been working on those, and used them to make this list, and will be sharing these in due course.
[EDIT:]
C++: DllCall: get parameter types/sizes - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 23&t=39426

I will also do some lists for DllCall.
[EDIT:]
DllCall converter/cleaner (e.g. x32 to x64/x32 two-way compatible) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=31365

I've basically done all the structs I intended to do. If ever I come across a new one, I might add it in. If there are any other structs that people think should be added to the list just post all the ones that *theoretically* you would like added to the list, and I might get round to adding some/all of them in. Don't be shy about posting a very long list.

==================================================

@guest3456 and just me
Interesting re. AHK_H.

Nice list of data types here:
Built-in Structure types
https://hotkeyit.github.io/v2/docs/StructTypes.htm
Last edited by jeeswg on 13 Jan 2019, 20:40, edited 1 time in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4370
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: list of structs with parameters (sizes and types)

13 Apr 2017, 10:53

Actually, also of use would be a (fairly) comprehensive list of parameter types and parameter/struct sizes, I have been working on those, and used them to make this list, and will be sharing these in due course.
That one already exists. Bentschi did one once.
Recommends AHK Studio
guest3456
Posts: 2918
Joined: 09 Oct 2013, 10:31

Re: list of structs with parameters (sizes and types)

13 Apr 2017, 10:57

just me wrote:AFAIK, AHK_H Struct() doesn't have built-in support for
  • non-default alignment
  • creating 32-bit structures on AHK x64 and vice versa.
i dont know...
HotKeyIt wrote: ping

HotKeyIt
Posts: 1936
Joined: 29 Sep 2013, 18:35
Contact:

Re: list of structs with parameters (sizes and types)

13 Apr 2017, 15:30

just me wrote:AFAIK, AHK_H Struct() doesn't have built-in support for
  • non-default alignment
  • creating 32-bit structures on AHK x64 and vice versa.
  • I think you should be able to use Bit Fields for non default alignment. Do we have an example where it would be required?
  • Of course one would need 32-bit exe for 32-bit and 64-bit for 64-bit structures. Why would you need that? It would be easy to implement but I don't think it makes sense, it would just lead to errors and confusion.
just me
Posts: 6652
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: list of structs with parameters (sizes and types)

14 Apr 2017, 01:50

  • Code: Select all

    #ifdef _WIN32
    #include <pshpack1.h>
    #endif
    
    typedef struct tagLVKEYDOWN
    {
        NMHDR hdr;
        WORD wVKey;
        UINT flags;
    } NMLVKEYDOWN, *LPNMLVKEYDOWN;
    
    #ifdef _WIN32
    #include <poppack.h>
    #endif
    
  • Inter-process communication.
User avatar
nnnik
Posts: 4370
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: list of structs with parameters (sizes and types)

14 Apr 2017, 01:53

HotKeyIt wrote:
just me wrote:AFAIK, AHK_H Struct() doesn't have built-in support for
  • non-default alignment
  • creating 32-bit structures on AHK x64 and vice versa.
  • I think you should be able to use Bit Fields for non default alignment. Do we have an example where it would be required?
  • Of course one would need 32-bit exe for 32-bit and 64-bit for 64-bit structures. Why would you need that? It would be easy to implement but I don't think it makes sense, it would just lead to errors and confusion.
Saving to files/ sending acorss the internet in a format that requires that requires it's structures to be aligned in a certain way that follows the 64/32 bit norm.
Recommends AHK Studio
HotKeyIt
Posts: 1936
Joined: 29 Sep 2013, 18:35
Contact:

Re: list of structs with parameters (sizes and types)

14 Apr 2017, 02:16

nnnik wrote:aligned in a certain way that follows the 64/32 bit norm.
With certain you mean non-default, right? Do you have an example?
User avatar
nnnik
Posts: 4370
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: list of structs with parameters (sizes and types)

14 Apr 2017, 02:55

HotKeyIt wrote:
nnnik wrote:aligned in a certain way that follows the 64/32 bit norm.
With certain you mean non-default, right? Do you have an example?
Yeah I was using your Struct lib to send some data over a Socket but didn't get any good results ( the binaries were encoded in base64 then send as text ). That was because I was sending from a 64-bit Version to a non 64 bit Version of AutoHotkey.
And yes with certain I mean default.
Recommends AHK Studio
just me
Posts: 6652
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: list of structs with parameters (sizes and types)

14 Apr 2017, 05:15

Another interesting structure:

Code: Select all

typedef struct _SHFILEOPSTRUCTA
{
    HWND            hwnd;
    UINT            wFunc;
    PCZZSTR         pFrom;
    PCZZSTR         pTo;
    FILEOP_FLAGS    fFlags;
    BOOL            fAnyOperationsAborted;
    LPVOID          hNameMappings;
    PCSTR           lpszProgressTitle; // only used if FOF_SIMPLEPROGRESS
} SHFILEOPSTRUCTA, *LPSHFILEOPSTRUCTA;
typedef struct _SHFILEOPSTRUCTW
{
    HWND            hwnd;
    UINT            wFunc;
    PCZZWSTR        pFrom;
    PCZZWSTR        pTo;
    FILEOP_FLAGS    fFlags;
    BOOL            fAnyOperationsAborted;
    LPVOID          hNameMappings;
    PCWSTR          lpszProgressTitle; // only used if FOF_SIMPLEPROGRESS
} SHFILEOPSTRUCTW, *LPSHFILEOPSTRUCTW;
Note:

Code: Select all

// line 48 ff
#if !defined(_WIN64)
#include <pshpack1.h>
#endif
// line 255
typedef WORD FILEOP_FLAGS;
User avatar
Drugwash
Posts: 739
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: list of structs with parameters (sizes and types)

14 Apr 2017, 08:05

Working with structures is not that simple.
While some of the structures are simple buffers that may have been allocated (in AHK) a size larger than required, others require that the exact size of the buffer be entered in a special field (usually first field of the structure).
This size may depend on the OS version, OS type, API version and/or other criteria. And while some API versions may (?) accept a wrong struct size, most would error out.

Therefore it all depends on the target OS range of the script. Simply choosing largest size according to the #if directives in the original MS headers and separating by ANSI/Unicode won't always cut it for older systems like 2000/XP, not to mention the 9x and NT4 line. Since I'm primarily a 9x user I know how this goes. I've tried hard for some recent scripts to be compatible with at least 98/ME and XP - nothing else to test on, currently - and it took a lot of work. First OS version has to be determined and ideally certain API versions too, such as those in common controls for Toolbar/Rebar/etc and maybe RichEdit too, then use the appropriate struct sizes according to that info. Something new coders wouldn't bother with - "either you use Win10 or you're toast", they say.

So, how do we stand…?
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: list of structs with parameters (sizes and types)

14 Apr 2017, 08:35

I have been writing some functions which I hope to post soon, that get/set the text for various control types on internal/external GUI windows. AHK might be x32/x64, the external program might be x32/x64, if a struct is required, such as LVITEM or TVITEM, we usually have to prepare it in the same 'bitness' as the external program.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
Drugwash
Posts: 739
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: list of structs with parameters (sizes and types)

20 Apr 2017, 04:17

Yes, a combination of 32bit application on 64bit Windows can be misleading so a proper detection system should be created and used.
I've built some helper functions that retrieve OS version or compare current version to a given one (see func_GetOSver.ahk and func_OStest.ahk in my LLB's lib folder) and used them in building the REBARBANDINFO structure, for example in the Rebar wrapper func_Rebar.ahk, which I believe is still not x64-safe due to (mis)alignment.

Structures like i.e. TBBUTTON or TBBUTTONINFO are tricky. Current MSDN information is worthless when dealing with 2000/XP (or older) so messages like TB_SETBUTTONINFO or TB_GETBUTTONINFO would fail on those systems because struct size for TBBUTTONINFO is different for pre/post-Vista OS. (just noticed that in func_Toolbar.ahk --> TB_BtnSet() where the comparison is buggy because it doesn't do "is Vista or later" but only "is Vista")

Structures like those in iphlpapi.dll (see my NetMeterEx) may be much trickier since they may have variable sizes and certain fields may hold different contents according to OS version (I've noticed differences betweeen 98SE and XP) such as APIs returning ANSI string although MSDN states it should return Unicode or some DWORD index field returning either one or two WORDs depending on OS version.

Therefore not only calculating correct structure size may be a problem but also the commands/functions used to retrieve info from the struct fields should be adjusted according to all those criteria. Yeah, working out structures in a flawless way is an extremely difficult task.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: list of structs with parameters (sizes and types)

24 Nov 2018, 18:38

MENUBARINFO

The definition for MENUBARINFO on MSDN has been corrected, ': 1' has been added to the two BOOLs. Has anyone seen this notation before?
tagMENUBARINFO | Microsoft Docs
https://docs.microsoft.com/en-us/window ... enubarinfo

I get the correct sizes when ': 1' is added to the BOOLs (C++ code):

Code: Select all

	//MENUBARINFO
	struct TestMBI1
	{
		DWORD cbSize;
		RECT  rcBar;
		HMENU hMenu;
		HWND  hwndMenu;
		BOOL  fBarFocused; //without ':1'
		BOOL  fFocused; //without ':1'
	};
	struct TestMBI2
	{
		DWORD cbSize;
		RECT  rcBar;
		HMENU hMenu;
		HWND  hwndMenu;
		BOOL  fBarFocused : 1;
		BOOL  fFocused : 1;
	};

	std::cout << sizeof(TestMBI1) << std::endl; //48:36 (64-bit:32-bit)
	std::cout << sizeof(TestMBI2) << std::endl; //48:32
	std::cout << sizeof(MENUBARINFO) << std::endl; //48:32
SHFILEOPSTRUCT

@just me: SHFILEOPSTRUCT is indeed an interesting structure, e.g. useful for file/folder move/copy/recycle operations. Oddly, when I do sizeof directly, I get a different value to when I build the struct myself. Calculating by hand, I would expect 32 bytes, not 30.

Code: Select all

	//SHFILEOPSTRUCT
	struct TestSFOS1
	{
		HWND         hwnd;
		UINT         wFunc;
		PCZZSTR      pFrom;
		PCZZSTR      pTo;
		FILEOP_FLAGS fFlags;
		BOOL         fAnyOperationsAborted;
		LPVOID       hNameMappings;
		PCSTR        lpszProgressTitle;
	};

	std::cout << sizeof(TestSFOS1) << std::endl; //56:32 (64-bit:32-bit)
	std::cout << sizeof(_SHFILEOPSTRUCTA) << std::endl; //56:30
	std::cout << sizeof(_SHFILEOPSTRUCTW) << std::endl; //56:30
	//std::cout << sizeof(_SHFILEOPSTRUCT) << std::endl; //error
	std::cout << sizeof(SHFILEOPSTRUCTA) << std::endl; //56:30
	std::cout << sizeof(SHFILEOPSTRUCTW) << std::endl; //56:30
	std::cout << sizeof(SHFILEOPSTRUCT) << std::endl; //56:30
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Helgef
Posts: 4067
Joined: 17 Jul 2016, 01:02
Contact:

Re: list of structs with parameters (sizes and types)

25 Nov 2018, 03:37

Has anyone seen this notation before?
That is the notation for declaring bitfields, that is, the members fBarFocused and fFocused are bitfields, each reserved 1 bit of memory. Their total size is size of BOOL though, that is 32 bits. But you could add up to 30 more one bit wide members without the affecting the total struct size. But if you add 31 more, the size increases with size of BOOL. You could also add other bit widths (up 32 bit since that is the size of BOOL), eg, BOOL x : 7; makes a 7 bit wide member. Zero width members is a special case, some times added for alignment purposes, such members are left unnamed, eg, BOOL : 0;. To write correctly to these members you do,

Code: Select all

numput ((bifField0Value << (bifField0pos-1)) | ((bifField1Value << (bifField1pos-1)), offsetOfFirstBitField, type
or in this example,

Code: Select all

numput fBarFocused | (fFocused << 1), TestMBI2, a_ptrsize == 8 40 :  28, 'int'
You have to ensure the values of fBarFocused and fFocused are 0 or 1. If you add the member BOOL x:7, you do fBarFocused | (fFocused << 1) | (x << 2), and here x needs to be in the range 0...127.

Reading the values of these members is left as an exercise for the interested reader.

Cheers.
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: list of structs with parameters (sizes and types)

13 Jan 2019, 21:46

- I've overhauled the struct list in the OP.
- The number of structs has been increased from 98 to 141.
- The structs mentioned by Drugwash and just me have been added.
- Previously incomplete structs have been fixed.
- 8 structs have queries, please see any instances of '[CHECK]'. Thanks.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 6 guests