Just Let It Flow

November 5, 2009

It Seems to be Some Sort of Communiqué

Filed under: Code,Windows — adeyblue @ 12:10 am

Apart from the goodies provided by the symbols of the release version of win32k.sys, the checked version of the binary is home to the g_WM_VALUES_STRINGS variable. This variable is an array of stringified names of all the WM messages from WM_NULL to WM_USER – 1 in order.

So you don’t have to go spelunking, here’s three listings as of Windows 8.1. First, a define list, then a string list useful for diagnostic WndProc output, and finally the C++ program that’ll output both lists from a checked win32k binary.

#define WM_NULL 0000
#define WM_CREATE 0x01
#define WM_DESTROY 0x02
#define WM_MOVE 0x03
#define WM_SIZEWAIT 0x04
#define WM_SIZE 0x05
#define WM_ACTIVATE 0x06
#define WM_SETFOCUS 0x07
#define WM_KILLFOCUS 0x08
#define WM_SETVISIBLE 0x09
#define WM_ENABLE 0x0a
#define WM_SETREDRAW 0x0b
#define WM_SETTEXT 0x0c
#define WM_GETTEXT 0x0d
#define WM_GETTEXTLENGTH 0x0e
#define WM_PAINT 0x0f
#define WM_CLOSE 0x10
#define WM_QUERYENDSESSION 0x11
#define WM_QUIT 0x12
#define WM_QUERYOPEN 0x13
#define WM_ERASEBKGND 0x14
#define WM_SYSCOLORCHANGE 0x15
#define WM_ENDSESSION 0x16
#define WM_SYSTEMERROR 0x17
#define WM_SHOWWINDOW 0x18
#define WM_CTLCOLOR 0x19
#define WM_WININICHANGE 0x1a
#define WM_DEVMODECHANGE 0x1b
#define WM_ACTIVATEAPP 0x1c
#define WM_FONTCHANGE 0x1d
#define WM_TIMECHANGE 0x1e
#define WM_CANCELMODE 0x1f
#define WM_SETCURSOR 0x20
#define WM_MOUSEACTIVATE 0x21
#define WM_CHILDACTIVATE 0x22
#define WM_QUEUESYNC 0x23
#define WM_GETMINMAXINFO 0x24
#define WM_LOGOFF 0x25
#define WM_PAINTICON 0x26
#define WM_ICONERASEBKGND 0x27
#define WM_NEXTDLGCTL 0x28
#define WM_ALTTABACTIVE 0x29
#define WM_SPOOLERSTATUS 0x2a
#define WM_DRAWITEM 0x2b
#define WM_MEASUREITEM 0x2c
#define WM_DELETEITEM 0x2d
#define WM_VKEYTOITEM 0x2e
#define WM_CHARTOITEM 0x2f
#define WM_SETFONT 0x30
#define WM_GETFONT 0x31
#define WM_SETHOTKEY 0x32
#define WM_GETHOTKEY 0x33
#define WM_SHELLNOTIFY 0x34
#define WM_ISACTIVEICON 0x35
#define WM_QUERYPARKICON 0x36
#define WM_QUERYDRAGICON 0x37
#define WM_WINHELP 0x38
#define WM_COMPAREITEM 0x39
#define WM_FULLSCREEN 0x3a
#define WM_CLIENTSHUTDOWN 0x3b
#define WM_DDEMLEVENT 0x3c
#define WM_GETOBJECT 0x3d
#define undefined_1 0x3e
#define undefined_2 0x3f
#define WM_TESTING 0x40
#define WM_COMPACTING 0x41
#define WM_OTHERWINDOWCREATED 0x42
#define WM_OTHERWINDOWDESTROYED 0x43
#define WM_COMMNOTIFY 0x44
#define undefined_3 0x45
#define WM_WINDOWPOSCHANGING 0x46
#define WM_WINDOWPOSCHANGED 0x47
#define WM_POWER 0x48
#define WM_COPYGLOBALDATA 0x49
#define WM_COPYDATA 0x4a
#define WM_CANCELJOURNAL 0x4b
#define undefined_4 0x4c
#define WM_KEYF1 0x4d
#define WM_NOTIFY 0x4e
#define WM_ACCESS_WINDOW 0x4f
#define WM_INPUTLANGCHANGEREQUEST 0x50
#define WM_INPUTLANGCHANGE 0x51
#define WM_TCARD 0x52
#define WM_HELP 0x53
#define WM_USERCHANGED 0x54
#define WM_NOTIFYFORMAT 0x55
#define undefined_5 0x56
#define undefined_6 0x57
#define undefined_7 0x58
#define undefined_8 0x59
#define undefined_9 0x5a
#define undefined_10 0x5b
#define undefined_11 0x5c
#define undefined_12 0x5d
#define undefined_13 0x5e
#define undefined_14 0x5f
#define undefined_15 0x60
#define undefined_16 0x61
#define undefined_17 0x62
#define undefined_18 0x63
#define undefined_19 0x64
#define undefined_20 0x65
#define undefined_21 0x66
#define undefined_22 0x67
#define undefined_23 0x68
#define undefined_24 0x69
#define undefined_25 0x6a
#define undefined_26 0x6b
#define undefined_27 0x6c
#define undefined_28 0x6d
#define undefined_29 0x6e
#define undefined_30 0x6f
#define WM_FINALDESTROY 0x70
#define WM_MEASUREITEM_CLIENTDATA 0x71
#define undefined_31 0x72
#define undefined_32 0x73
#define undefined_33 0x74
#define undefined_34 0x75
#define undefined_35 0x76
#define undefined_36 0x77
#define undefined_37 0x78
#define undefined_38 0x79
#define undefined_39 0x7a
#define WM_CONTEXTMENU 0x7b
#define WM_STYLECHANGING 0x7c
#define WM_STYLECHANGED 0x7d
#define WM_DISPLAYCHANGE 0x7e
#define WM_GETICON 0x7f
#define WM_SETICON 0x80
#define WM_NCCREATE 0x81
#define WM_NCDESTROY 0x82
#define WM_NCCALCSIZE 0x83
#define WM_NCHITTEST 0x84
#define WM_NCPAINT 0x85
#define WM_NCACTIVATE 0x86
#define WM_GETDLGCODE 0x87
#define WM_SYNCPAINT 0x88
#define WM_SYNCTASK 0x89
#define undefined_40 0x8a
#define WM_KLUDGEMINRECT 0x8b
#define WM_LPKDRAWSWITCHWND 0x8c
#define undefined_41 0x8d
#define undefined_42 0x8e
#define undefined_43 0x8f
#define WM_UAHDESTROYWINDOW 0x90
#define WM_UAHDRAWMENU 0x91
#define WM_UAHDRAWMENUITEM 0x92
#define WM_UAHINITMENU 0x93
#define WM_UAHMEASUREMENUITEM 0x94
#define WM_UAHNCPAINTMENUPOPUP 0x95
#define WM_UAHUPDATE 0x96
#define undefined_44 0x97
#define undefined_45 0x98
#define undefined_46 0x99
#define undefined_47 0x9a
#define undefined_48 0x9b
#define undefined_49 0x9c
#define undefined_50 0x9d
#define undefined_51 0x9e
#define undefined_52 0x9f
#define WM_NCMOUSEMOVE 0xa0
#define WM_NCLBUTTONDOWN 0xa1
#define WM_NCLBUTTONUP 0xa2
#define WM_NCLBUTTONDBLCLK 0xa3
#define WM_NCRBUTTONDOWN 0xa4
#define WM_NCRBUTTONUP 0xa5
#define WM_NCRBUTTONDBLCLK 0xa6
#define WM_NCMBUTTONDOWN 0xa7
#define WM_NCMBUTTONUP 0xa8
#define WM_NCMBUTTONDBLCLK 0xa9
#define undefined_53 0xaa
#define WM_NCXBUTTONDOWN 0xab
#define WM_NCXBUTTONUP 0xac
#define WM_NCXBUTTONDBLCLK 0xad
#define WM_NCUAHDRAWCAPTION 0xae
#define WM_NCUAHDRAWFRAME 0xaf
#define EM_GETSEL 0xb0
#define EM_SETSEL 0xb1
#define EM_GETRECT 0xb2
#define EM_SETRECT 0xb3
#define EM_SETRECTNP 0xb4
#define EM_SCROLL 0xb5
#define EM_LINESCROLL 0xb6
#define EM_SCROLLCARET 0xb7
#define EM_GETMODIFY 0xb8
#define EM_SETMODIFY 0xb9
#define EM_GETLINECOUNT 0xba
#define EM_LINEINDEX 0xbb
#define EM_SETHANDLE 0xbc
#define EM_GETHANDLE 0xbd
#define EM_GETTHUMB 0xbe
#define undefined_54 0xbf
#define undefined_55 0xc0
#define EM_LINELENGTH 0xc1
#define EM_REPLACESEL 0xc2
#define EM_SETFONT 0xc3
#define EM_GETLINE 0xc4
#define EM_LIMITTEXT 0xc5
#define EM_CANUNDO 0xc6
#define EM_UNDO 0xc7
#define EM_FMTLINES 0xc8
#define EM_LINEFROMCHAR 0xc9
#define EM_SETWORDBREAK 0xca
#define EM_SETTABSTOPS 0xcb
#define EM_SETPASSWORDCHAR 0xcc
#define EM_EMPTYUNDOBUFFER 0xcd
#define EM_GETFIRSTVISIBLELINE 0xce
#define EM_SETREADONLY 0xcf
#define EM_SETWORDBREAKPROC 0xd0
#define EM_GETWORDBREAKPROC 0xd1
#define EM_GETPASSWORDCHAR 0xd2
#define EM_SETMARGINS 0xd3
#define EM_GETMARGINS 0xd4
#define EM_GETLIMITTEXT 0xd5
#define EM_POSFROMCHAR 0xd6
#define EM_CHARFROMPOS 0xd7
#define EM_SETIMESTATUS 0xd8
#define EM_GETIMESTATUS 0xd9
#define EM_MSGMAX 0xda
#define undefined_56 0xdb
#define undefined_57 0xdc
#define undefined_58 0xdd
#define undefined_59 0xde
#define undefined_60 0xdf
#define undefined_61 0xe0
#define undefined_62 0xe1
#define undefined_63 0xe2
#define undefined_64 0xe3
#define undefined_65 0xe4
#define undefined_66 0xe5
#define undefined_67 0xe6
#define undefined_68 0xe7
#define undefined_69 0xe8
#define undefined_70 0xe9
#define undefined_71 0xea
#define undefined_72 0xeb
#define undefined_73 0xec
#define undefined_74 0xed
#define undefined_75 0xee
#define undefined_76 0xef
#define undefined_77 0xf0
#define undefined_78 0xf1
#define undefined_79 0xf2
#define undefined_80 0xf3
#define undefined_81 0xf4
#define undefined_82 0xf5
#define undefined_83 0xf6
#define undefined_84 0xf7
#define undefined_85 0xf8
#define undefined_86 0xf9
#define undefined_87 0xfa
#define undefined_88 0xfb
#define undefined_89 0xfc
#define undefined_90 0xfd
#define WM_INPUT_DEVICE_CHANGE 0xfe
#define WM_INPUT 0xff
#define WM_KEYDOWN 0x100
#define WM_KEYUP 0x101
#define WM_CHAR 0x102
#define WM_DEADCHAR 0x103
#define WM_SYSKEYDOWN 0x104
#define WM_SYSKEYUP 0x105
#define WM_SYSCHAR 0x106
#define WM_SYSDEADCHAR 0x107
#define WM_YOMICHAR 0x108
#define WM_UNICHAR 0x109
#define WM_CONVERTREQUEST 0x10a
#define WM_CONVERTRESULT 0x10b
#define WM_INTERIM 0x10c
#define WM_IME_STARTCOMPOSITION 0x10d
#define WM_IME_ENDCOMPOSITION 0x10e
#define WM_IME_COMPOSITION 0x10f
#define WM_INITDIALOG 0x110
#define WM_COMMAND 0x111
#define WM_SYSCOMMAND 0x112
#define WM_TIMER 0x113
#define WM_HSCROLL 0x114
#define WM_VSCROLL 0x115
#define WM_INITMENU 0x116
#define WM_INITMENUPOPUP 0x117
#define WM_SYSTIMER 0x118
#define WM_GESTURE 0x119
#define WM_GESTURENOTIFY 0x11a
#define WM_GESTUREINPUT 0x11b
#define WM_GESTURENOTIFIED 0x11c
#define undefined_91 0x11d
#define undefined_92 0x11e
#define WM_MENUSELECT 0x11f
#define WM_MENUCHAR 0x120
#define WM_ENTERIDLE 0x121
#define WM_MENURBUTTONUP 0x122
#define WM_MENUDRAG 0x123
#define WM_MENUGETOBJECT 0x124
#define WM_UNINITMENUPOPUP 0x125
#define WM_MENUCOMMAND 0x126
#define WM_CHANGEUISTATE 0x127
#define WM_UPDATEUISTATE 0x128
#define WM_QUERYUISTATE 0x129
#define undefined_93 0x12a
#define undefined_94 0x12b
#define undefined_95 0x12c
#define undefined_96 0x12d
#define undefined_97 0x12e
#define undefined_98 0x12f
#define undefined_99 0x130
#define WM_LBTRACKPOINT 0x131
#define WM_CTLCOLORMSGBOX 0x132
#define WM_CTLCOLOREDIT 0x133
#define WM_CTLCOLORLISTBOX 0x134
#define WM_CTLCOLORBTN 0x135
#define WM_CTLCOLORDLG 0x136
#define WM_CTLCOLORSCROLLBAR 0x137
#define WM_CTLCOLORSTATIC 0x138
#define undefined_100 0x139
#define undefined_101 0x13a
#define undefined_102 0x13b
#define undefined_103 0x13c
#define undefined_104 0x13d
#define undefined_105 0x13e
#define undefined_106 0x13f
#define CB_GETEDITSEL 0x140
#define CB_LIMITTEXT 0x141
#define CB_SETEDITSEL 0x142
#define CB_ADDSTRING 0x143
#define CB_DELETESTRING 0x144
#define CB_DIR 0x145
#define CB_GETCOUNT 0x146
#define CB_GETCURSEL 0x147
#define CB_GETLBTEXT 0x148
#define CB_GETLBTEXTLEN 0x149
#define CB_INSERTSTRING 0x14a
#define CB_RESETCONTENT 0x14b
#define CB_FINDSTRING 0x14c
#define CB_SELECTSTRING 0x14d
#define CB_SETCURSEL 0x14e
#define CB_SHOWDROPDOWN 0x14f
#define CB_GETITEMDATA 0x150
#define CB_SETITEMDATA 0x151
#define CB_GETDROPPEDCONTROLRECT 0x152
#define CB_SETITEMHEIGHT 0x153
#define CB_GETITEMHEIGHT 0x154
#define CB_SETEXTENDEDUI 0x155
#define CB_GETEXTENDEDUI 0x156
#define CB_GETDROPPEDSTATE 0x157
#define CB_FINDSTRINGEXACT 0x158
#define CB_SETLOCALE 0x159
#define CB_GETLOCALE 0x15a
#define CB_GETTOPINDEX 0x15b
#define CB_SETTOPINDEX 0x15c
#define CB_GETHORIZONTALEXTENT 0x15d
#define CB_SETHORIZONTALEXTENT 0x15e
#define CB_GETDROPPEDWIDTH 0x15f
#define CB_SETDROPPEDWIDTH 0x160
#define CB_INITSTORAGE 0x161
#define CB_MSGMAX_OLD 0x162
#define CB_MULTIPLEADDSTRING 0x163
#define CB_GETCOMBOBOXINFO 0x164
#define CB_MSGMAX 0x165
#define undefined_107 0x166
#define undefined_108 0x167
#define undefined_109 0x168
#define undefined_110 0x169
#define undefined_111 0x16a
#define undefined_112 0x16b
#define undefined_113 0x16c
#define undefined_114 0x16d
#define undefined_115 0x16e
#define undefined_116 0x16f
#define undefined_117 0x170
#define undefined_118 0x171
#define undefined_119 0x172
#define undefined_120 0x173
#define undefined_121 0x174
#define undefined_122 0x175
#define undefined_123 0x176
#define undefined_124 0x177
#define undefined_125 0x178
#define undefined_126 0x179
#define undefined_127 0x17a
#define undefined_128 0x17b
#define undefined_129 0x17c
#define undefined_130 0x17d
#define undefined_131 0x17e
#define undefined_132 0x17f
#define LB_ADDSTRING 0x180
#define LB_INSERTSTRING 0x181
#define LB_DELETESTRING 0x182
#define LB_SELITEMRANGEEX 0x183
#define LB_RESETCONTENT 0x184
#define LB_SETSEL 0x185
#define LB_SETCURSEL 0x186
#define LB_GETSEL 0x187
#define LB_GETCURSEL 0x188
#define LB_GETTEXT 0x189
#define LB_GETTEXTLEN 0x18a
#define LB_GETCOUNT 0x18b
#define LB_SELECTSTRING 0x18c
#define LB_DIR 0x18d
#define LB_GETTOPINDEX 0x18e
#define LB_FINDSTRING 0x18f
#define LB_GETSELCOUNT 0x190
#define LB_GETSELITEMS 0x191
#define LB_SETTABSTOPS 0x192
#define LB_GETHORIZONTALEXTENT 0x193
#define LB_SETHORIZONTALEXTENT 0x194
#define LB_SETCOLUMNWIDTH 0x195
#define LB_ADDFILE 0x196
#define LB_SETTOPINDEX 0x197
#define LB_GETITEMRECT 0x198
#define LB_GETITEMDATA 0x199
#define LB_SETITEMDATA 0x19a
#define LB_SELITEMRANGE 0x19b
#define LB_SETANCHORINDEX 0x19c
#define LB_GETANCHORINDEX 0x19d
#define LB_SETCARETINDEX 0x19e
#define LB_GETCARETINDEX 0x19f
#define LB_SETITEMHEIGHT 0x1a0
#define LB_GETITEMHEIGHT 0x1a1
#define LB_FINDSTRINGEXACT 0x1a2
#define LBCB_CARETON 0x1a3
#define LBCB_CARETOFF 0x1a4
#define LB_SETLOCALE 0x1a5
#define LB_GETLOCALE 0x1a6
#define LB_SETCOUNT 0x1a7
#define LB_INITSTORAGE 0x1a8
#define LB_ITEMFROMPOINT 0x1a9
#define LB_INSERTSTRINGUPPER 0x1aa
#define LB_INSERTSTRINGLOWER 0x1ab
#define LB_ADDSTRINGUPPER 0x1ac
#define LB_ADDSTRINGLOWER 0x1ad
#define LBCB_STARTTRACK 0x1ae
#define LBCB_ENDTRACK 0x1af
#define LB_MSGMAX_OLD 0x1b0
#define LB_MULTIPLEADDSTRING 0x1b1
#define LB_GETLISTBOXINFO 0x1b2
#define LB_MSGMAX 0x1b3
#define undefined_133 0x1b4
#define undefined_134 0x1b5
#define undefined_135 0x1b6
#define undefined_136 0x1b7
#define undefined_137 0x1b8
#define undefined_138 0x1b9
#define undefined_139 0x1ba
#define undefined_140 0x1bb
#define undefined_141 0x1bc
#define undefined_142 0x1bd
#define undefined_143 0x1be
#define undefined_144 0x1bf
#define undefined_145 0x1c0
#define undefined_146 0x1c1
#define undefined_147 0x1c2
#define undefined_148 0x1c3
#define undefined_149 0x1c4
#define undefined_150 0x1c5
#define undefined_151 0x1c6
#define undefined_152 0x1c7
#define undefined_153 0x1c8
#define undefined_154 0x1c9
#define undefined_155 0x1ca
#define undefined_156 0x1cb
#define undefined_157 0x1cc
#define undefined_158 0x1cd
#define undefined_159 0x1ce
#define undefined_160 0x1cf
#define undefined_161 0x1d0
#define undefined_162 0x1d1
#define undefined_163 0x1d2
#define undefined_164 0x1d3
#define undefined_165 0x1d4
#define undefined_166 0x1d5
#define undefined_167 0x1d6
#define undefined_168 0x1d7
#define undefined_169 0x1d8
#define undefined_170 0x1d9
#define undefined_171 0x1da
#define undefined_172 0x1db
#define undefined_173 0x1dc
#define undefined_174 0x1dd
#define undefined_175 0x1de
#define undefined_176 0x1df
#define MN_FIRST 0x1e0
#define MN_GETHMENU 0x1e1
#define undefined_177 0x1e2
#define undefined_178 0x1e3
#define undefined_179 0x1e4
#define undefined_180 0x1e5
#define undefined_181 0x1e6
#define undefined_182 0x1e7
#define undefined_183 0x1e8
#define undefined_184 0x1e9
#define undefined_185 0x1ea
#define undefined_186 0x1eb
#define undefined_187 0x1ec
#define undefined_188 0x1ed
#define undefined_189 0x1ee
#define undefined_190 0x1ef
#define undefined_191 0x1f0
#define undefined_192 0x1f1
#define undefined_193 0x1f2
#define undefined_194 0x1f3
#define undefined_195 0x1f4
#define undefined_196 0x1f5
#define undefined_197 0x1f6
#define undefined_198 0x1f7
#define undefined_199 0x1f8
#define undefined_200 0x1f9
#define undefined_201 0x1fa
#define undefined_202 0x1fb
#define undefined_203 0x1fc
#define undefined_204 0x1fd
#define undefined_205 0x1fe
#define undefined_206 0x1ff
#define WM_MOUSEMOVE 0x200
#define WM_LBUTTONDOWN 0x201
#define WM_LBUTTONUP 0x202
#define WM_LBUTTONDBLCLK 0x203
#define WM_RBUTTONDOWN 0x204
#define WM_RBUTTONUP 0x205
#define WM_RBUTTONDBLCLK 0x206
#define WM_MBUTTONDOWN 0x207
#define WM_MBUTTONUP 0x208
#define WM_MBUTTONDBLCLK 0x209
#define WM_MOUSEWHEEL 0x20a
#define WM_XBUTTONDOWN 0x20b
#define WM_XBUTTONUP 0x20c
#define WM_XBUTTONDBLCLK 0x20d
#define WM_MOUSEHWHEEL 0x20e
#define undefined_207 0x20f
#define WM_PARENTNOTIFY 0x210
#define WM_ENTERMENULOOP 0x211
#define WM_EXITMENULOOP 0x212
#define WM_NEXTMENU 0x213
#define WM_SIZING 0x214
#define WM_CAPTURECHANGED 0x215
#define WM_MOVING 0x216
#define undefined_208 0x217
#define WM_POWERBROADCAST 0x218
#define WM_DEVICECHANGE 0x219
#define undefined_209 0x21a
#define undefined_210 0x21b
#define undefined_211 0x21c
#define undefined_212 0x21d
#define undefined_213 0x21e
#define undefined_214 0x21f
#define WM_MDICREATE 0x220
#define WM_MDIDESTROY 0x221
#define WM_MDIACTIVATE 0x222
#define WM_MDIRESTORE 0x223
#define WM_MDINEXT 0x224
#define WM_MDIMAXIMIZE 0x225
#define WM_MDITILE 0x226
#define WM_MDICASCADE 0x227
#define WM_MDIICONARRANGE 0x228
#define WM_MDIGETACTIVE 0x229
#define WM_DROPOBJECT 0x22a
#define WM_QUERYDROPOBJECT 0x22b
#define WM_BEGINDRAG 0x22c
#define WM_DRAGLOOP 0x22d
#define WM_DRAGSELECT 0x22e
#define WM_DRAGMOVE 0x22f
#define WM_MDISETMENU 0x230
#define WM_ENTERSIZEMOVE 0x231
#define WM_EXITSIZEMOVE 0x232
#define WM_DROPFILES 0x233
#define WM_MDIREFRESHMENU 0x234
#define undefined_215 0x235
#define undefined_216 0x236
#define undefined_217 0x237
#define WM_POINTERDEVICECHANGE 0x238
#define WM_POINTERDEVICEINRANGE 0x239
#define WM_POINTERDEVICEOUTOFRANGE 0x23a
#define WM_STOPINERTIA 0x23b
#define WM_ENDINERTIA 0x23c
#define WM_EDGYINERTIA 0x23d
#define undefined_218 0x23e
#define undefined_219 0x23f
#define WM_TOUCH 0x240
#define WM_NCPOINTERUPDATE 0x241
#define WM_NCPOINTERDOWN 0x242
#define WM_NCPOINTERUP 0x243
#define WM_NCPOINTERLAST 0x244
#define WM_POINTERUPDATE 0x245
#define WM_POINTERDOWN 0x246
#define WM_POINTERUP 0x247
#define WM_POINTER_reserved_248 0x248
#define WM_POINTERENTER 0x249
#define WM_POINTERLEAVE 0x24a
#define WM_POINTERACTIVATE 0x24b
#define WM_POINTERCAPTURECHANGED 0x24c
#define WM_TOUCHHITTESTING 0x24d
#define WM_POINTERWHEEL 0x24e
#define WM_POINTERHWHEEL 0x24f
#define WM_POINTER_reserved_250 0x250
#define WM_POINTER_reserved_251 0x251
#define WM_POINTER_reserved_252 0x252
#define WM_POINTER_reserved_253 0x253
#define WM_POINTER_reserved_254 0x254
#define WM_POINTER_reserved_255 0x255
#define WM_POINTER_reserved_256 0x256
#define WM_POINTERLAST 0x257
#define undefined_220 0x258
#define undefined_221 0x259
#define undefined_222 0x25a
#define undefined_223 0x25b
#define undefined_224 0x25c
#define undefined_225 0x25d
#define undefined_226 0x25e
#define undefined_227 0x25f
#define undefined_228 0x260
#define undefined_229 0x261
#define undefined_230 0x262
#define undefined_231 0x263
#define undefined_232 0x264
#define undefined_233 0x265
#define undefined_234 0x266
#define undefined_235 0x267
#define undefined_236 0x268
#define undefined_237 0x269
#define undefined_238 0x26a
#define undefined_239 0x26b
#define undefined_240 0x26c
#define undefined_241 0x26d
#define undefined_242 0x26e
#define undefined_243 0x26f
#define WM_VISIBILITYCHANGED 0x270
#define WM_VIEWSTATECHANGED 0x271
#define WM_UNREGISTER_WINDOW_SERVICES 0x272
#define WM_CONSOLIDATED 0x273
#define undefined_244 0x274
#define undefined_245 0x275
#define undefined_246 0x276
#define undefined_247 0x277
#define undefined_248 0x278
#define undefined_249 0x279
#define undefined_250 0x27a
#define undefined_251 0x27b
#define undefined_252 0x27c
#define undefined_253 0x27d
#define undefined_254 0x27e
#define undefined_255 0x27f
#define WM_IME_REPORT 0x280
#define WM_IME_SETCONTEXT 0x281
#define WM_IME_NOTIFY 0x282
#define WM_IME_CONTROL 0x283
#define WM_IME_COMPOSITIONFULL 0x284
#define WM_IME_SELECT 0x285
#define WM_IME_CHAR 0x286
#define WM_IME_SYSTEM 0x287
#define WM_IME_REQUEST 0x288
#define WM_KANJI_reserved_289 0x289
#define WM_KANJI_reserved_28a 0x28a
#define WM_KANJI_reserved_28b 0x28b
#define WM_KANJI_reserved_28c 0x28c
#define WM_KANJI_reserved_28d 0x28d
#define WM_KANJI_reserved_28e 0x28e
#define WM_KANJI_reserved_28f 0x28f
#define WM_IME_KEYDOWN 0x290
#define WM_IME_KEYUP 0x291
#define WM_KANJI_reserved_292 0x292
#define WM_KANJI_reserved_293 0x293
#define WM_KANJI_reserved_294 0x294
#define WM_KANJI_reserved_295 0x295
#define WM_KANJI_reserved_296 0x296
#define WM_KANJI_reserved_297 0x297
#define WM_KANJI_reserved_298 0x298
#define WM_KANJI_reserved_299 0x299
#define WM_KANJI_reserved_29a 0x29a
#define WM_KANJI_reserved_29b 0x29b
#define WM_KANJI_reserved_29c 0x29c
#define WM_KANJI_reserved_29d 0x29d
#define WM_KANJI_reserved_29e 0x29e
#define WM_KANJILAST 0x29f
#define WM_NCMOUSEHOVER 0x2a0
#define WM_MOUSEHOVER 0x2a1
#define WM_NCMOUSELEAVE 0x2a2
#define WM_MOUSELEAVE 0x2a3
#define WM_TRACKMOUSEEVENT__reserved_2a4 0x2a4
#define WM_TRACKMOUSEEVENT__reserved_2a5 0x2a5
#define WM_TRACKMOUSEEVENT__reserved_2a6 0x2a6
#define WM_TRACKMOUSEEVENT__reserved_2a7 0x2a7
#define WM_TRACKMOUSEEVENT__reserved_2a8 0x2a8
#define WM_TRACKMOUSEEVENT__reserved_2a9 0x2a9
#define WM_TRACKMOUSEEVENT__reserved_2aa 0x2aa
#define WM_TRACKMOUSEEVENT__reserved_2ab 0x2ab
#define WM_TRACKMOUSEEVENT__reserved_2ac 0x2ac
#define WM_TRACKMOUSEEVENT__reserved_2ad 0x2ad
#define WM_TRACKMOUSEEVENT__reserved_2ae 0x2ae
#define WM_TRACKMOUSEEVENT_LAST 0x2af
#define undefined_256 0x2b0
#define WM_WTSSESSION_CHANGE 0x2b1
#define undefined_257 0x2b2
#define undefined_258 0x2b3
#define undefined_259 0x2b4
#define undefined_260 0x2b5
#define undefined_261 0x2b6
#define undefined_262 0x2b7
#define undefined_263 0x2b8
#define undefined_264 0x2b9
#define undefined_265 0x2ba
#define undefined_266 0x2bb
#define undefined_267 0x2bc
#define undefined_268 0x2bd
#define undefined_269 0x2be
#define undefined_270 0x2bf
#define WM_TABLET_FIRST 0x2c0
#define WM_TABLET__reserved_2c1 0x2c1
#define WM_TABLET__reserved_2c2 0x2c2
#define WM_TABLET__reserved_2c3 0x2c3
#define WM_TABLET__reserved_2c4 0x2c4
#define WM_TABLET__reserved_2c5 0x2c5
#define WM_TABLET__reserved_2c6 0x2c6
#define WM_TABLET__reserved_2c7 0x2c7
#define WM_POINTERDEVICEADDED 0x2c8
#define WM_POINTERDEVICEDELETED 0x2c9
#define WM_TABLET__reserved_2ca 0x2ca
#define WM_FLICK 0x2cb
#define WM_TABLET__reserved_2cc 0x2cc
#define WM_FLICKINTERNAL 0x2cd
#define WM_BRIGHTNESSCHANGED 0x2ce
#define WM_TABLET__reserved_2cf 0x2cf
#define WM_TABLET__reserved_2d0 0x2d0
#define WM_TABLET__reserved_2d1 0x2d1
#define WM_TABLET__reserved_2d2 0x2d2
#define WM_TABLET__reserved_2d3 0x2d3
#define WM_TABLET__reserved_2d4 0x2d4
#define WM_TABLET__reserved_2d5 0x2d5
#define WM_TABLET__reserved_2d6 0x2d6
#define WM_TABLET__reserved_2d7 0x2d7
#define WM_TABLET__reserved_2d8 0x2d8
#define WM_TABLET__reserved_2d9 0x2d9
#define WM_TABLET__reserved_2da 0x2da
#define WM_TABLET__reserved_2db 0x2db
#define WM_TABLET__reserved_2dc 0x2dc
#define WM_TABLET__reserved_2dd 0x2dd
#define WM_TABLET__reserved_2de 0x2de
#define WM_TABLET_LAST 0x2df
#define WM_DPICHANGED 0x2e0
#define undefined_271 0x2e1
#define undefined_272 0x2e2
#define undefined_273 0x2e3
#define undefined_274 0x2e4
#define undefined_275 0x2e5
#define undefined_276 0x2e6
#define undefined_277 0x2e7
#define undefined_278 0x2e8
#define undefined_279 0x2e9
#define undefined_280 0x2ea
#define undefined_281 0x2eb
#define undefined_282 0x2ec
#define undefined_283 0x2ed
#define undefined_284 0x2ee
#define undefined_285 0x2ef
#define undefined_286 0x2f0
#define undefined_287 0x2f1
#define undefined_288 0x2f2
#define undefined_289 0x2f3
#define undefined_290 0x2f4
#define undefined_291 0x2f5
#define undefined_292 0x2f6
#define undefined_293 0x2f7
#define undefined_294 0x2f8
#define undefined_295 0x2f9
#define undefined_296 0x2fa
#define undefined_297 0x2fb
#define undefined_298 0x2fc
#define undefined_299 0x2fd
#define undefined_300 0x2fe
#define undefined_301 0x2ff
#define WM_CUT 0x300
#define WM_COPY 0x301
#define WM_PASTE 0x302
#define WM_CLEAR 0x303
#define WM_UNDO 0x304
#define WM_RENDERFORMAT 0x305
#define WM_RENDERALLFORMATS 0x306
#define WM_DESTROYCLIPBOARD 0x307
#define WM_DRAWCLIPBOARD 0x308
#define WM_PAINTCLIPBOARD 0x309
#define WM_VSCROLLCLIPBOARD 0x30a
#define WM_SIZECLIPBOARD 0x30b
#define WM_ASKCBFORMATNAME 0x30c
#define WM_CHANGECBCHAIN 0x30d
#define WM_HSCROLLCLIPBOARD 0x30e
#define WM_QUERYNEWPALETTE 0x30f
#define WM_PALETTEISCHANGING 0x310
#define WM_PALETTECHANGED 0x311
#define WM_HOTKEY 0x312
#define WM_SYSMENU 0x313
#define WM_HOOKMSG 0x314
#define WM_EXITPROCESS 0x315
#define WM_WAKETHREAD 0x316
#define WM_PRINT 0x317
#define WM_PRINTCLIENT 0x318
#define WM_APPCOMMAND 0x319
#define WM_THEMECHANGED 0x31a
#define WM_UAHINIT 0x31b
#define WM_DESKTOPNOTIFY 0x31c
#define WM_CLIPBOARDUPDATE 0x31d
#define WM_DWMCOMPOSITIONCHANGED 0x31e
#define WM_DWMNCRENDERINGCHANGED 0x31f
#define WM_DWMCOLORIZATIONCOLORCHANGED 0x320
#define WM_DWMWINDOWMAXIMIZEDCHANGE 0x321
#define WM_DWMEXILEFRAME 0x322
#define WM_DWMSENDICONICTHUMBNAIL 0x323
#define WM_MAGNIFICATION_STARTED 0x324
#define WM_MAGNIFICATION_ENDED 0x325
#define WM_DWMSENDICONICLIVEPREVIEWBITMAP 0x326
#define WM_DWMTHUMBNAILSIZECHANGED 0x327
#define WM_MAGNIFICATION_OUTPUT 0x328
#define WM_BSDRDATA 0x329
#define WM_DWMTRANSITIONSTATECHANGED 0x32a
#define undefined_302 0x32b
#define WM_KEYBOARDCORRECTIONCALLOUT 0x32c
#define WM_KEYBOARDCORRECTIONACTION 0x32d
#define WM_UIACTION 0x32e
#define WM_ROUTED_UI_EVENT 0x32f
#define WM_MEASURECONTROL 0x330
#define WM_GETACTIONTEXT 0x331
#define WM_CE_ONLY__reserved_332 0x332
#define WM_FORWARDKEYDOWN 0x333
#define WM_FORWARDKEYUP 0x334
#define WM_CE_ONLY__reserved_335 0x335
#define WM_CE_ONLY__reserved_336 0x336
#define WM_CE_ONLY__reserved_337 0x337
#define WM_CE_ONLY__reserved_338 0x338
#define WM_CE_ONLY__reserved_339 0x339
#define WM_CE_ONLY__reserved_33a 0x33a
#define WM_CE_ONLY__reserved_33b 0x33b
#define WM_CE_ONLY__reserved_33c 0x33c
#define WM_CE_ONLY__reserved_33d 0x33d
#define WM_CE_ONLY_LAST 0x33e
#define WM_GETTITLEBARINFOEX 0x33f
#define WM_NOTIFYWOW 0x340
#define undefined_303 0x341
#define undefined_304 0x342
#define undefined_305 0x343
#define undefined_306 0x344
#define undefined_307 0x345
#define undefined_308 0x346
#define undefined_309 0x347
#define undefined_310 0x348
#define undefined_311 0x349
#define undefined_312 0x34a
#define undefined_313 0x34b
#define undefined_314 0x34c
#define undefined_315 0x34d
#define undefined_316 0x34e
#define undefined_317 0x34f
#define undefined_318 0x350
#define undefined_319 0x351
#define undefined_320 0x352
#define undefined_321 0x353
#define undefined_322 0x354
#define undefined_323 0x355
#define undefined_324 0x356
#define undefined_325 0x357
#define WM_HANDHELDFIRST 0x358
#define WM_HANDHELD_reserved_359 0x359
#define WM_HANDHELD_reserved_35a 0x35a
#define WM_HANDHELD_reserved_35b 0x35b
#define WM_HANDHELD_reserved_35c 0x35c
#define WM_HANDHELD_reserved_35d 0x35d
#define WM_HANDHELD_reserved_35e 0x35e
#define WM_HANDHELDLAST 0x35f
#define WM_AFXFIRST 0x360
#define WM_AFX_reserved_361 0x361
#define WM_AFX_reserved_362 0x362
#define WM_AFX_reserved_363 0x363
#define WM_AFX_reserved_364 0x364
#define WM_AFX_reserved_365 0x365
#define WM_AFX_reserved_366 0x366
#define WM_AFX_reserved_367 0x367
#define WM_AFX_reserved_368 0x368
#define WM_AFX_reserved_369 0x369
#define WM_AFX_reserved_36a 0x36a
#define WM_AFX_reserved_36b 0x36b
#define WM_AFX_reserved_36c 0x36c
#define WM_AFX_reserved_36d 0x36d
#define WM_AFX_reserved_36e 0x36e
#define WM_AFX_reserved_36f 0x36f
#define WM_AFX_reserved_370 0x370
#define WM_AFX_reserved_371 0x371
#define WM_AFX_reserved_372 0x372
#define WM_AFX_reserved_373 0x373
#define WM_AFX_reserved_374 0x374
#define WM_AFX_reserved_375 0x375
#define WM_AFX_reserved_376 0x376
#define WM_AFX_reserved_377 0x377
#define WM_AFX_reserved_378 0x378
#define WM_AFX_reserved_379 0x379
#define WM_AFX_reserved_37a 0x37a
#define WM_AFX_reserved_37b 0x37b
#define WM_AFX_reserved_37c 0x37c
#define WM_AFX_reserved_37d 0x37d
#define WM_AFX_reserved_37e 0x37e
#define WM_AFXLAST 0x37f
#define WM_PENWINFIRST 0x380
#define WM_PENWIN_reserved_381 0x381
#define WM_PENWIN_reserved_382 0x382
#define WM_PENWIN_reserved_383 0x383
#define WM_PENWIN_reserved_384 0x384
#define WM_PENWIN_reserved_385 0x385
#define WM_PENWIN_reserved_386 0x386
#define WM_PENWIN_reserved_387 0x387
#define WM_PENWIN_reserved_388 0x388
#define WM_PENWIN_reserved_389 0x389
#define WM_PENWIN_reserved_38a 0x38a
#define WM_PENWIN_reserved_38b 0x38b
#define WM_PENWIN_reserved_38c 0x38c
#define WM_PENWIN_reserved_38d 0x38d
#define WM_PENWIN_reserved_38e 0x38e
#define WM_PENWINLAST 0x38f
#define WM_COALESCE_FIRST 0x390
#define WM_COALESCE__reserved_391 0x391
#define WM_COALESCE__reserved_392 0x392
#define WM_COALESCE__reserved_393 0x393
#define WM_COALESCE__reserved_394 0x394
#define WM_COALESCE__reserved_395 0x395
#define WM_COALESCE__reserved_396 0x396
#define WM_COALESCE__reserved_397 0x397
#define WM_COALESCE__reserved_398 0x398
#define WM_COALESCE__reserved_399 0x399
#define WM_COALESCE__reserved_39a 0x39a
#define WM_COALESCE__reserved_39b 0x39b
#define WM_COALESCE__reserved_39c 0x39c
#define WM_COALESCE__reserved_39d 0x39d
#define WM_COALESCE__reserved_39e 0x39e
#define WM_COALESCE_LAST 0x39f
#define WM_MM_RESERVED_FIRST 0x3a0
#define WM_MM_RESERVED__reserved_3a1 0x3a1
#define WM_MM_RESERVED__reserved_3a2 0x3a2
#define WM_MM_RESERVED__reserved_3a3 0x3a3
#define WM_MM_RESERVED__reserved_3a4 0x3a4
#define WM_MM_RESERVED__reserved_3a5 0x3a5
#define WM_MM_RESERVED__reserved_3a6 0x3a6
#define WM_MM_RESERVED__reserved_3a7 0x3a7
#define WM_MM_RESERVED__reserved_3a8 0x3a8
#define WM_MM_RESERVED__reserved_3a9 0x3a9
#define WM_MM_RESERVED__reserved_3aa 0x3aa
#define WM_MM_RESERVED__reserved_3ab 0x3ab
#define WM_MM_RESERVED__reserved_3ac 0x3ac
#define WM_MM_RESERVED__reserved_3ad 0x3ad
#define WM_MM_RESERVED__reserved_3ae 0x3ae
#define WM_MM_RESERVED__reserved_3af 0x3af
#define WM_MM_RESERVED__reserved_3b0 0x3b0
#define WM_MM_RESERVED__reserved_3b1 0x3b1
#define WM_MM_RESERVED__reserved_3b2 0x3b2
#define WM_MM_RESERVED__reserved_3b3 0x3b3
#define WM_MM_RESERVED__reserved_3b4 0x3b4
#define WM_MM_RESERVED__reserved_3b5 0x3b5
#define WM_MM_RESERVED__reserved_3b6 0x3b6
#define WM_MM_RESERVED__reserved_3b7 0x3b7
#define WM_MM_RESERVED__reserved_3b8 0x3b8
#define WM_MM_RESERVED__reserved_3b9 0x3b9
#define WM_MM_RESERVED__reserved_3ba 0x3ba
#define WM_MM_RESERVED__reserved_3bb 0x3bb
#define WM_MM_RESERVED__reserved_3bc 0x3bc
#define WM_MM_RESERVED__reserved_3bd 0x3bd
#define WM_MM_RESERVED__reserved_3be 0x3be
#define WM_MM_RESERVED__reserved_3bf 0x3bf
#define WM_MM_RESERVED__reserved_3c0 0x3c0
#define WM_MM_RESERVED__reserved_3c1 0x3c1
#define WM_MM_RESERVED__reserved_3c2 0x3c2
#define WM_MM_RESERVED__reserved_3c3 0x3c3
#define WM_MM_RESERVED__reserved_3c4 0x3c4
#define WM_MM_RESERVED__reserved_3c5 0x3c5
#define WM_MM_RESERVED__reserved_3c6 0x3c6
#define WM_MM_RESERVED__reserved_3c7 0x3c7
#define WM_MM_RESERVED__reserved_3c8 0x3c8
#define WM_MM_RESERVED__reserved_3c9 0x3c9
#define WM_MM_RESERVED__reserved_3ca 0x3ca
#define WM_MM_RESERVED__reserved_3cb 0x3cb
#define WM_MM_RESERVED__reserved_3cc 0x3cc
#define WM_MM_RESERVED__reserved_3cd 0x3cd
#define WM_MM_RESERVED__reserved_3ce 0x3ce
#define WM_MM_RESERVED__reserved_3cf 0x3cf
#define WM_MM_RESERVED__reserved_3d0 0x3d0
#define WM_MM_RESERVED__reserved_3d1 0x3d1
#define WM_MM_RESERVED__reserved_3d2 0x3d2
#define WM_MM_RESERVED__reserved_3d3 0x3d3
#define WM_MM_RESERVED__reserved_3d4 0x3d4
#define WM_MM_RESERVED__reserved_3d5 0x3d5
#define WM_MM_RESERVED__reserved_3d6 0x3d6
#define WM_MM_RESERVED__reserved_3d7 0x3d7
#define WM_MM_RESERVED__reserved_3d8 0x3d8
#define WM_MM_RESERVED__reserved_3d9 0x3d9
#define WM_MM_RESERVED__reserved_3da 0x3da
#define WM_MM_RESERVED__reserved_3db 0x3db
#define WM_MM_RESERVED__reserved_3dc 0x3dc
#define WM_MM_RESERVED__reserved_3dd 0x3dd
#define WM_MM_RESERVED__reserved_3de 0x3de
#define WM_MM_RESERVED_LAST 0x3df
#define WM_INTERNAL_DDE_FIRST 0x3e0
#define WM_INTERNAL_DDE__reserved_3e1 0x3e1
#define WM_INTERNAL_DDE__reserved_3e2 0x3e2
#define WM_INTERNAL_DDE__reserved_3e3 0x3e3
#define WM_INTERNAL_DDE__reserved_3e4 0x3e4
#define WM_INTERNAL_DDE__reserved_3e5 0x3e5
#define WM_INTERNAL_DDE__reserved_3e6 0x3e6
#define WM_INTERNAL_DDE__reserved_3e7 0x3e7
#define WM_INTERNAL_DDE__reserved_3e8 0x3e8
#define WM_INTERNAL_DDE__reserved_3e9 0x3e9
#define WM_INTERNAL_DDE__reserved_3ea 0x3ea
#define WM_INTERNAL_DDE__reserved_3eb 0x3eb
#define WM_INTERNAL_DDE__reserved_3ec 0x3ec
#define WM_INTERNAL_DDE__reserved_3ed 0x3ed
#define WM_INTERNAL_DDE__reserved_3ee 0x3ee
#define WM_INTERNAL_DDE_LAST 0x3ef
#define WM_CBT_RESERVED_FIRST 0x3f0
#define WM_CBT_RESERVED__reserved_3f1 0x3f1
#define WM_CBT_RESERVED__reserved_3f2 0x3f2
#define WM_CBT_RESERVED__reserved_3f3 0x3f3
#define WM_CBT_RESERVED__reserved_3f4 0x3f4
#define WM_CBT_RESERVED__reserved_3f5 0x3f5
#define WM_CBT_RESERVED__reserved_3f6 0x3f6
#define WM_CBT_RESERVED__reserved_3f7 0x3f7
#define WM_CBT_RESERVED__reserved_3f8 0x3f8
#define WM_CBT_RESERVED__reserved_3f9 0x3f9
#define WM_CBT_RESERVED__reserved_3fa 0x3fa
#define WM_CBT_RESERVED__reserved_3fb 0x3fb
#define WM_CBT_RESERVED__reserved_3fc 0x3fc
#define WM_CBT_RESERVED__reserved_3fd 0x3fd
#define WM_CBT_RESERVED__reserved_3fe 0x3fe
#define WM_CBT_RESERVED_LAST 0x3ff
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
 
static const PCTSTR g_wmMessageStrings[] = {		
 
TEXT("WM_NULL"),
	TEXT("WM_CREATE"),
	TEXT("WM_DESTROY"),
	TEXT("WM_MOVE"),
	TEXT("WM_SIZEWAIT"),
	TEXT("WM_SIZE"),
	TEXT("WM_ACTIVATE"),
	TEXT("WM_SETFOCUS"),
	TEXT("WM_KILLFOCUS"),
	TEXT("WM_SETVISIBLE"),
	TEXT("WM_ENABLE"),
	TEXT("WM_SETREDRAW"),
	TEXT("WM_SETTEXT"),
	TEXT("WM_GETTEXT"),
	TEXT("WM_GETTEXTLENGTH"),
	TEXT("WM_PAINT"),
	TEXT("WM_CLOSE"),
	TEXT("WM_QUERYENDSESSION"),
	TEXT("WM_QUIT"),
	TEXT("WM_QUERYOPEN"),
	TEXT("WM_ERASEBKGND"),
	TEXT("WM_SYSCOLORCHANGE"),
	TEXT("WM_ENDSESSION"),
	TEXT("WM_SYSTEMERROR"),
	TEXT("WM_SHOWWINDOW"),
	TEXT("WM_CTLCOLOR"),
	TEXT("WM_WININICHANGE"),
	TEXT("WM_DEVMODECHANGE"),
	TEXT("WM_ACTIVATEAPP"),
	TEXT("WM_FONTCHANGE"),
	TEXT("WM_TIMECHANGE"),
	TEXT("WM_CANCELMODE"),
	TEXT("WM_SETCURSOR"),
	TEXT("WM_MOUSEACTIVATE"),
	TEXT("WM_CHILDACTIVATE"),
	TEXT("WM_QUEUESYNC"),
	TEXT("WM_GETMINMAXINFO"),
	TEXT("WM_LOGOFF"),
	TEXT("WM_PAINTICON"),
	TEXT("WM_ICONERASEBKGND"),
	TEXT("WM_NEXTDLGCTL"),
	TEXT("WM_ALTTABACTIVE"),
	TEXT("WM_SPOOLERSTATUS"),
	TEXT("WM_DRAWITEM"),
	TEXT("WM_MEASUREITEM"),
	TEXT("WM_DELETEITEM"),
	TEXT("WM_VKEYTOITEM"),
	TEXT("WM_CHARTOITEM"),
	TEXT("WM_SETFONT"),
	TEXT("WM_GETFONT"),
	TEXT("WM_SETHOTKEY"),
	TEXT("WM_GETHOTKEY"),
	TEXT("WM_SHELLNOTIFY"),
	TEXT("WM_ISACTIVEICON"),
	TEXT("WM_QUERYPARKICON"),
	TEXT("WM_QUERYDRAGICON"),
	TEXT("WM_WINHELP"),
	TEXT("WM_COMPAREITEM"),
	TEXT("WM_FULLSCREEN"),
	TEXT("WM_CLIENTSHUTDOWN"),
	TEXT("WM_DDEMLEVENT"),
	TEXT("WM_GETOBJECT"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_TESTING"),
	TEXT("WM_COMPACTING"),
	TEXT("WM_OTHERWINDOWCREATED"),
	TEXT("WM_OTHERWINDOWDESTROYED"),
	TEXT("WM_COMMNOTIFY"),
	TEXT("<undefined>"),
	TEXT("WM_WINDOWPOSCHANGING"),
	TEXT("WM_WINDOWPOSCHANGED"),
	TEXT("WM_POWER"),
	TEXT("WM_COPYGLOBALDATA"),
	TEXT("WM_COPYDATA"),
	TEXT("WM_CANCELJOURNAL"),
	TEXT("<undefined>"),
	TEXT("WM_KEYF1"),
	TEXT("WM_NOTIFY"),
	TEXT("WM_ACCESS_WINDOW"),
	TEXT("WM_INPUTLANGCHANGEREQUEST"),
	TEXT("WM_INPUTLANGCHANGE"),
	TEXT("WM_TCARD"),
	TEXT("WM_HELP"),
	TEXT("WM_USERCHANGED"),
	TEXT("WM_NOTIFYFORMAT"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_FINALDESTROY"),
	TEXT("WM_MEASUREITEM_CLIENTDATA"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_CONTEXTMENU"),
	TEXT("WM_STYLECHANGING"),
	TEXT("WM_STYLECHANGED"),
	TEXT("WM_DISPLAYCHANGE"),
	TEXT("WM_GETICON"),
	TEXT("WM_SETICON"),
	TEXT("WM_NCCREATE"),
	TEXT("WM_NCDESTROY"),
	TEXT("WM_NCCALCSIZE"),
	TEXT("WM_NCHITTEST"),
	TEXT("WM_NCPAINT"),
	TEXT("WM_NCACTIVATE"),
	TEXT("WM_GETDLGCODE"),
	TEXT("WM_SYNCPAINT"),
	TEXT("WM_SYNCTASK"),
	TEXT("<undefined>"),
	TEXT("WM_KLUDGEMINRECT"),
	TEXT("WM_LPKDRAWSWITCHWND"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_UAHDESTROYWINDOW"),
	TEXT("WM_UAHDRAWMENU"),
	TEXT("WM_UAHDRAWMENUITEM"),
	TEXT("WM_UAHINITMENU"),
	TEXT("WM_UAHMEASUREMENUITEM"),
	TEXT("WM_UAHNCPAINTMENUPOPUP"),
	TEXT("WM_UAHUPDATE"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_NCMOUSEMOVE"),
	TEXT("WM_NCLBUTTONDOWN"),
	TEXT("WM_NCLBUTTONUP"),
	TEXT("WM_NCLBUTTONDBLCLK"),
	TEXT("WM_NCRBUTTONDOWN"),
	TEXT("WM_NCRBUTTONUP"),
	TEXT("WM_NCRBUTTONDBLCLK"),
	TEXT("WM_NCMBUTTONDOWN"),
	TEXT("WM_NCMBUTTONUP"),
	TEXT("WM_NCMBUTTONDBLCLK"),
	TEXT("<undefined>"),
	TEXT("WM_NCXBUTTONDOWN"),
	TEXT("WM_NCXBUTTONUP"),
	TEXT("WM_NCXBUTTONDBLCLK"),
	TEXT("WM_NCUAHDRAWCAPTION"),
	TEXT("WM_NCUAHDRAWFRAME"),
	TEXT("EM_GETSEL"),
	TEXT("EM_SETSEL"),
	TEXT("EM_GETRECT"),
	TEXT("EM_SETRECT"),
	TEXT("EM_SETRECTNP"),
	TEXT("EM_SCROLL"),
	TEXT("EM_LINESCROLL"),
	TEXT("EM_SCROLLCARET"),
	TEXT("EM_GETMODIFY"),
	TEXT("EM_SETMODIFY"),
	TEXT("EM_GETLINECOUNT"),
	TEXT("EM_LINEINDEX"),
	TEXT("EM_SETHANDLE"),
	TEXT("EM_GETHANDLE"),
	TEXT("EM_GETTHUMB"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("EM_LINELENGTH"),
	TEXT("EM_REPLACESEL"),
	TEXT("EM_SETFONT"),
	TEXT("EM_GETLINE"),
	TEXT("EM_LIMITTEXT"),
	TEXT("EM_CANUNDO"),
	TEXT("EM_UNDO"),
	TEXT("EM_FMTLINES"),
	TEXT("EM_LINEFROMCHAR"),
	TEXT("EM_SETWORDBREAK"),
	TEXT("EM_SETTABSTOPS"),
	TEXT("EM_SETPASSWORDCHAR"),
	TEXT("EM_EMPTYUNDOBUFFER"),
	TEXT("EM_GETFIRSTVISIBLELINE"),
	TEXT("EM_SETREADONLY"),
	TEXT("EM_SETWORDBREAKPROC"),
	TEXT("EM_GETWORDBREAKPROC"),
	TEXT("EM_GETPASSWORDCHAR"),
	TEXT("EM_SETMARGINS"),
	TEXT("EM_GETMARGINS"),
	TEXT("EM_GETLIMITTEXT"),
	TEXT("EM_POSFROMCHAR"),
	TEXT("EM_CHARFROMPOS"),
	TEXT("EM_SETIMESTATUS"),
	TEXT("EM_GETIMESTATUS"),
	TEXT("EM_MSGMAX"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_INPUT_DEVICE_CHANGE"),
	TEXT("WM_INPUT"),
	TEXT("WM_KEYDOWN"),
	TEXT("WM_KEYUP"),
	TEXT("WM_CHAR"),
	TEXT("WM_DEADCHAR"),
	TEXT("WM_SYSKEYDOWN"),
	TEXT("WM_SYSKEYUP"),
	TEXT("WM_SYSCHAR"),
	TEXT("WM_SYSDEADCHAR"),
	TEXT("WM_YOMICHAR"),
	TEXT("WM_UNICHAR"),
	TEXT("WM_CONVERTREQUEST"),
	TEXT("WM_CONVERTRESULT"),
	TEXT("WM_INTERIM"),
	TEXT("WM_IME_STARTCOMPOSITION"),
	TEXT("WM_IME_ENDCOMPOSITION"),
	TEXT("WM_IME_COMPOSITION"),
	TEXT("WM_INITDIALOG"),
	TEXT("WM_COMMAND"),
	TEXT("WM_SYSCOMMAND"),
	TEXT("WM_TIMER"),
	TEXT("WM_HSCROLL"),
	TEXT("WM_VSCROLL"),
	TEXT("WM_INITMENU"),
	TEXT("WM_INITMENUPOPUP"),
	TEXT("WM_SYSTIMER"),
	TEXT("WM_GESTURE"),
	TEXT("WM_GESTURENOTIFY"),
	TEXT("WM_GESTUREINPUT"),
	TEXT("WM_GESTURENOTIFIED"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_MENUSELECT"),
	TEXT("WM_MENUCHAR"),
	TEXT("WM_ENTERIDLE"),
	TEXT("WM_MENURBUTTONUP"),
	TEXT("WM_MENUDRAG"),
	TEXT("WM_MENUGETOBJECT"),
	TEXT("WM_UNINITMENUPOPUP"),
	TEXT("WM_MENUCOMMAND"),
	TEXT("WM_CHANGEUISTATE"),
	TEXT("WM_UPDATEUISTATE"),
	TEXT("WM_QUERYUISTATE"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_LBTRACKPOINT"),
	TEXT("WM_CTLCOLORMSGBOX"),
	TEXT("WM_CTLCOLOREDIT"),
	TEXT("WM_CTLCOLORLISTBOX"),
	TEXT("WM_CTLCOLORBTN"),
	TEXT("WM_CTLCOLORDLG"),
	TEXT("WM_CTLCOLORSCROLLBAR"),
	TEXT("WM_CTLCOLORSTATIC"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("CB_GETEDITSEL"),
	TEXT("CB_LIMITTEXT"),
	TEXT("CB_SETEDITSEL"),
	TEXT("CB_ADDSTRING"),
	TEXT("CB_DELETESTRING"),
	TEXT("CB_DIR"),
	TEXT("CB_GETCOUNT"),
	TEXT("CB_GETCURSEL"),
	TEXT("CB_GETLBTEXT"),
	TEXT("CB_GETLBTEXTLEN"),
	TEXT("CB_INSERTSTRING"),
	TEXT("CB_RESETCONTENT"),
	TEXT("CB_FINDSTRING"),
	TEXT("CB_SELECTSTRING"),
	TEXT("CB_SETCURSEL"),
	TEXT("CB_SHOWDROPDOWN"),
	TEXT("CB_GETITEMDATA"),
	TEXT("CB_SETITEMDATA"),
	TEXT("CB_GETDROPPEDCONTROLRECT"),
	TEXT("CB_SETITEMHEIGHT"),
	TEXT("CB_GETITEMHEIGHT"),
	TEXT("CB_SETEXTENDEDUI"),
	TEXT("CB_GETEXTENDEDUI"),
	TEXT("CB_GETDROPPEDSTATE"),
	TEXT("CB_FINDSTRINGEXACT"),
	TEXT("CB_SETLOCALE"),
	TEXT("CB_GETLOCALE"),
	TEXT("CB_GETTOPINDEX"),
	TEXT("CB_SETTOPINDEX"),
	TEXT("CB_GETHORIZONTALEXTENT"),
	TEXT("CB_SETHORIZONTALEXTENT"),
	TEXT("CB_GETDROPPEDWIDTH"),
	TEXT("CB_SETDROPPEDWIDTH"),
	TEXT("CB_INITSTORAGE"),
	TEXT("CB_MSGMAX_OLD"),
	TEXT("CB_MULTIPLEADDSTRING"),
	TEXT("CB_GETCOMBOBOXINFO"),
	TEXT("CB_MSGMAX"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("LB_ADDSTRING"),
	TEXT("LB_INSERTSTRING"),
	TEXT("LB_DELETESTRING"),
	TEXT("LB_SELITEMRANGEEX"),
	TEXT("LB_RESETCONTENT"),
	TEXT("LB_SETSEL"),
	TEXT("LB_SETCURSEL"),
	TEXT("LB_GETSEL"),
	TEXT("LB_GETCURSEL"),
	TEXT("LB_GETTEXT"),
	TEXT("LB_GETTEXTLEN"),
	TEXT("LB_GETCOUNT"),
	TEXT("LB_SELECTSTRING"),
	TEXT("LB_DIR"),
	TEXT("LB_GETTOPINDEX"),
	TEXT("LB_FINDSTRING"),
	TEXT("LB_GETSELCOUNT"),
	TEXT("LB_GETSELITEMS"),
	TEXT("LB_SETTABSTOPS"),
	TEXT("LB_GETHORIZONTALEXTENT"),
	TEXT("LB_SETHORIZONTALEXTENT"),
	TEXT("LB_SETCOLUMNWIDTH"),
	TEXT("LB_ADDFILE"),
	TEXT("LB_SETTOPINDEX"),
	TEXT("LB_GETITEMRECT"),
	TEXT("LB_GETITEMDATA"),
	TEXT("LB_SETITEMDATA"),
	TEXT("LB_SELITEMRANGE"),
	TEXT("LB_SETANCHORINDEX"),
	TEXT("LB_GETANCHORINDEX"),
	TEXT("LB_SETCARETINDEX"),
	TEXT("LB_GETCARETINDEX"),
	TEXT("LB_SETITEMHEIGHT"),
	TEXT("LB_GETITEMHEIGHT"),
	TEXT("LB_FINDSTRINGEXACT"),
	TEXT("LBCB_CARETON"),
	TEXT("LBCB_CARETOFF"),
	TEXT("LB_SETLOCALE"),
	TEXT("LB_GETLOCALE"),
	TEXT("LB_SETCOUNT"),
	TEXT("LB_INITSTORAGE"),
	TEXT("LB_ITEMFROMPOINT"),
	TEXT("LB_INSERTSTRINGUPPER"),
	TEXT("LB_INSERTSTRINGLOWER"),
	TEXT("LB_ADDSTRINGUPPER"),
	TEXT("LB_ADDSTRINGLOWER"),
	TEXT("LBCB_STARTTRACK"),
	TEXT("LBCB_ENDTRACK"),
	TEXT("LB_MSGMAX_OLD"),
	TEXT("LB_MULTIPLEADDSTRING"),
	TEXT("LB_GETLISTBOXINFO"),
	TEXT("LB_MSGMAX"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("MN_FIRST"),
	TEXT("MN_GETHMENU"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_MOUSEMOVE"),
	TEXT("WM_LBUTTONDOWN"),
	TEXT("WM_LBUTTONUP"),
	TEXT("WM_LBUTTONDBLCLK"),
	TEXT("WM_RBUTTONDOWN"),
	TEXT("WM_RBUTTONUP"),
	TEXT("WM_RBUTTONDBLCLK"),
	TEXT("WM_MBUTTONDOWN"),
	TEXT("WM_MBUTTONUP"),
	TEXT("WM_MBUTTONDBLCLK"),
	TEXT("WM_MOUSEWHEEL"),
	TEXT("WM_XBUTTONDOWN"),
	TEXT("WM_XBUTTONUP"),
	TEXT("WM_XBUTTONDBLCLK"),
	TEXT("WM_MOUSEHWHEEL"),
	TEXT("<undefined>"),
	TEXT("WM_PARENTNOTIFY"),
	TEXT("WM_ENTERMENULOOP"),
	TEXT("WM_EXITMENULOOP"),
	TEXT("WM_NEXTMENU"),
	TEXT("WM_SIZING"),
	TEXT("WM_CAPTURECHANGED"),
	TEXT("WM_MOVING"),
	TEXT("<undefined>"),
	TEXT("WM_POWERBROADCAST"),
	TEXT("WM_DEVICECHANGE"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_MDICREATE"),
	TEXT("WM_MDIDESTROY"),
	TEXT("WM_MDIACTIVATE"),
	TEXT("WM_MDIRESTORE"),
	TEXT("WM_MDINEXT"),
	TEXT("WM_MDIMAXIMIZE"),
	TEXT("WM_MDITILE"),
	TEXT("WM_MDICASCADE"),
	TEXT("WM_MDIICONARRANGE"),
	TEXT("WM_MDIGETACTIVE"),
	TEXT("WM_DROPOBJECT"),
	TEXT("WM_QUERYDROPOBJECT"),
	TEXT("WM_BEGINDRAG"),
	TEXT("WM_DRAGLOOP"),
	TEXT("WM_DRAGSELECT"),
	TEXT("WM_DRAGMOVE"),
	TEXT("WM_MDISETMENU"),
	TEXT("WM_ENTERSIZEMOVE"),
	TEXT("WM_EXITSIZEMOVE"),
	TEXT("WM_DROPFILES"),
	TEXT("WM_MDIREFRESHMENU"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_POINTERDEVICECHANGE"),
	TEXT("WM_POINTERDEVICEINRANGE"),
	TEXT("WM_POINTERDEVICEOUTOFRANGE"),
	TEXT("WM_STOPINERTIA"),
	TEXT("WM_ENDINERTIA"),
	TEXT("WM_EDGYINERTIA"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_TOUCH"),
	TEXT("WM_NCPOINTERUPDATE"),
	TEXT("WM_NCPOINTERDOWN"),
	TEXT("WM_NCPOINTERUP"),
	TEXT("WM_NCPOINTERLAST"),
	TEXT("WM_POINTERUPDATE"),
	TEXT("WM_POINTERDOWN"),
	TEXT("WM_POINTERUP"),
	TEXT("<WM_POINTER_reserved_248>"),
	TEXT("WM_POINTERENTER"),
	TEXT("WM_POINTERLEAVE"),
	TEXT("WM_POINTERACTIVATE"),
	TEXT("WM_POINTERCAPTURECHANGED"),
	TEXT("WM_TOUCHHITTESTING"),
	TEXT("WM_POINTERWHEEL"),
	TEXT("WM_POINTERHWHEEL"),
	TEXT("<WM_POINTER_reserved_250>"),
	TEXT("<WM_POINTER_reserved_251>"),
	TEXT("<WM_POINTER_reserved_252>"),
	TEXT("<WM_POINTER_reserved_253>"),
	TEXT("<WM_POINTER_reserved_254>"),
	TEXT("<WM_POINTER_reserved_255>"),
	TEXT("<WM_POINTER_reserved_256>"),
	TEXT("WM_POINTERLAST"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_VISIBILITYCHANGED"),
	TEXT("WM_VIEWSTATECHANGED"),
	TEXT("WM_UNREGISTER_WINDOW_SERVICES"),
	TEXT("WM_CONSOLIDATED"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_IME_REPORT"),
	TEXT("WM_IME_SETCONTEXT"),
	TEXT("WM_IME_NOTIFY"),
	TEXT("WM_IME_CONTROL"),
	TEXT("WM_IME_COMPOSITIONFULL"),
	TEXT("WM_IME_SELECT"),
	TEXT("WM_IME_CHAR"),
	TEXT("WM_IME_SYSTEM"),
	TEXT("WM_IME_REQUEST"),
	TEXT("<WM_KANJI_reserved_289>"),
	TEXT("<WM_KANJI_reserved_28a>"),
	TEXT("<WM_KANJI_reserved_28b>"),
	TEXT("<WM_KANJI_reserved_28c>"),
	TEXT("<WM_KANJI_reserved_28d>"),
	TEXT("<WM_KANJI_reserved_28e>"),
	TEXT("<WM_KANJI_reserved_28f>"),
	TEXT("WM_IME_KEYDOWN"),
	TEXT("WM_IME_KEYUP"),
	TEXT("<WM_KANJI_reserved_292>"),
	TEXT("<WM_KANJI_reserved_293>"),
	TEXT("<WM_KANJI_reserved_294>"),
	TEXT("<WM_KANJI_reserved_295>"),
	TEXT("<WM_KANJI_reserved_296>"),
	TEXT("<WM_KANJI_reserved_297>"),
	TEXT("<WM_KANJI_reserved_298>"),
	TEXT("<WM_KANJI_reserved_299>"),
	TEXT("<WM_KANJI_reserved_29a>"),
	TEXT("<WM_KANJI_reserved_29b>"),
	TEXT("<WM_KANJI_reserved_29c>"),
	TEXT("<WM_KANJI_reserved_29d>"),
	TEXT("<WM_KANJI_reserved_29e>"),
	TEXT("WM_KANJILAST"),
	TEXT("WM_NCMOUSEHOVER"),
	TEXT("WM_MOUSEHOVER"),
	TEXT("WM_NCMOUSELEAVE"),
	TEXT("WM_MOUSELEAVE"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2a4>"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2a5>"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2a6>"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2a7>"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2a8>"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2a9>"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2aa>"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2ab>"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2ac>"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2ad>"),
	TEXT("<WM_TRACKMOUSEEVENT__reserved_2ae>"),
	TEXT("WM_TRACKMOUSEEVENT_LAST"),
	TEXT("<undefined>"),
	TEXT("WM_WTSSESSION_CHANGE"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_TABLET_FIRST"),
	TEXT("<WM_TABLET__reserved_2c1>"),
	TEXT("<WM_TABLET__reserved_2c2>"),
	TEXT("<WM_TABLET__reserved_2c3>"),
	TEXT("<WM_TABLET__reserved_2c4>"),
	TEXT("<WM_TABLET__reserved_2c5>"),
	TEXT("<WM_TABLET__reserved_2c6>"),
	TEXT("<WM_TABLET__reserved_2c7>"),
	TEXT("WM_POINTERDEVICEADDED"),
	TEXT("WM_POINTERDEVICEDELETED"),
	TEXT("<WM_TABLET__reserved_2ca>"),
	TEXT("WM_FLICK"),
	TEXT("<WM_TABLET__reserved_2cc>"),
	TEXT("WM_FLICKINTERNAL"),
	TEXT("WM_BRIGHTNESSCHANGED"),
	TEXT("<WM_TABLET__reserved_2cf>"),
	TEXT("<WM_TABLET__reserved_2d0>"),
	TEXT("<WM_TABLET__reserved_2d1>"),
	TEXT("<WM_TABLET__reserved_2d2>"),
	TEXT("<WM_TABLET__reserved_2d3>"),
	TEXT("<WM_TABLET__reserved_2d4>"),
	TEXT("<WM_TABLET__reserved_2d5>"),
	TEXT("<WM_TABLET__reserved_2d6>"),
	TEXT("<WM_TABLET__reserved_2d7>"),
	TEXT("<WM_TABLET__reserved_2d8>"),
	TEXT("<WM_TABLET__reserved_2d9>"),
	TEXT("<WM_TABLET__reserved_2da>"),
	TEXT("<WM_TABLET__reserved_2db>"),
	TEXT("<WM_TABLET__reserved_2dc>"),
	TEXT("<WM_TABLET__reserved_2dd>"),
	TEXT("<WM_TABLET__reserved_2de>"),
	TEXT("WM_TABLET_LAST"),
	TEXT("WM_DPICHANGED"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_CUT"),
	TEXT("WM_COPY"),
	TEXT("WM_PASTE"),
	TEXT("WM_CLEAR"),
	TEXT("WM_UNDO"),
	TEXT("WM_RENDERFORMAT"),
	TEXT("WM_RENDERALLFORMATS"),
	TEXT("WM_DESTROYCLIPBOARD"),
	TEXT("WM_DRAWCLIPBOARD"),
	TEXT("WM_PAINTCLIPBOARD"),
	TEXT("WM_VSCROLLCLIPBOARD"),
	TEXT("WM_SIZECLIPBOARD"),
	TEXT("WM_ASKCBFORMATNAME"),
	TEXT("WM_CHANGECBCHAIN"),
	TEXT("WM_HSCROLLCLIPBOARD"),
	TEXT("WM_QUERYNEWPALETTE"),
	TEXT("WM_PALETTEISCHANGING"),
	TEXT("WM_PALETTECHANGED"),
	TEXT("WM_HOTKEY"),
	TEXT("WM_SYSMENU"),
	TEXT("WM_HOOKMSG"),
	TEXT("WM_EXITPROCESS"),
	TEXT("WM_WAKETHREAD"),
	TEXT("WM_PRINT"),
	TEXT("WM_PRINTCLIENT"),
	TEXT("WM_APPCOMMAND"),
	TEXT("WM_THEMECHANGED"),
	TEXT("WM_UAHINIT"),
	TEXT("WM_DESKTOPNOTIFY"),
	TEXT("WM_CLIPBOARDUPDATE"),
	TEXT("WM_DWMCOMPOSITIONCHANGED"),
	TEXT("WM_DWMNCRENDERINGCHANGED"),
	TEXT("WM_DWMCOLORIZATIONCOLORCHANGED"),
	TEXT("WM_DWMWINDOWMAXIMIZEDCHANGE"),
	TEXT("WM_DWMEXILEFRAME"),
	TEXT("WM_DWMSENDICONICTHUMBNAIL"),
	TEXT("WM_MAGNIFICATION_STARTED"),
	TEXT("WM_MAGNIFICATION_ENDED"),
	TEXT("WM_DWMSENDICONICLIVEPREVIEWBITMAP"),
	TEXT("WM_DWMTHUMBNAILSIZECHANGED"),
	TEXT("WM_MAGNIFICATION_OUTPUT"),
	TEXT("WM_BSDRDATA"),
	TEXT("WM_DWMTRANSITIONSTATECHANGED"),
	TEXT("<undefined>"),
	TEXT("WM_KEYBOARDCORRECTIONCALLOUT"),
	TEXT("WM_KEYBOARDCORRECTIONACTION"),
	TEXT("WM_UIACTION"),
	TEXT("WM_ROUTED_UI_EVENT"),
	TEXT("WM_MEASURECONTROL"),
	TEXT("WM_GETACTIONTEXT"),
	TEXT("<WM_CE_ONLY__reserved_332>"),
	TEXT("WM_FORWARDKEYDOWN"),
	TEXT("WM_FORWARDKEYUP"),
	TEXT("<WM_CE_ONLY__reserved_335>"),
	TEXT("<WM_CE_ONLY__reserved_336>"),
	TEXT("<WM_CE_ONLY__reserved_337>"),
	TEXT("<WM_CE_ONLY__reserved_338>"),
	TEXT("<WM_CE_ONLY__reserved_339>"),
	TEXT("<WM_CE_ONLY__reserved_33a>"),
	TEXT("<WM_CE_ONLY__reserved_33b>"),
	TEXT("<WM_CE_ONLY__reserved_33c>"),
	TEXT("<WM_CE_ONLY__reserved_33d>"),
	TEXT("WM_CE_ONLY_LAST"),
	TEXT("WM_GETTITLEBARINFOEX"),
	TEXT("WM_NOTIFYWOW"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("<undefined>"),
	TEXT("WM_HANDHELDFIRST"),
	TEXT("<WM_HANDHELD_reserved_359>"),
	TEXT("<WM_HANDHELD_reserved_35a>"),
	TEXT("<WM_HANDHELD_reserved_35b>"),
	TEXT("<WM_HANDHELD_reserved_35c>"),
	TEXT("<WM_HANDHELD_reserved_35d>"),
	TEXT("<WM_HANDHELD_reserved_35e>"),
	TEXT("WM_HANDHELDLAST"),
	TEXT("WM_AFXFIRST"),
	TEXT("<WM_AFX_reserved_361>"),
	TEXT("<WM_AFX_reserved_362>"),
	TEXT("<WM_AFX_reserved_363>"),
	TEXT("<WM_AFX_reserved_364>"),
	TEXT("<WM_AFX_reserved_365>"),
	TEXT("<WM_AFX_reserved_366>"),
	TEXT("<WM_AFX_reserved_367>"),
	TEXT("<WM_AFX_reserved_368>"),
	TEXT("<WM_AFX_reserved_369>"),
	TEXT("<WM_AFX_reserved_36a>"),
	TEXT("<WM_AFX_reserved_36b>"),
	TEXT("<WM_AFX_reserved_36c>"),
	TEXT("<WM_AFX_reserved_36d>"),
	TEXT("<WM_AFX_reserved_36e>"),
	TEXT("<WM_AFX_reserved_36f>"),
	TEXT("<WM_AFX_reserved_370>"),
	TEXT("<WM_AFX_reserved_371>"),
	TEXT("<WM_AFX_reserved_372>"),
	TEXT("<WM_AFX_reserved_373>"),
	TEXT("<WM_AFX_reserved_374>"),
	TEXT("<WM_AFX_reserved_375>"),
	TEXT("<WM_AFX_reserved_376>"),
	TEXT("<WM_AFX_reserved_377>"),
	TEXT("<WM_AFX_reserved_378>"),
	TEXT("<WM_AFX_reserved_379>"),
	TEXT("<WM_AFX_reserved_37a>"),
	TEXT("<WM_AFX_reserved_37b>"),
	TEXT("<WM_AFX_reserved_37c>"),
	TEXT("<WM_AFX_reserved_37d>"),
	TEXT("<WM_AFX_reserved_37e>"),
	TEXT("WM_AFXLAST"),
	TEXT("WM_PENWINFIRST"),
	TEXT("<WM_PENWIN_reserved_381>"),
	TEXT("<WM_PENWIN_reserved_382>"),
	TEXT("<WM_PENWIN_reserved_383>"),
	TEXT("<WM_PENWIN_reserved_384>"),
	TEXT("<WM_PENWIN_reserved_385>"),
	TEXT("<WM_PENWIN_reserved_386>"),
	TEXT("<WM_PENWIN_reserved_387>"),
	TEXT("<WM_PENWIN_reserved_388>"),
	TEXT("<WM_PENWIN_reserved_389>"),
	TEXT("<WM_PENWIN_reserved_38a>"),
	TEXT("<WM_PENWIN_reserved_38b>"),
	TEXT("<WM_PENWIN_reserved_38c>"),
	TEXT("<WM_PENWIN_reserved_38d>"),
	TEXT("<WM_PENWIN_reserved_38e>"),
	TEXT("WM_PENWINLAST"),
	TEXT("WM_COALESCE_FIRST"),
	TEXT("<WM_COALESCE__reserved_391>"),
	TEXT("<WM_COALESCE__reserved_392>"),
	TEXT("<WM_COALESCE__reserved_393>"),
	TEXT("<WM_COALESCE__reserved_394>"),
	TEXT("<WM_COALESCE__reserved_395>"),
	TEXT("<WM_COALESCE__reserved_396>"),
	TEXT("<WM_COALESCE__reserved_397>"),
	TEXT("<WM_COALESCE__reserved_398>"),
	TEXT("<WM_COALESCE__reserved_399>"),
	TEXT("<WM_COALESCE__reserved_39a>"),
	TEXT("<WM_COALESCE__reserved_39b>"),
	TEXT("<WM_COALESCE__reserved_39c>"),
	TEXT("<WM_COALESCE__reserved_39d>"),
	TEXT("<WM_COALESCE__reserved_39e>"),
	TEXT("WM_COALESCE_LAST"),
	TEXT("WM_MM_RESERVED_FIRST"),
	TEXT("<WM_MM_RESERVED__reserved_3a1>"),
	TEXT("<WM_MM_RESERVED__reserved_3a2>"),
	TEXT("<WM_MM_RESERVED__reserved_3a3>"),
	TEXT("<WM_MM_RESERVED__reserved_3a4>"),
	TEXT("<WM_MM_RESERVED__reserved_3a5>"),
	TEXT("<WM_MM_RESERVED__reserved_3a6>"),
	TEXT("<WM_MM_RESERVED__reserved_3a7>"),
	TEXT("<WM_MM_RESERVED__reserved_3a8>"),
	TEXT("<WM_MM_RESERVED__reserved_3a9>"),
	TEXT("<WM_MM_RESERVED__reserved_3aa>"),
	TEXT("<WM_MM_RESERVED__reserved_3ab>"),
	TEXT("<WM_MM_RESERVED__reserved_3ac>"),
	TEXT("<WM_MM_RESERVED__reserved_3ad>"),
	TEXT("<WM_MM_RESERVED__reserved_3ae>"),
	TEXT("<WM_MM_RESERVED__reserved_3af>"),
	TEXT("<WM_MM_RESERVED__reserved_3b0>"),
	TEXT("<WM_MM_RESERVED__reserved_3b1>"),
	TEXT("<WM_MM_RESERVED__reserved_3b2>"),
	TEXT("<WM_MM_RESERVED__reserved_3b3>"),
	TEXT("<WM_MM_RESERVED__reserved_3b4>"),
	TEXT("<WM_MM_RESERVED__reserved_3b5>"),
	TEXT("<WM_MM_RESERVED__reserved_3b6>"),
	TEXT("<WM_MM_RESERVED__reserved_3b7>"),
	TEXT("<WM_MM_RESERVED__reserved_3b8>"),
	TEXT("<WM_MM_RESERVED__reserved_3b9>"),
	TEXT("<WM_MM_RESERVED__reserved_3ba>"),
	TEXT("<WM_MM_RESERVED__reserved_3bb>"),
	TEXT("<WM_MM_RESERVED__reserved_3bc>"),
	TEXT("<WM_MM_RESERVED__reserved_3bd>"),
	TEXT("<WM_MM_RESERVED__reserved_3be>"),
	TEXT("<WM_MM_RESERVED__reserved_3bf>"),
	TEXT("<WM_MM_RESERVED__reserved_3c0>"),
	TEXT("<WM_MM_RESERVED__reserved_3c1>"),
	TEXT("<WM_MM_RESERVED__reserved_3c2>"),
	TEXT("<WM_MM_RESERVED__reserved_3c3>"),
	TEXT("<WM_MM_RESERVED__reserved_3c4>"),
	TEXT("<WM_MM_RESERVED__reserved_3c5>"),
	TEXT("<WM_MM_RESERVED__reserved_3c6>"),
	TEXT("<WM_MM_RESERVED__reserved_3c7>"),
	TEXT("<WM_MM_RESERVED__reserved_3c8>"),
	TEXT("<WM_MM_RESERVED__reserved_3c9>"),
	TEXT("<WM_MM_RESERVED__reserved_3ca>"),
	TEXT("<WM_MM_RESERVED__reserved_3cb>"),
	TEXT("<WM_MM_RESERVED__reserved_3cc>"),
	TEXT("<WM_MM_RESERVED__reserved_3cd>"),
	TEXT("<WM_MM_RESERVED__reserved_3ce>"),
	TEXT("<WM_MM_RESERVED__reserved_3cf>"),
	TEXT("<WM_MM_RESERVED__reserved_3d0>"),
	TEXT("<WM_MM_RESERVED__reserved_3d1>"),
	TEXT("<WM_MM_RESERVED__reserved_3d2>"),
	TEXT("<WM_MM_RESERVED__reserved_3d3>"),
	TEXT("<WM_MM_RESERVED__reserved_3d4>"),
	TEXT("<WM_MM_RESERVED__reserved_3d5>"),
	TEXT("<WM_MM_RESERVED__reserved_3d6>"),
	TEXT("<WM_MM_RESERVED__reserved_3d7>"),
	TEXT("<WM_MM_RESERVED__reserved_3d8>"),
	TEXT("<WM_MM_RESERVED__reserved_3d9>"),
	TEXT("<WM_MM_RESERVED__reserved_3da>"),
	TEXT("<WM_MM_RESERVED__reserved_3db>"),
	TEXT("<WM_MM_RESERVED__reserved_3dc>"),
	TEXT("<WM_MM_RESERVED__reserved_3dd>"),
	TEXT("<WM_MM_RESERVED__reserved_3de>"),
	TEXT("WM_MM_RESERVED_LAST"),
	TEXT("WM_INTERNAL_DDE_FIRST"),
	TEXT("<WM_INTERNAL_DDE__reserved_3e1>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3e2>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3e3>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3e4>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3e5>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3e6>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3e7>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3e8>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3e9>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3ea>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3eb>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3ec>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3ed>"),
	TEXT("<WM_INTERNAL_DDE__reserved_3ee>"),
	TEXT("WM_INTERNAL_DDE_LAST"),
	TEXT("WM_CBT_RESERVED_FIRST"),
	TEXT("<WM_CBT_RESERVED__reserved_3f1>"),
	TEXT("<WM_CBT_RESERVED__reserved_3f2>"),
	TEXT("<WM_CBT_RESERVED__reserved_3f3>"),
	TEXT("<WM_CBT_RESERVED__reserved_3f4>"),
	TEXT("<WM_CBT_RESERVED__reserved_3f5>"),
	TEXT("<WM_CBT_RESERVED__reserved_3f6>"),
	TEXT("<WM_CBT_RESERVED__reserved_3f7>"),
	TEXT("<WM_CBT_RESERVED__reserved_3f8>"),
	TEXT("<WM_CBT_RESERVED__reserved_3f9>"),
	TEXT("<WM_CBT_RESERVED__reserved_3fa>"),
	TEXT("<WM_CBT_RESERVED__reserved_3fb>"),
	TEXT("<WM_CBT_RESERVED__reserved_3fc>"),
	TEXT("<WM_CBT_RESERVED__reserved_3fd>"),
	TEXT("<WM_CBT_RESERVED__reserved_3fe>"),
	TEXT("WM_CBT_RESERVED_LAST")
};
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <dbghelp.h>
#include <cstring>
#include <cstdio>
 
// change these to your particulars
static const PCWSTR g_win32k = L"G:\\SystemDllArchive\\8.1\\win32k-chk.sys";
static const PCWSTR g_symPath = L"SRV**G:\\symbols";
#define OUTPUT_DIR "G:\\SystemDllArchive\\8.1\\"
 
struct WM_VALUES_STRINGS64
{
    ULONG64 stringOffset;
    DWORD flags;
    DWORD unk;
};
 
struct WM_VALUES_STRINGS32
{
    ULONG stringOffset;
    DWORD flags;
    DWORD unk;
};
 
template<class StringStruct, class BaseType>
void ProcessAllMessages(const StringStruct* pStruct, BaseType preferredBase, DWORD64 loadAddress)
{
    int i = 0;
    int undefCount = 0;
    char nullCh = 0;
    FILE* messagesOut = fopen(OUTPUT_DIR "\\defineList.txt", "wt");
    FILE* headerInc = fopen(OUTPUT_DIR "\\headerInc.txt", "wt");
    fputs("#define WIN32_LEAN_AND_MEAN\n#include <windows.h>\n\nstatic const TCHAR* g_wmMessageStrings[] = {", headerInc);
    while(i < WM_USER)
    {
        PCSTR pMessageString = (PCSTR)((pStruct[i].stringOffset - preferredBase) + loadAddress);
        if(pMessageString[0] == '<')
        {
            PCSTR pMessageStringToUse = pMessageString + 1; // this and the -1 on the strlen below are to remove the angle brackets
            char undefinedString[18] = {0};
            if(strcmp(pMessageString, "<undefined>") == 0) // uniqify 'undefined' so the defines don't clash
            {
                _snprintf(undefinedString, sizeof(undefinedString), "undefined_%d>", ++undefCount);
                pMessageStringToUse = undefinedString;
            }
            fprintf(messagesOut, "#define %.*s %#04x\n", strlen(pMessageStringToUse) - 1, pMessageStringToUse, i);
        }
        else
        {
            fprintf(messagesOut, "#define %s %#04x\n", pMessageString, i);
        }
        fprintf(headerInc, "\tTEXT(\"%s\")%s\n", pMessageString, i == (WM_USER - 1) ? &nullCh : ",");
        ++i;
    }
    fputs("};\n", headerInc);
    fclose(headerInc);
    fclose(messagesOut);
}
 
int ParseMessages()
{
    HANDLE hProc = (HANDLE)1;
    HANDLE hFile = CreateFile(g_win32k, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
    if(hFile == INVALID_HANDLE_VALUE)
    {
        return 1;
    }
    HANDLE hMap = CreateFileMapping(hFile, NULL, PAGE_READONLY | SEC_IMAGE, 0, 0, NULL);
    if(hMap == NULL)
    {
        CloseHandle(hFile);
        return 1;
    }
    PVOID pMapping = MapViewOfFileEx(hMap, FILE_MAP_READ, 0, 0, 0, NULL);
    CloseHandle(hMap);
    if(!pMapping)
    {
        CloseHandle(hFile);
        return 1;
    }
    SymSetOptions(SYMOPT_AUTO_PUBLICS | SYMOPT_CASE_INSENSITIVE | SYMOPT_OMAP_FIND_NEAREST | SYMOPT_UNDNAME);
    SymInitializeW(hProc, g_symPath, FALSE);
    DWORD64 loadAddr = SymLoadModuleExW(
        hProc, 
        hFile, 
        g_win32k,
        NULL,
        (DWORD64)pMapping,
        0,
        NULL,
        0
    );
    CloseHandle(hFile);
    DWORD64 preferredBase = 0;
    BOOL is64 = FALSE;
    {
        char* pBase = (char*)loadAddr;
        IMAGE_DOS_HEADER* pDos = (IMAGE_DOS_HEADER*)pBase;
        if(pDos->e_magic != IMAGE_DOS_SIGNATURE || pDos->e_lfanew == 0)
        {
            printf("Win32k.sys didn't have a Dos header!\n");
            UnmapViewOfFile(pMapping);
            return 1;
        }
        IMAGE_NT_HEADERS* pNt = (IMAGE_NT_HEADERS*)(pBase + pDos->e_lfanew);
        if(pNt->Signature != IMAGE_NT_SIGNATURE)
        {
            printf("Win32k.sys didn't have an HT header!\n");
            UnmapViewOfFile(pMapping);
            return 1;
        }
        if(pNt->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC)
        {
            preferredBase = ((IMAGE_NT_HEADERS32*)pNt)->OptionalHeader.ImageBase;
        }
        else
        {
            is64 = TRUE;
            preferredBase = ((IMAGE_NT_HEADERS64*)pNt)->OptionalHeader.ImageBase;
        }
    }
    SYMBOL_INFOW symInf = {sizeof(symInf), 0};
    symInf.MaxNameLen = 1;
    if(SymFromNameW(hProc, L"g_WM_VALUES_STRINGS", &symInf))
    {
        if(is64)
        {
            ProcessAllMessages((WM_VALUES_STRINGS64*)symInf.Address, preferredBase, loadAddr);
        }
        else
        {
            ProcessAllMessages((WM_VALUES_STRINGS32*)symInf.Address, (ULONG)preferredBase, loadAddr);
        }
    }
    else
    {
        puts("Couldn't find g_WM_VALUES_STRINGS. Is this a checked version of win32k.sys?\n");
    }
    SymUnloadModule64(hProc, loadAddr);
    UnmapViewOfFile(pMapping);
    SymCleanup(hProc);
    return 0;
}

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress