Advertisement
Guest User

CB-V2.0.1

a guest
May 14th, 2014
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 225.92 KB | None | 0 0
  1. Global Const $wc_animate = "SysAnimate32"
  2. Global Const $wc_button = "Button"
  3. Global Const $wc_combobox = "ComboBox"
  4. Global Const $wc_comboboxex = "ComboBoxEx32"
  5. Global Const $wc_datetimepick = "SysDateTimePick32"
  6. Global Const $wc_edit = "Edit"
  7. Global Const $wc_header = "SysHeader32"
  8. Global Const $wc_hotkey = "msctls_hotkey32"
  9. Global Const $wc_ipaddress = "SysIPAddress32"
  10. Global Const $wc_link = "SysLink"
  11. Global Const $wc_listbox = "ListBox"
  12. Global Const $wc_listview = "SysListView32"
  13. Global Const $wc_monthcal = "SysMonthCal32"
  14. Global Const $wc_nativefontctl = "NativeFontCtl"
  15. Global Const $wc_pagescroller = "SysPager"
  16. Global Const $wc_progress = "msctls_progress32"
  17. Global Const $wc_rebar = "ReBarWindow32"
  18. Global Const $wc_scrollbar = "ScrollBar"
  19. Global Const $wc_static = "Static"
  20. Global Const $wc_statusbar = "msctls_statusbar32"
  21. Global Const $wc_tabcontrol = "SysTabControl32"
  22. Global Const $wc_toolbar = "ToolbarWindow32"
  23. Global Const $wc_tooltips = "tooltips_class32"
  24. Global Const $wc_trackbar = "msctls_trackbar32"
  25. Global Const $wc_treeview = "SysTreeView32"
  26. Global Const $wc_updown = "msctls_updown32"
  27. Global Const $ws_overlapped = 0
  28. Global Const $ws_tiled = $ws_overlapped
  29. Global Const $ws_maximizebox = 65536
  30. Global Const $ws_minimizebox = 131072
  31. Global Const $ws_tabstop = 65536
  32. Global Const $ws_group = 131072
  33. Global Const $ws_sizebox = 262144
  34. Global Const $ws_thickframe = $ws_sizebox
  35. Global Const $ws_sysmenu = 524288
  36. Global Const $ws_hscroll = 1048576
  37. Global Const $ws_vscroll = 2097152
  38. Global Const $ws_dlgframe = 4194304
  39. Global Const $ws_border = 8388608
  40. Global Const $ws_caption = 12582912
  41. Global Const $ws_overlappedwindow = BitOR($ws_caption, $ws_maximizebox, $ws_minimizebox, $ws_overlapped, $ws_sysmenu, $ws_thickframe)
  42. Global Const $ws_tiledwindow = $ws_overlappedwindow
  43. Global Const $ws_maximize = 16777216
  44. Global Const $ws_clipchildren = 33554432
  45. Global Const $ws_clipsiblings = 67108864
  46. Global Const $ws_disabled = 134217728
  47. Global Const $ws_visible = 268435456
  48. Global Const $ws_minimize = 536870912
  49. Global Const $ws_iconic = $ws_minimize
  50. Global Const $ws_child = 1073741824
  51. Global Const $ws_childwindow = $ws_child
  52. Global Const $ws_popup = -2147483648
  53. Global Const $ws_popupwindow = -2138570752
  54. Global Const $ds_3dlook = 4
  55. Global Const $ds_absalign = 1
  56. Global Const $ds_center = 2048
  57. Global Const $ds_centermouse = 4096
  58. Global Const $ds_contexthelp = 8192
  59. Global Const $ds_control = 1024
  60. Global Const $ds_fixedsys = 8
  61. Global Const $ds_localedit = 32
  62. Global Const $ds_modalframe = 128
  63. Global Const $ds_nofailcreate = 16
  64. Global Const $ds_noidlemsg = 256
  65. Global Const $ds_setfont = 64
  66. Global Const $ds_setforeground = 512
  67. Global Const $ds_shellfont = BitOR($ds_fixedsys, $ds_setfont)
  68. Global Const $ds_sysmodal = 2
  69. Global Const $ws_ex_acceptfiles = 16
  70. Global Const $ws_ex_appwindow = 262144
  71. Global Const $ws_ex_composited = 33554432
  72. Global Const $ws_ex_controlparent = 65536
  73. Global Const $ws_ex_clientedge = 512
  74. Global Const $ws_ex_contexthelp = 1024
  75. Global Const $ws_ex_dlgmodalframe = 1
  76. Global Const $ws_ex_layered = 524288
  77. Global Const $ws_ex_layoutrtl = 4194304
  78. Global Const $ws_ex_left = 0
  79. Global Const $ws_ex_leftscrollbar = 16384
  80. Global Const $ws_ex_ltrreading = 0
  81. Global Const $ws_ex_mdichild = 64
  82. Global Const $ws_ex_noactivate = 134217728
  83. Global Const $ws_ex_noinheritlayout = 1048576
  84. Global Const $ws_ex_noparentnotify = 4
  85. Global Const $ws_ex_right = 4096
  86. Global Const $ws_ex_rightscrollbar = 0
  87. Global Const $ws_ex_rtlreading = 8192
  88. Global Const $ws_ex_staticedge = 131072
  89. Global Const $ws_ex_toolwindow = 128
  90. Global Const $ws_ex_topmost = 8
  91. Global Const $ws_ex_transparent = 32
  92. Global Const $ws_ex_windowedge = 256
  93. Global Const $ws_ex_overlappedwindow = BitOR($ws_ex_clientedge, $ws_ex_windowedge)
  94. Global Const $ws_ex_palettewindow = BitOR($ws_ex_toolwindow, $ws_ex_topmost, $ws_ex_windowedge)
  95. Global Const $wm_null = 0
  96. Global Const $wm_create = 1
  97. Global Const $wm_destroy = 2
  98. Global Const $wm_move = 3
  99. Global Const $wm_sizewait = 4
  100. Global Const $wm_size = 5
  101. Global Const $wm_activate = 6
  102. Global Const $wm_setfocus = 7
  103. Global Const $wm_killfocus = 8
  104. Global Const $wm_setvisible = 9
  105. Global Const $wm_enable = 10
  106. Global Const $wm_setredraw = 11
  107. Global Const $wm_settext = 12
  108. Global Const $wm_gettext = 13
  109. Global Const $wm_gettextlength = 14
  110. Global Const $wm_paint = 15
  111. Global Const $wm_close = 16
  112. Global Const $wm_queryendsession = 17
  113. Global Const $wm_quit = 18
  114. Global Const $wm_erasebkgnd = 20
  115. Global Const $wm_queryopen = 19
  116. Global Const $wm_syscolorchange = 21
  117. Global Const $wm_endsession = 22
  118. Global Const $wm_systemerror = 23
  119. Global Const $wm_showwindow = 24
  120. Global Const $wm_ctlcolor = 25
  121. Global Const $wm_settingchange = 26
  122. Global Const $wm_wininichange = 26
  123. Global Const $wm_devmodechange = 27
  124. Global Const $wm_activateapp = 28
  125. Global Const $wm_fontchange = 29
  126. Global Const $wm_timechange = 30
  127. Global Const $wm_cancelmode = 31
  128. Global Const $wm_setcursor = 32
  129. Global Const $wm_mouseactivate = 33
  130. Global Const $wm_childactivate = 34
  131. Global Const $wm_queuesync = 35
  132. Global Const $wm_getminmaxinfo = 36
  133. Global Const $wm_logoff = 37
  134. Global Const $wm_painticon = 38
  135. Global Const $wm_iconerasebkgnd = 39
  136. Global Const $wm_nextdlgctl = 40
  137. Global Const $wm_alttabactive = 41
  138. Global Const $wm_spoolerstatus = 42
  139. Global Const $wm_drawitem = 43
  140. Global Const $wm_measureitem = 44
  141. Global Const $wm_deleteitem = 45
  142. Global Const $wm_vkeytoitem = 46
  143. Global Const $wm_chartoitem = 47
  144. Global Const $wm_setfont = 48
  145. Global Const $wm_getfont = 49
  146. Global Const $wm_sethotkey = 50
  147. Global Const $wm_gethotkey = 51
  148. Global Const $wm_filesyschange = 52
  149. Global Const $wm_isactiveicon = 53
  150. Global Const $wm_queryparkicon = 54
  151. Global Const $wm_querydragicon = 55
  152. Global Const $wm_winhelp = 56
  153. Global Const $wm_compareitem = 57
  154. Global Const $wm_fullscreen = 58
  155. Global Const $wm_clientshutdown = 59
  156. Global Const $wm_ddemlevent = 60
  157. Global Const $wm_getobject = 61
  158. Global Const $wm_calcscroll = 63
  159. Global Const $wm_testing = 64
  160. Global Const $wm_compacting = 65
  161. Global Const $wm_otherwindowcreated = 66
  162. Global Const $wm_otherwindowdestroyed = 67
  163. Global Const $wm_commnotify = 68
  164. Global Const $wm_mediastatuschange = 69
  165. Global Const $wm_windowposchanging = 70
  166. Global Const $wm_windowposchanged = 71
  167. Global Const $wm_power = 72
  168. Global Const $wm_copyglobaldata = 73
  169. Global Const $wm_copydata = 74
  170. Global Const $wm_canceljournal = 75
  171. Global Const $wm_logonnotify = 76
  172. Global Const $wm_keyf1 = 77
  173. Global Const $wm_notify = 78
  174. Global Const $wm_access_window = 79
  175. Global Const $wm_inputlangchangerequest = 80
  176. Global Const $wm_inputlangchange = 81
  177. Global Const $wm_tcard = 82
  178. Global Const $wm_help = 83
  179. Global Const $wm_userchanged = 84
  180. Global Const $wm_notifyformat = 85
  181. Global Const $wm_qm_activate = 96
  182. Global Const $wm_hook_do_callback = 97
  183. Global Const $wm_syscopydata = 98
  184. Global Const $wm_finaldestroy = 112
  185. Global Const $wm_measureitem_clientdata = 113
  186. Global Const $wm_contextmenu = 123
  187. Global Const $wm_stylechanging = 124
  188. Global Const $wm_stylechanged = 125
  189. Global Const $wm_displaychange = 126
  190. Global Const $wm_geticon = 127
  191. Global Const $wm_seticon = 128
  192. Global Const $wm_nccreate = 129
  193. Global Const $wm_ncdestroy = 130
  194. Global Const $wm_nccalcsize = 131
  195. Global Const $wm_nchittest = 132
  196. Global Const $wm_ncpaint = 133
  197. Global Const $wm_ncactivate = 134
  198. Global Const $wm_getdlgcode = 135
  199. Global Const $wm_syncpaint = 136
  200. Global Const $wm_synctask = 137
  201. Global Const $wm_kludgeminrect = 139
  202. Global Const $wm_lpkdrawswitchwnd = 140
  203. Global Const $wm_uahdestroywindow = 144
  204. Global Const $wm_uahdrawmenu = 145
  205. Global Const $wm_uahdrawmenuitem = 146
  206. Global Const $wm_uahinitmenu = 147
  207. Global Const $wm_uahmeasuremenuitem = 148
  208. Global Const $wm_uahncpaintmenupopup = 149
  209. Global Const $wm_ncmousemove = 160
  210. Global Const $wm_nclbuttondown = 161
  211. Global Const $wm_nclbuttonup = 162
  212. Global Const $wm_nclbuttondblclk = 163
  213. Global Const $wm_ncrbuttondown = 164
  214. Global Const $wm_ncrbuttonup = 165
  215. Global Const $wm_ncrbuttondblclk = 166
  216. Global Const $wm_ncmbuttondown = 167
  217. Global Const $wm_ncmbuttonup = 168
  218. Global Const $wm_ncmbuttondblclk = 169
  219. Global Const $wm_ncxbuttondown = 171
  220. Global Const $wm_ncxbuttonup = 172
  221. Global Const $wm_ncxbuttondblclk = 173
  222. Global Const $wm_ncuahdrawcaption = 174
  223. Global Const $wm_ncuahdrawframe = 175
  224. Global Const $wm_input_device_change = 254
  225. Global Const $wm_input = 255
  226. Global Const $wm_keydown = 256
  227. Global Const $wm_keyfirst = 256
  228. Global Const $wm_keyup = 257
  229. Global Const $wm_char = 258
  230. Global Const $wm_deadchar = 259
  231. Global Const $wm_syskeydown = 260
  232. Global Const $wm_syskeyup = 261
  233. Global Const $wm_syschar = 262
  234. Global Const $wm_sysdeadchar = 263
  235. Global Const $wm_yomichar = 264
  236. Global Const $wm_keylast = 265
  237. Global Const $wm_unichar = 265
  238. Global Const $wm_convertrequest = 266
  239. Global Const $wm_convertresult = 267
  240. Global Const $wm_im_info = 268
  241. Global Const $wm_ime_startcomposition = 269
  242. Global Const $wm_ime_endcomposition = 270
  243. Global Const $wm_ime_composition = 271
  244. Global Const $wm_ime_keylast = 271
  245. Global Const $wm_initdialog = 272
  246. Global Const $wm_command = 273
  247. Global Const $wm_syscommand = 274
  248. Global Const $wm_timer = 275
  249. Global Const $wm_hscroll = 276
  250. Global Const $wm_vscroll = 277
  251. Global Const $wm_initmenu = 278
  252. Global Const $wm_initmenupopup = 279
  253. Global Const $wm_systimer = 280
  254. Global Const $wm_gesture = 281
  255. Global Const $wm_gesturenotify = 282
  256. Global Const $wm_gestureinput = 283
  257. Global Const $wm_gesturenotified = 284
  258. Global Const $wm_menuselect = 287
  259. Global Const $wm_menuchar = 288
  260. Global Const $wm_enteridle = 289
  261. Global Const $wm_menurbuttonup = 290
  262. Global Const $wm_menudrag = 291
  263. Global Const $wm_menugetobject = 292
  264. Global Const $wm_uninitmenupopup = 293
  265. Global Const $wm_menucommand = 294
  266. Global Const $wm_changeuistate = 295
  267. Global Const $wm_updateuistate = 296
  268. Global Const $wm_queryuistate = 297
  269. Global Const $wm_lbtrackpoint = 305
  270. Global Const $wm_ctlcolormsgbox = 306
  271. Global Const $wm_ctlcoloredit = 307
  272. Global Const $wm_ctlcolorlistbox = 308
  273. Global Const $wm_ctlcolorbtn = 309
  274. Global Const $wm_ctlcolordlg = 310
  275. Global Const $wm_ctlcolorscrollbar = 311
  276. Global Const $wm_ctlcolorstatic = 312
  277. Global Const $mn_gethmenu = 481
  278. Global Const $wm_parentnotify = 528
  279. Global Const $wm_entermenuloop = 529
  280. Global Const $wm_exitmenuloop = 530
  281. Global Const $wm_nextmenu = 531
  282. Global Const $wm_sizing = 532
  283. Global Const $wm_capturechanged = 533
  284. Global Const $wm_moving = 534
  285. Global Const $wm_powerbroadcast = 536
  286. Global Const $wm_devicechange = 537
  287. Global Const $wm_mdicreate = 544
  288. Global Const $wm_mdidestroy = 545
  289. Global Const $wm_mdiactivate = 546
  290. Global Const $wm_mdirestore = 547
  291. Global Const $wm_mdinext = 548
  292. Global Const $wm_mdimaximize = 549
  293. Global Const $wm_mditile = 550
  294. Global Const $wm_mdicascade = 551
  295. Global Const $wm_mdiiconarrange = 552
  296. Global Const $wm_mdigetactive = 553
  297. Global Const $wm_dropobject = 554
  298. Global Const $wm_querydropobject = 555
  299. Global Const $wm_begindrag = 556
  300. Global Const $wm_dragloop = 557
  301. Global Const $wm_dragselect = 558
  302. Global Const $wm_dragmove = 559
  303. Global Const $wm_mdisetmenu = 560
  304. Global Const $wm_entersizemove = 561
  305. Global Const $wm_exitsizemove = 562
  306. Global Const $wm_dropfiles = 563
  307. Global Const $wm_mdirefreshmenu = 564
  308. Global Const $wm_touch = 576
  309. Global Const $wm_ime_setcontext = 641
  310. Global Const $wm_ime_notify = 642
  311. Global Const $wm_ime_control = 643
  312. Global Const $wm_ime_compositionfull = 644
  313. Global Const $wm_ime_select = 645
  314. Global Const $wm_ime_char = 646
  315. Global Const $wm_ime_system = 647
  316. Global Const $wm_ime_request = 648
  317. Global Const $wm_ime_keydown = 656
  318. Global Const $wm_ime_keyup = 657
  319. Global Const $wm_ncmousehover = 672
  320. Global Const $wm_mousehover = 673
  321. Global Const $wm_ncmouseleave = 674
  322. Global Const $wm_mouseleave = 675
  323. Global Const $wm_wtssession_change = 689
  324. Global Const $wm_tablet_first = 704
  325. Global Const $wm_tablet_last = 735
  326. Global Const $wm_cut = 768
  327. Global Const $wm_copy = 769
  328. Global Const $wm_paste = 770
  329. Global Const $wm_clear = 771
  330. Global Const $wm_undo = 772
  331. Global Const $wm_paletteischanging = 784
  332. Global Const $wm_hotkey = 786
  333. Global Const $wm_palettechanged = 785
  334. Global Const $wm_sysmenu = 787
  335. Global Const $wm_hookmsg = 788
  336. Global Const $wm_exitprocess = 789
  337. Global Const $wm_wakethread = 790
  338. Global Const $wm_print = 791
  339. Global Const $wm_printclient = 792
  340. Global Const $wm_appcommand = 793
  341. Global Const $wm_querynewpalette = 783
  342. Global Const $wm_themechanged = 794
  343. Global Const $wm_uahinit = 795
  344. Global Const $wm_desktopnotify = 796
  345. Global Const $wm_clipboardupdate = 797
  346. Global Const $wm_dwmcompositionchanged = 798
  347. Global Const $wm_dwmncrenderingchanged = 799
  348. Global Const $wm_dwmcolorizationcolorchanged = 800
  349. Global Const $wm_dwmwindowmaximizedchange = 801
  350. Global Const $wm_dwmexileframe = 802
  351. Global Const $wm_dwmsendiconicthumbnail = 803
  352. Global Const $wm_magnification_started = 804
  353. Global Const $wm_magnification_ended = 805
  354. Global Const $wm_dwmsendiconiclivepreviewbitmap = 806
  355. Global Const $wm_dwmthumbnailsizechanged = 807
  356. Global Const $wm_magnification_output = 808
  357. Global Const $wm_measurecontrol = 816
  358. Global Const $wm_getactiontext = 817
  359. Global Const $wm_forwardkeydown = 819
  360. Global Const $wm_forwardkeyup = 820
  361. Global Const $wm_gettitlebarinfoex = 831
  362. Global Const $wm_notifywow = 832
  363. Global Const $wm_handheldfirst = 856
  364. Global Const $wm_handheldlast = 863
  365. Global Const $wm_afxfirst = 864
  366. Global Const $wm_afxlast = 895
  367. Global Const $wm_penwinfirst = 896
  368. Global Const $wm_penwinlast = 911
  369. Global Const $wm_dde_initiate = 992
  370. Global Const $wm_dde_terminate = 993
  371. Global Const $wm_dde_advise = 994
  372. Global Const $wm_dde_unadvise = 995
  373. Global Const $wm_dde_ack = 996
  374. Global Const $wm_dde_data = 997
  375. Global Const $wm_dde_request = 998
  376. Global Const $wm_dde_poke = 999
  377. Global Const $wm_dde_execute = 1000
  378. Global Const $wm_dbnotification = 1021
  379. Global Const $wm_netconnect = 1022
  380. Global Const $wm_hibernate = 1023
  381. Global Const $wm_user = 1024
  382. Global Const $wm_app = 32768
  383. Global Const $nm_first = 0
  384. Global Const $nm_outofmemory = $nm_first - 1
  385. Global Const $nm_click = $nm_first - 2
  386. Global Const $nm_dblclk = $nm_first - 3
  387. Global Const $nm_return = $nm_first - 4
  388. Global Const $nm_rclick = $nm_first - 5
  389. Global Const $nm_rdblclk = $nm_first - 6
  390. Global Const $nm_setfocus = $nm_first - 7
  391. Global Const $nm_killfocus = $nm_first - 8
  392. Global Const $nm_customdraw = $nm_first - 12
  393. Global Const $nm_hover = $nm_first - 13
  394. Global Const $nm_nchittest = $nm_first - 14
  395. Global Const $nm_keydown = $nm_first - 15
  396. Global Const $nm_releasedcapture = $nm_first - 16
  397. Global Const $nm_setcursor = $nm_first - 17
  398. Global Const $nm_char = $nm_first - 18
  399. Global Const $nm_tooltipscreated = $nm_first - 19
  400. Global Const $nm_ldown = $nm_first - 20
  401. Global Const $nm_rdown = $nm_first - 21
  402. Global Const $nm_themechanged = $nm_first - 22
  403. Global Const $wm_mousefirst = 512
  404. Global Const $wm_mousemove = 512
  405. Global Const $wm_lbuttondown = 513
  406. Global Const $wm_lbuttonup = 514
  407. Global Const $wm_lbuttondblclk = 515
  408. Global Const $wm_rbuttondown = 516
  409. Global Const $wm_rbuttonup = 517
  410. Global Const $wm_rbuttondblclk = 518
  411. Global Const $wm_mbuttondown = 519
  412. Global Const $wm_mbuttonup = 520
  413. Global Const $wm_mbuttondblclk = 521
  414. Global Const $wm_mousewheel = 522
  415. Global Const $wm_xbuttondown = 523
  416. Global Const $wm_xbuttonup = 524
  417. Global Const $wm_xbuttondblclk = 525
  418. Global Const $wm_mousehwheel = 526
  419. Global Const $ps_solid = 0
  420. Global Const $ps_dash = 1
  421. Global Const $ps_dot = 2
  422. Global Const $ps_dashdot = 3
  423. Global Const $ps_dashdotdot = 4
  424. Global Const $ps_null = 5
  425. Global Const $ps_insideframe = 6
  426. Global Const $ps_userstyle = 7
  427. Global Const $ps_alternate = 8
  428. Global Const $ps_endcap_round = 0
  429. Global Const $ps_endcap_square = 256
  430. Global Const $ps_endcap_flat = 512
  431. Global Const $ps_join_bevel = 4096
  432. Global Const $ps_join_miter = 8192
  433. Global Const $ps_join_round = 0
  434. Global Const $ps_geometric = 65536
  435. Global Const $ps_cosmetic = 0
  436. Global Const $lwa_alpha = 2
  437. Global Const $lwa_colorkey = 1
  438. Global Const $rgn_and = 1
  439. Global Const $rgn_or = 2
  440. Global Const $rgn_xor = 3
  441. Global Const $rgn_diff = 4
  442. Global Const $rgn_copy = 5
  443. Global Const $errorregion = 0
  444. Global Const $nullregion = 1
  445. Global Const $simpleregion = 2
  446. Global Const $complexregion = 3
  447. Global Const $transparent = 1
  448. Global Const $opaque = 2
  449. Global Const $ccm_first = 8192
  450. Global Const $ccm_getunicodeformat = ($ccm_first + 6)
  451. Global Const $ccm_setunicodeformat = ($ccm_first + 5)
  452. Global Const $ccm_setbkcolor = $ccm_first + 1
  453. Global Const $ccm_setcolorscheme = $ccm_first + 2
  454. Global Const $ccm_getcolorscheme = $ccm_first + 3
  455. Global Const $ccm_getdroptarget = $ccm_first + 4
  456. Global Const $ccm_setwindowtheme = $ccm_first + 11
  457. Global Const $ga_parent = 1
  458. Global Const $ga_root = 2
  459. Global Const $ga_rootowner = 3
  460. Global Const $sm_cxscreen = 0
  461. Global Const $sm_cyscreen = 1
  462. Global Const $sm_cxvscroll = 2
  463. Global Const $sm_cyhscroll = 3
  464. Global Const $sm_cycaption = 4
  465. Global Const $sm_cxborder = 5
  466. Global Const $sm_cyborder = 6
  467. Global Const $sm_cxdlgframe = 7
  468. Global Const $sm_cydlgframe = 8
  469. Global Const $sm_cyvthumb = 9
  470. Global Const $sm_cxhthumb = 10
  471. Global Const $sm_cxicon = 11
  472. Global Const $sm_cyicon = 12
  473. Global Const $sm_cxcursor = 13
  474. Global Const $sm_cycursor = 14
  475. Global Const $sm_cymenu = 15
  476. Global Const $sm_cxfullscreen = 16
  477. Global Const $sm_cyfullscreen = 17
  478. Global Const $sm_cykanjiwindow = 18
  479. Global Const $sm_mousepresent = 19
  480. Global Const $sm_cyvscroll = 20
  481. Global Const $sm_cxhscroll = 21
  482. Global Const $sm_debug = 22
  483. Global Const $sm_swapbutton = 23
  484. Global Const $sm_reserved1 = 24
  485. Global Const $sm_reserved2 = 25
  486. Global Const $sm_reserved3 = 26
  487. Global Const $sm_reserved4 = 27
  488. Global Const $sm_cxmin = 28
  489. Global Const $sm_cymin = 29
  490. Global Const $sm_cxsize = 30
  491. Global Const $sm_cysize = 31
  492. Global Const $sm_cxframe = 32
  493. Global Const $sm_cyframe = 33
  494. Global Const $sm_cxmintrack = 34
  495. Global Const $sm_cymintrack = 35
  496. Global Const $sm_cxdoubleclk = 36
  497. Global Const $sm_cydoubleclk = 37
  498. Global Const $sm_cxiconspacing = 38
  499. Global Const $sm_cyiconspacing = 39
  500. Global Const $sm_menudropalignment = 40
  501. Global Const $sm_penwindows = 41
  502. Global Const $sm_dbcsenabled = 42
  503. Global Const $sm_cmousebuttons = 43
  504. Global Const $sm_secure = 44
  505. Global Const $sm_cxedge = 45
  506. Global Const $sm_cyedge = 46
  507. Global Const $sm_cxminspacing = 47
  508. Global Const $sm_cyminspacing = 48
  509. Global Const $sm_cxsmicon = 49
  510. Global Const $sm_cysmicon = 50
  511. Global Const $sm_cysmcaption = 51
  512. Global Const $sm_cxsmsize = 52
  513. Global Const $sm_cysmsize = 53
  514. Global Const $sm_cxmenusize = 54
  515. Global Const $sm_cymenusize = 55
  516. Global Const $sm_arrange = 56
  517. Global Const $sm_cxminimized = 57
  518. Global Const $sm_cyminimized = 58
  519. Global Const $sm_cxmaxtrack = 59
  520. Global Const $sm_cymaxtrack = 60
  521. Global Const $sm_cxmaximized = 61
  522. Global Const $sm_cymaximized = 62
  523. Global Const $sm_network = 63
  524. Global Const $sm_cleanboot = 67
  525. Global Const $sm_cxdrag = 68
  526. Global Const $sm_cydrag = 69
  527. Global Const $sm_showsounds = 70
  528. Global Const $sm_cxmenucheck = 71
  529. Global Const $sm_cymenucheck = 72
  530. Global Const $sm_slowmachine = 73
  531. Global Const $sm_mideastenabled = 74
  532. Global Const $sm_mousewheelpresent = 75
  533. Global Const $sm_xvirtualscreen = 76
  534. Global Const $sm_yvirtualscreen = 77
  535. Global Const $sm_cxvirtualscreen = 78
  536. Global Const $sm_cyvirtualscreen = 79
  537. Global Const $sm_cmonitors = 80
  538. Global Const $sm_samedisplayformat = 81
  539. Global Const $sm_immenabled = 82
  540. Global Const $sm_cxfocusborder = 83
  541. Global Const $sm_cyfocusborder = 84
  542. Global Const $sm_tabletpc = 86
  543. Global Const $sm_mediacenter = 87
  544. Global Const $sm_starter = 88
  545. Global Const $sm_serverr2 = 89
  546. Global Const $sm_cmetrics = 90
  547. Global Const $sm_remotesession = 4096
  548. Global Const $sm_shuttingdown = 8192
  549. Global Const $sm_remotecontrol = 8193
  550. Global Const $sm_caretblinkingenabled = 8194
  551. Global Const $blackness = 66
  552. Global Const $captureblt = 1073741824
  553. Global Const $dstinvert = 5570569
  554. Global Const $mergecopy = 12583114
  555. Global Const $mergepaint = 12255782
  556. Global Const $nomirrorbitmap = -2147483648
  557. Global Const $notsrccopy = 3342344
  558. Global Const $notsrcerase = 1114278
  559. Global Const $patcopy = 15728673
  560. Global Const $patinvert = 5898313
  561. Global Const $patpaint = 16452105
  562. Global Const $srcand = 8913094
  563. Global Const $srccopy = 13369376
  564. Global Const $srcerase = 4457256
  565. Global Const $srcinvert = 6684742
  566. Global Const $srcpaint = 15597702
  567. Global Const $whiteness = 16711778
  568. Global Const $dt_bottom = 8
  569. Global Const $dt_calcrect = 1024
  570. Global Const $dt_center = 1
  571. Global Const $dt_editcontrol = 8192
  572. Global Const $dt_end_ellipsis = 32768
  573. Global Const $dt_expandtabs = 64
  574. Global Const $dt_externalleading = 512
  575. Global Const $dt_hideprefix = 1048576
  576. Global Const $dt_internal = 4096
  577. Global Const $dt_left = 0
  578. Global Const $dt_modifystring = 65536
  579. Global Const $dt_noclip = 256
  580. Global Const $dt_nofullwidthcharbreak = 524288
  581. Global Const $dt_noprefix = 2048
  582. Global Const $dt_path_ellipsis = 16384
  583. Global Const $dt_prefixonly = 2097152
  584. Global Const $dt_right = 2
  585. Global Const $dt_rtlreading = 131072
  586. Global Const $dt_singleline = 32
  587. Global Const $dt_tabstop = 128
  588. Global Const $dt_top = 0
  589. Global Const $dt_vcenter = 4
  590. Global Const $dt_wordbreak = 16
  591. Global Const $dt_word_ellipsis = 262144
  592. Global Const $rdw_erase = 4
  593. Global Const $rdw_frame = 1024
  594. Global Const $rdw_internalpaint = 2
  595. Global Const $rdw_invalidate = 1
  596. Global Const $rdw_noerase = 32
  597. Global Const $rdw_noframe = 2048
  598. Global Const $rdw_nointernalpaint = 16
  599. Global Const $rdw_validate = 8
  600. Global Const $rdw_erasenow = 512
  601. Global Const $rdw_updatenow = 256
  602. Global Const $rdw_allchildren = 128
  603. Global Const $rdw_nochildren = 64
  604. Global Const $wm_renderformat = 773
  605. Global Const $wm_renderallformats = 774
  606. Global Const $wm_destroyclipboard = 775
  607. Global Const $wm_drawclipboard = 776
  608. Global Const $wm_paintclipboard = 777
  609. Global Const $wm_vscrollclipboard = 778
  610. Global Const $wm_sizeclipboard = 779
  611. Global Const $wm_askcbformatname = 780
  612. Global Const $wm_changecbchain = 781
  613. Global Const $wm_hscrollclipboard = 782
  614. Global Const $hterror = -2
  615. Global Const $httransparent = -1
  616. Global Const $htnowhere = 0
  617. Global Const $htclient = 1
  618. Global Const $htcaption = 2
  619. Global Const $htsysmenu = 3
  620. Global Const $htgrowbox = 4
  621. Global Const $htsize = $htgrowbox
  622. Global Const $htmenu = 5
  623. Global Const $hthscroll = 6
  624. Global Const $htvscroll = 7
  625. Global Const $htminbutton = 8
  626. Global Const $htmaxbutton = 9
  627. Global Const $htleft = 10
  628. Global Const $htright = 11
  629. Global Const $httop = 12
  630. Global Const $httopleft = 13
  631. Global Const $httopright = 14
  632. Global Const $htbottom = 15
  633. Global Const $htbottomleft = 16
  634. Global Const $htbottomright = 17
  635. Global Const $htborder = 18
  636. Global Const $htreduce = $htminbutton
  637. Global Const $htzoom = $htmaxbutton
  638. Global Const $htsizefirst = $htleft
  639. Global Const $htsizelast = $htbottomright
  640. Global Const $htobject = 19
  641. Global Const $htclose = 20
  642. Global Const $hthelp = 21
  643. Global Const $color_scrollbar = 0
  644. Global Const $color_background = 1
  645. Global Const $color_activecaption = 2
  646. Global Const $color_inactivecaption = 3
  647. Global Const $color_menu = 4
  648. Global Const $color_window = 5
  649. Global Const $color_windowframe = 6
  650. Global Const $color_menutext = 7
  651. Global Const $color_windowtext = 8
  652. Global Const $color_captiontext = 9
  653. Global Const $color_activeborder = 10
  654. Global Const $color_inactiveborder = 11
  655. Global Const $color_appworkspace = 12
  656. Global Const $color_highlight = 13
  657. Global Const $color_highlighttext = 14
  658. Global Const $color_btnface = 15
  659. Global Const $color_btnshadow = 16
  660. Global Const $color_graytext = 17
  661. Global Const $color_btntext = 18
  662. Global Const $color_inactivecaptiontext = 19
  663. Global Const $color_btnhighlight = 20
  664. Global Const $color_3ddkshadow = 21
  665. Global Const $color_3dlight = 22
  666. Global Const $color_infotext = 23
  667. Global Const $color_infobk = 24
  668. Global Const $color_hotlight = 26
  669. Global Const $color_gradientactivecaption = 27
  670. Global Const $color_gradientinactivecaption = 28
  671. Global Const $color_menuhilight = 29
  672. Global Const $color_menubar = 30
  673. Global Const $color_desktop = 1
  674. Global Const $color_3dface = 15
  675. Global Const $color_3dshadow = 16
  676. Global Const $color_3dhighlight = 20
  677. Global Const $color_3dhilight = 20
  678. Global Const $color_btnhilight = 20
  679. Global Const $hinst_commctrl = -1
  680. Global Const $idb_std_small_color = 0
  681. Global Const $idb_std_large_color = 1
  682. Global Const $idb_view_small_color = 4
  683. Global Const $idb_view_large_color = 5
  684. Global Const $idb_hist_small_color = 8
  685. Global Const $idb_hist_large_color = 9
  686. Global Const $startf_forceofffeedback = 128
  687. Global Const $startf_forceonfeedback = 64
  688. Global Const $startf_preventpinning = 8192
  689. Global Const $startf_runfullscreen = 32
  690. Global Const $startf_titleisappid = 4096
  691. Global Const $startf_titleislinkname = 2048
  692. Global Const $startf_usecountchars = 8
  693. Global Const $startf_usefillattribute = 16
  694. Global Const $startf_usehotkey = 512
  695. Global Const $startf_useposition = 4
  696. Global Const $startf_useshowwindow = 1
  697. Global Const $startf_usesize = 2
  698. Global Const $startf_usestdhandles = 256
  699. Global Const $cdds_prepaint = 1
  700. Global Const $cdds_postpaint = 2
  701. Global Const $cdds_preerase = 3
  702. Global Const $cdds_posterase = 4
  703. Global Const $cdds_item = 65536
  704. Global Const $cdds_itemprepaint = 65537
  705. Global Const $cdds_itempostpaint = 65538
  706. Global Const $cdds_itempreerase = 65539
  707. Global Const $cdds_itemposterase = 65540
  708. Global Const $cdds_subitem = 131072
  709. Global Const $cdis_selected = 1
  710. Global Const $cdis_grayed = 2
  711. Global Const $cdis_disabled = 4
  712. Global Const $cdis_checked = 8
  713. Global Const $cdis_focus = 16
  714. Global Const $cdis_default = 32
  715. Global Const $cdis_hot = 64
  716. Global Const $cdis_marked = 128
  717. Global Const $cdis_indeterminate = 256
  718. Global Const $cdis_showkeyboardcues = 512
  719. Global Const $cdis_nearhot = 1024
  720. Global Const $cdis_othersidehot = 2048
  721. Global Const $cdis_drophilited = 4096
  722. Global Const $cdrf_dodefault = 0
  723. Global Const $cdrf_newfont = 2
  724. Global Const $cdrf_skipdefault = 4
  725. Global Const $cdrf_notifypostpaint = 16
  726. Global Const $cdrf_notifyitemdraw = 32
  727. Global Const $cdrf_notifysubitemdraw = 32
  728. Global Const $cdrf_notifyposterase = 64
  729. Global Const $cdrf_doerase = 8
  730. Global Const $cdrf_skippostpaint = 256
  731. Global Const $gui_ss_default_gui = BitOR($ws_minimizebox, $ws_caption, $ws_popup, $ws_sysmenu)
  732. Global Const $gui_event_close = -3
  733. Global Const $gui_event_minimize = -4
  734. Global Const $gui_event_restore = -5
  735. Global Const $gui_event_maximize = -6
  736. Global Const $gui_event_primarydown = -7
  737. Global Const $gui_event_primaryup = -8
  738. Global Const $gui_event_secondarydown = -9
  739. Global Const $gui_event_secondaryup = -10
  740. Global Const $gui_event_mousemove = -11
  741. Global Const $gui_event_resized = -12
  742. Global Const $gui_event_dropped = -13
  743. Global Const $gui_rundefmsg = "GUI_RUNDEFMSG"
  744. Global Const $gui_avistop = 0
  745. Global Const $gui_avistart = 1
  746. Global Const $gui_aviclose = 2
  747. Global Const $gui_checked = 1
  748. Global Const $gui_indeterminate = 2
  749. Global Const $gui_unchecked = 4
  750. Global Const $gui_dropaccepted = 8
  751. Global Const $gui_nodropaccepted = 4096
  752. Global Const $gui_acceptfiles = $gui_dropaccepted
  753. Global Const $gui_show = 16
  754. Global Const $gui_hide = 32
  755. Global Const $gui_enable = 64
  756. Global Const $gui_disable = 128
  757. Global Const $gui_focus = 256
  758. Global Const $gui_nofocus = 8192
  759. Global Const $gui_defbutton = 512
  760. Global Const $gui_expand = 1024
  761. Global Const $gui_ontop = 2048
  762. Global Const $gui_fontitalic = 2
  763. Global Const $gui_fontunder = 4
  764. Global Const $gui_fontstrike = 8
  765. Global Const $gui_dockauto = 1
  766. Global Const $gui_dockleft = 2
  767. Global Const $gui_dockright = 4
  768. Global Const $gui_dockhcenter = 8
  769. Global Const $gui_docktop = 32
  770. Global Const $gui_dockbottom = 64
  771. Global Const $gui_dockvcenter = 128
  772. Global Const $gui_dockwidth = 256
  773. Global Const $gui_dockheight = 512
  774. Global Const $gui_docksize = 768
  775. Global Const $gui_dockmenubar = 544
  776. Global Const $gui_dockstatebar = 576
  777. Global Const $gui_dockall = 802
  778. Global Const $gui_dockborders = 102
  779. Global Const $gui_gr_close = 1
  780. Global Const $gui_gr_line = 2
  781. Global Const $gui_gr_bezier = 4
  782. Global Const $gui_gr_move = 6
  783. Global Const $gui_gr_color = 8
  784. Global Const $gui_gr_rect = 10
  785. Global Const $gui_gr_ellipse = 12
  786. Global Const $gui_gr_pie = 14
  787. Global Const $gui_gr_dot = 16
  788. Global Const $gui_gr_pixel = 18
  789. Global Const $gui_gr_hint = 20
  790. Global Const $gui_gr_refresh = 22
  791. Global Const $gui_gr_pensize = 24
  792. Global Const $gui_gr_nobkcolor = -2
  793. Global Const $gui_bkcolor_default = -1
  794. Global Const $gui_bkcolor_transparent = -2
  795. Global Const $gui_bkcolor_lv_alternate = -33554432
  796. Global Const $gui_ws_ex_parentdrag = 1048576
  797. Global Const $acs_center = 1
  798. Global Const $acs_transparent = 2
  799. Global Const $acs_autoplay = 4
  800. Global Const $acs_timer = 8
  801. Global Const $acs_nontransparent = 16
  802. Global Const $gui_ss_default_avi = $acs_transparent
  803. Global Const $__aviconstant_wm_user = 1024
  804. Global Const $acm_opena = $__aviconstant_wm_user + 100
  805. Global Const $acm_play = $__aviconstant_wm_user + 101
  806. Global Const $acm_stop = $__aviconstant_wm_user + 102
  807. Global Const $acm_isplaying = $__aviconstant_wm_user + 104
  808. Global Const $acm_openw = $__aviconstant_wm_user + 103
  809. Global Const $acn_start = 1
  810. Global Const $acn_stop = 2
  811. Global Const $bs_groupbox = 7
  812. Global Const $bs_bottom = 2048
  813. Global Const $bs_center = 768
  814. Global Const $bs_defpushbutton = 1
  815. Global Const $bs_left = 256
  816. Global Const $bs_multiline = 8192
  817. Global Const $bs_pushbox = 10
  818. Global Const $bs_pushlike = 4096
  819. Global Const $bs_right = 512
  820. Global Const $bs_rightbutton = 32
  821. Global Const $bs_top = 1024
  822. Global Const $bs_vcenter = 3072
  823. Global Const $bs_flat = 32768
  824. Global Const $bs_icon = 64
  825. Global Const $bs_bitmap = 128
  826. Global Const $bs_notify = 16384
  827. Global Const $bs_splitbutton = 12
  828. Global Const $bs_defsplitbutton = 13
  829. Global Const $bs_commandlink = 14
  830. Global Const $bs_defcommandlink = 15
  831. Global Const $bcsif_glyph = 1
  832. Global Const $bcsif_image = 2
  833. Global Const $bcsif_style = 4
  834. Global Const $bcsif_size = 8
  835. Global Const $bcss_nosplit = 1
  836. Global Const $bcss_stretch = 2
  837. Global Const $bcss_alignleft = 4
  838. Global Const $bcss_image = 8
  839. Global Const $button_imagelist_align_left = 0
  840. Global Const $button_imagelist_align_right = 1
  841. Global Const $button_imagelist_align_top = 2
  842. Global Const $button_imagelist_align_bottom = 3
  843. Global Const $button_imagelist_align_center = 4
  844. Global Const $bs_3state = 5
  845. Global Const $bs_auto3state = 6
  846. Global Const $bs_autocheckbox = 3
  847. Global Const $bs_checkbox = 2
  848. Global Const $bs_radiobutton = 4
  849. Global Const $bs_autoradiobutton = 9
  850. Global Const $bs_ownerdraw = 11
  851. Global Const $gui_ss_default_button = 0
  852. Global Const $gui_ss_default_checkbox = 0
  853. Global Const $gui_ss_default_group = 0
  854. Global Const $gui_ss_default_radio = 0
  855. Global Const $bcm_first = 5632
  856. Global Const $bcm_getidealsize = ($bcm_first + 1)
  857. Global Const $bcm_getimagelist = ($bcm_first + 3)
  858. Global Const $bcm_getnote = ($bcm_first + 10)
  859. Global Const $bcm_getnotelength = ($bcm_first + 11)
  860. Global Const $bcm_getsplitinfo = ($bcm_first + 8)
  861. Global Const $bcm_gettextmargin = ($bcm_first + 5)
  862. Global Const $bcm_setdropdownstate = ($bcm_first + 6)
  863. Global Const $bcm_setimagelist = ($bcm_first + 2)
  864. Global Const $bcm_setnote = ($bcm_first + 9)
  865. Global Const $bcm_setshield = ($bcm_first + 12)
  866. Global Const $bcm_setsplitinfo = ($bcm_first + 7)
  867. Global Const $bcm_settextmargin = ($bcm_first + 4)
  868. Global Const $bm_click = 245
  869. Global Const $bm_getcheck = 240
  870. Global Const $bm_getimage = 246
  871. Global Const $bm_getstate = 242
  872. Global Const $bm_setcheck = 241
  873. Global Const $bm_setdontclick = 248
  874. Global Const $bm_setimage = 247
  875. Global Const $bm_setstate = 243
  876. Global Const $bm_setstyle = 244
  877. Global Const $bcn_first = -1250
  878. Global Const $bcn_dropdown = ($bcn_first + 2)
  879. Global Const $bcn_hotitemchange = ($bcn_first + 1)
  880. Global Const $bn_clicked = 0
  881. Global Const $bn_paint = 1
  882. Global Const $bn_hilite = 2
  883. Global Const $bn_unhilite = 3
  884. Global Const $bn_disable = 4
  885. Global Const $bn_doubleclicked = 5
  886. Global Const $bn_setfocus = 6
  887. Global Const $bn_killfocus = 7
  888. Global Const $bn_pushed = $bn_hilite
  889. Global Const $bn_unpushed = $bn_unhilite
  890. Global Const $bn_dblclk = $bn_doubleclicked
  891. Global Const $bst_checked = 1
  892. Global Const $bst_indeterminate = 2
  893. Global Const $bst_unchecked = 0
  894. Global Const $bst_focus = 8
  895. Global Const $bst_pushed = 4
  896. Global Const $bst_dontclick = 128
  897. Global Const $cb_err = -1
  898. Global Const $cb_errattribute = -3
  899. Global Const $cb_errrequired = -4
  900. Global Const $cb_errspace = -2
  901. Global Const $cb_okay = 0
  902. Global Const $state_system_invisible = 32768
  903. Global Const $state_system_pressed = 8
  904. Global Const $cbs_autohscroll = 64
  905. Global Const $cbs_disablenoscroll = 2048
  906. Global Const $cbs_dropdown = 2
  907. Global Const $cbs_dropdownlist = 3
  908. Global Const $cbs_hasstrings = 512
  909. Global Const $cbs_lowercase = 16384
  910. Global Const $cbs_nointegralheight = 1024
  911. Global Const $cbs_oemconvert = 128
  912. Global Const $cbs_ownerdrawfixed = 16
  913. Global Const $cbs_ownerdrawvariable = 32
  914. Global Const $cbs_simple = 1
  915. Global Const $cbs_sort = 256
  916. Global Const $cbs_uppercase = 8192
  917. Global Const $cbm_first = 5888
  918. Global Const $cb_addstring = 323
  919. Global Const $cb_deletestring = 324
  920. Global Const $cb_dir = 325
  921. Global Const $cb_findstring = 332
  922. Global Const $cb_findstringexact = 344
  923. Global Const $cb_getcomboboxinfo = 356
  924. Global Const $cb_getcount = 326
  925. Global Const $cb_getcuebanner = ($cbm_first + 4)
  926. Global Const $cb_getcursel = 327
  927. Global Const $cb_getdroppedcontrolrect = 338
  928. Global Const $cb_getdroppedstate = 343
  929. Global Const $cb_getdroppedwidth = 351
  930. Global Const $cb_geteditsel = 320
  931. Global Const $cb_getextendedui = 342
  932. Global Const $cb_gethorizontalextent = 349
  933. Global Const $cb_getitemdata = 336
  934. Global Const $cb_getitemheight = 340
  935. Global Const $cb_getlbtext = 328
  936. Global Const $cb_getlbtextlen = 329
  937. Global Const $cb_getlocale = 346
  938. Global Const $cb_getminvisible = 5890
  939. Global Const $cb_gettopindex = 347
  940. Global Const $cb_initstorage = 353
  941. Global Const $cb_limittext = 321
  942. Global Const $cb_resetcontent = 331
  943. Global Const $cb_insertstring = 330
  944. Global Const $cb_selectstring = 333
  945. Global Const $cb_setcuebanner = ($cbm_first + 3)
  946. Global Const $cb_setcursel = 334
  947. Global Const $cb_setdroppedwidth = 352
  948. Global Const $cb_seteditsel = 322
  949. Global Const $cb_setextendedui = 341
  950. Global Const $cb_sethorizontalextent = 350
  951. Global Const $cb_setitemdata = 337
  952. Global Const $cb_setitemheight = 339
  953. Global Const $cb_setlocale = 345
  954. Global Const $cb_setminvisible = 5889
  955. Global Const $cb_settopindex = 348
  956. Global Const $cb_showdropdown = 335
  957. Global Const $cbn_closeup = 8
  958. Global Const $cbn_dblclk = 2
  959. Global Const $cbn_dropdown = 7
  960. Global Const $cbn_editchange = 5
  961. Global Const $cbn_editupdate = 6
  962. Global Const $cbn_errspace = (-1)
  963. Global Const $cbn_killfocus = 4
  964. Global Const $cbn_selchange = 1
  965. Global Const $cbn_selendcancel = 10
  966. Global Const $cbn_selendok = 9
  967. Global Const $cbn_setfocus = 3
  968. Global Const $cbes_ex_casesensitive = 16
  969. Global Const $cbes_ex_noeditimage = 1
  970. Global Const $cbes_ex_noeditimageindent = 2
  971. Global Const $cbes_ex_nosizelimit = 8
  972. Global Const $__comboboxconstant_wm_user = 1024
  973. Global Const $cbem_deleteitem = $cb_deletestring
  974. Global Const $cbem_getcombocontrol = ($__comboboxconstant_wm_user + 6)
  975. Global Const $cbem_geteditcontrol = ($__comboboxconstant_wm_user + 7)
  976. Global Const $cbem_getexstyle = ($__comboboxconstant_wm_user + 9)
  977. Global Const $cbem_getextendedstyle = ($__comboboxconstant_wm_user + 9)
  978. Global Const $cbem_getimagelist = ($__comboboxconstant_wm_user + 3)
  979. Global Const $cbem_getitema = ($__comboboxconstant_wm_user + 4)
  980. Global Const $cbem_getitemw = ($__comboboxconstant_wm_user + 13)
  981. Global Const $cbem_getunicodeformat = 8192 + 6
  982. Global Const $cbem_haseditchanged = ($__comboboxconstant_wm_user + 10)
  983. Global Const $cbem_insertitema = ($__comboboxconstant_wm_user + 1)
  984. Global Const $cbem_insertitemw = ($__comboboxconstant_wm_user + 11)
  985. Global Const $cbem_setexstyle = ($__comboboxconstant_wm_user + 8)
  986. Global Const $cbem_setextendedstyle = ($__comboboxconstant_wm_user + 14)
  987. Global Const $cbem_setimagelist = ($__comboboxconstant_wm_user + 2)
  988. Global Const $cbem_setitema = ($__comboboxconstant_wm_user + 5)
  989. Global Const $cbem_setitemw = ($__comboboxconstant_wm_user + 12)
  990. Global Const $cbem_setunicodeformat = 8192 + 5
  991. Global Const $cbem_setwindowtheme = 8192 + 11
  992. Global Const $cben_first = (-800)
  993. Global Const $cben_last = (-830)
  994. Global Const $cben_beginedit = ($cben_first - 4)
  995. Global Const $cben_deleteitem = ($cben_first - 2)
  996. Global Const $cben_dragbegina = ($cben_first - 8)
  997. Global Const $cben_dragbeginw = ($cben_first - 9)
  998. Global Const $cben_endedita = ($cben_first - 5)
  999. Global Const $cben_endeditw = ($cben_first - 6)
  1000. Global Const $cben_getdispinfo = ($cben_first + 0)
  1001. Global Const $cben_getdispinfoa = ($cben_first + 0)
  1002. Global Const $cben_getdispinfow = ($cben_first - 7)
  1003. Global Const $cben_insertitem = ($cben_first - 1)
  1004. Global Const $cbeif_di_setitem = 268435456
  1005. Global Const $cbeif_image = 2
  1006. Global Const $cbeif_indent = 16
  1007. Global Const $cbeif_lparam = 32
  1008. Global Const $cbeif_overlay = 8
  1009. Global Const $cbeif_selectedimage = 4
  1010. Global Const $cbeif_text = 1
  1011. Global Const $gui_ss_default_combo = 2097218
  1012. Global Const $dts_shortdateformat = 0
  1013. Global Const $dts_updown = 1
  1014. Global Const $dts_shownone = 2
  1015. Global Const $dts_longdateformat = 4
  1016. Global Const $dts_timeformat = 9
  1017. Global Const $dts_rightalign = 32
  1018. Global Const $dts_shortdatecenturyformat = 12
  1019. Global Const $dts_appcanparse = 16
  1020. Global Const $gdt_error = -1
  1021. Global Const $gdt_valid = 0
  1022. Global Const $gdt_none = 1
  1023. Global Const $gdtr_min = 1
  1024. Global Const $gdtr_max = 2
  1025. Global Const $mcht_nowhere = 0
  1026. Global Const $mcht_title = 65536
  1027. Global Const $mcht_calendar = 131072
  1028. Global Const $mcht_todaylink = 196608
  1029. Global Const $mcht_next = 16777216
  1030. Global Const $mcht_prev = 33554432
  1031. Global Const $mcht_titlebk = 65536
  1032. Global Const $mcht_titlemonth = 65537
  1033. Global Const $mcht_titleyear = 65538
  1034. Global Const $mcht_titlebtnnext = 16842755
  1035. Global Const $mcht_titlebtnprev = 33619971
  1036. Global Const $mcht_calendarbk = 131072
  1037. Global Const $mcht_calendardate = 131073
  1038. Global Const $mcht_calendarday = 131074
  1039. Global Const $mcht_calendarweeknum = 131075
  1040. Global Const $mcht_calendardatenext = 16908288
  1041. Global Const $mcht_calendardateprev = 33685504
  1042. Global Const $mcs_daystate = 1
  1043. Global Const $mcs_multiselect = 2
  1044. Global Const $mcs_weeknumbers = 4
  1045. Global Const $mcs_notodaycircle = 8
  1046. Global Const $mcs_notoday = 16
  1047. Global Const $mcs_notrailingdates = 64
  1048. Global Const $mcs_shortdaysofweek = 128
  1049. Global Const $mcs_noselchangeonnav = 256
  1050. Global Const $mcm_first = 4096
  1051. Global Const $mcm_getcalendarborder = ($mcm_first + 31)
  1052. Global Const $mcm_getcalendarcount = ($mcm_first + 23)
  1053. Global Const $mcm_getcalendargridinfo = ($mcm_first + 24)
  1054. Global Const $mcm_getcalid = ($mcm_first + 27)
  1055. Global Const $mcm_getcolor = ($mcm_first + 11)
  1056. Global Const $mcm_getcurrentview = ($mcm_first + 22)
  1057. Global Const $mcm_getcursel = ($mcm_first + 1)
  1058. Global Const $mcm_getfirstdayofweek = ($mcm_first + 16)
  1059. Global Const $mcm_getmaxselcount = ($mcm_first + 3)
  1060. Global Const $mcm_getmaxtodaywidth = ($mcm_first + 21)
  1061. Global Const $mcm_getminreqrect = ($mcm_first + 9)
  1062. Global Const $mcm_getmonthdelta = ($mcm_first + 19)
  1063. Global Const $mcm_getmonthrange = ($mcm_first + 7)
  1064. Global Const $mcm_getrange = ($mcm_first + 17)
  1065. Global Const $mcm_getselrange = ($mcm_first + 5)
  1066. Global Const $mcm_gettoday = ($mcm_first + 13)
  1067. Global Const $mcm_getunicodeformat = 8192 + 6
  1068. Global Const $mcm_hittest = ($mcm_first + 14)
  1069. Global Const $mcm_setcalendarborder = ($mcm_first + 30)
  1070. Global Const $mcm_setcalid = ($mcm_first + 28)
  1071. Global Const $mcm_setcolor = ($mcm_first + 10)
  1072. Global Const $mcm_setcurrentview = ($mcm_first + 32)
  1073. Global Const $mcm_setcursel = ($mcm_first + 2)
  1074. Global Const $mcm_setdaystate = ($mcm_first + 8)
  1075. Global Const $mcm_setfirstdayofweek = ($mcm_first + 15)
  1076. Global Const $mcm_setmaxselcount = ($mcm_first + 4)
  1077. Global Const $mcm_setmonthdelta = ($mcm_first + 20)
  1078. Global Const $mcm_setrange = ($mcm_first + 18)
  1079. Global Const $mcm_setselrange = ($mcm_first + 6)
  1080. Global Const $mcm_settoday = ($mcm_first + 12)
  1081. Global Const $mcm_setunicodeformat = 8192 + 5
  1082. Global Const $mcm_sizerecttomin = ($mcm_first + 29)
  1083. Global Const $mcn_first = -746
  1084. Global Const $mcn_selchange = ($mcn_first - 3)
  1085. Global Const $mcn_getdaystate = ($mcn_first - 1)
  1086. Global Const $mcn_select = ($mcn_first)
  1087. Global Const $mcn_viewchange = ($mcn_first - 4)
  1088. Global Const $mcsc_background = 0
  1089. Global Const $mcsc_monthbk = 4
  1090. Global Const $mcsc_text = 1
  1091. Global Const $mcsc_titlebk = 2
  1092. Global Const $mcsc_titletext = 3
  1093. Global Const $mcsc_trailingtext = 5
  1094. Global Const $dtm_first = 4096
  1095. Global Const $dtm_getsystemtime = $dtm_first + 1
  1096. Global Const $dtm_setsystemtime = $dtm_first + 2
  1097. Global Const $dtm_getrange = $dtm_first + 3
  1098. Global Const $dtm_setrange = $dtm_first + 4
  1099. Global Const $dtm_setformat = $dtm_first + 5
  1100. Global Const $dtm_setmccolor = $dtm_first + 6
  1101. Global Const $dtm_getmccolor = $dtm_first + 7
  1102. Global Const $dtm_getmonthcal = $dtm_first + 8
  1103. Global Const $dtm_setmcfont = $dtm_first + 9
  1104. Global Const $dtm_getmcfont = $dtm_first + 10
  1105. Global Const $dtm_setformatw = $dtm_first + 50
  1106. Global Const $dtn_first = -740
  1107. Global Const $dtn_first2 = -753
  1108. Global Const $dtn_datetimechange = $dtn_first2 - 6
  1109. Global Const $dtn_userstring = $dtn_first2 - 5
  1110. Global Const $dtn_wmkeydown = $dtn_first2 - 4
  1111. Global Const $dtn_format = $dtn_first2 - 3
  1112. Global Const $dtn_formatquery = $dtn_first2 - 2
  1113. Global Const $dtn_dropdown = $dtn_first2 - 1
  1114. Global Const $dtn_closeup = $dtn_first2 + 0
  1115. Global Const $dtn_userstringw = $dtn_first - 5
  1116. Global Const $dtn_wmkeydownw = $dtn_first - 4
  1117. Global Const $dtn_formatw = $dtn_first - 3
  1118. Global Const $dtn_formatqueryw = $dtn_first - 2
  1119. Global Const $gui_ss_default_date = $dts_longdateformat
  1120. Global Const $gui_ss_default_monthcal = 0
  1121. Global Const $es_left = 0
  1122. Global Const $es_center = 1
  1123. Global Const $es_right = 2
  1124. Global Const $es_multiline = 4
  1125. Global Const $es_uppercase = 8
  1126. Global Const $es_lowercase = 16
  1127. Global Const $es_password = 32
  1128. Global Const $es_autovscroll = 64
  1129. Global Const $es_autohscroll = 128
  1130. Global Const $es_nohidesel = 256
  1131. Global Const $es_oemconvert = 1024
  1132. Global Const $es_readonly = 2048
  1133. Global Const $es_wantreturn = 4096
  1134. Global Const $es_number = 8192
  1135. Global Const $ec_err = -1
  1136. Global Const $ecm_first = 5376
  1137. Global Const $em_canundo = 198
  1138. Global Const $em_charfrompos = 215
  1139. Global Const $em_emptyundobuffer = 205
  1140. Global Const $em_fmtlines = 200
  1141. Global Const $em_getcuebanner = ($ecm_first + 2)
  1142. Global Const $em_getfirstvisibleline = 206
  1143. Global Const $em_gethandle = 189
  1144. Global Const $em_getimestatus = 217
  1145. Global Const $em_getlimittext = 213
  1146. Global Const $em_getline = 196
  1147. Global Const $em_getlinecount = 186
  1148. Global Const $em_getmargins = 212
  1149. Global Const $em_getmodify = 184
  1150. Global Const $em_getpasswordchar = 210
  1151. Global Const $em_getrect = 178
  1152. Global Const $em_getsel = 176
  1153. Global Const $em_getthumb = 190
  1154. Global Const $em_getwordbreakproc = 209
  1155. Global Const $em_hideballoontip = ($ecm_first + 4)
  1156. Global Const $em_limittext = 197
  1157. Global Const $em_linefromchar = 201
  1158. Global Const $em_lineindex = 187
  1159. Global Const $em_linelength = 193
  1160. Global Const $em_linescroll = 182
  1161. Global Const $em_posfromchar = 214
  1162. Global Const $em_replacesel = 194
  1163. Global Const $em_scroll = 181
  1164. Global Const $em_scrollcaret = 183
  1165. Global Const $em_setcuebanner = ($ecm_first + 1)
  1166. Global Const $em_sethandle = 188
  1167. Global Const $em_setimestatus = 216
  1168. Global Const $em_setlimittext = $em_limittext
  1169. Global Const $em_setmargins = 211
  1170. Global Const $em_setmodify = 185
  1171. Global Const $em_setpasswordchar = 204
  1172. Global Const $em_setreadonly = 207
  1173. Global Const $em_setrect = 179
  1174. Global Const $em_setrectnp = 180
  1175. Global Const $em_setsel = 177
  1176. Global Const $em_settabstops = 203
  1177. Global Const $em_setwordbreakproc = 208
  1178. Global Const $em_showballoontip = ($ecm_first + 3)
  1179. Global Const $em_undo = 199
  1180. Global Const $ec_leftmargin = 1
  1181. Global Const $ec_rightmargin = 2
  1182. Global Const $ec_usefontinfo = 65535
  1183. Global Const $emsis_compositionstring = 1
  1184. Global Const $eimes_getcompstratonce = 1
  1185. Global Const $eimes_cancelcompstrinfocus = 2
  1186. Global Const $eimes_completecompstrkillfocus = 4
  1187. Global Const $en_align_ltr_ec = 1792
  1188. Global Const $en_align_rtl_ec = 1793
  1189. Global Const $en_change = 768
  1190. Global Const $en_errspace = 1280
  1191. Global Const $en_hscroll = 1537
  1192. Global Const $en_killfocus = 512
  1193. Global Const $en_maxtext = 1281
  1194. Global Const $en_setfocus = 256
  1195. Global Const $en_update = 1024
  1196. Global Const $en_vscroll = 1538
  1197. Global Const $gui_ss_default_edit = 3150016
  1198. Global Const $gui_ss_default_input = 128
  1199. Global Const $lbs_notify = 1
  1200. Global Const $lbs_sort = 2
  1201. Global Const $lbs_noredraw = 4
  1202. Global Const $lbs_multiplesel = 8
  1203. Global Const $lbs_ownerdrawfixed = 16
  1204. Global Const $lbs_ownerdrawvariable = 32
  1205. Global Const $lbs_hasstrings = 64
  1206. Global Const $lbs_usetabstops = 128
  1207. Global Const $lbs_nointegralheight = 256
  1208. Global Const $lbs_multicolumn = 512
  1209. Global Const $lbs_wantkeyboardinput = 1024
  1210. Global Const $lbs_extendedsel = 2048
  1211. Global Const $lbs_disablenoscroll = 4096
  1212. Global Const $lbs_nodata = 8192
  1213. Global Const $lbs_nosel = 16384
  1214. Global Const $lbs_combobox = 32768
  1215. Global Const $lbs_standard = 3
  1216. Global Const $gui_ss_default_list = 10485763
  1217. Global Const $lb_err = -1
  1218. Global Const $lb_errattribute = -3
  1219. Global Const $lb_errrequired = -4
  1220. Global Const $lb_errspace = -2
  1221. Global Const $lb_addstring = 384
  1222. Global Const $lb_insertstring = 385
  1223. Global Const $lb_deletestring = 386
  1224. Global Const $lb_selitemrangeex = 387
  1225. Global Const $lb_resetcontent = 388
  1226. Global Const $lb_setsel = 389
  1227. Global Const $lb_setcursel = 390
  1228. Global Const $lb_getsel = 391
  1229. Global Const $lb_getcursel = 392
  1230. Global Const $lb_gettext = 393
  1231. Global Const $lb_gettextlen = 394
  1232. Global Const $lb_getcount = 395
  1233. Global Const $lb_selectstring = 396
  1234. Global Const $lb_dir = 397
  1235. Global Const $lb_gettopindex = 398
  1236. Global Const $lb_findstring = 399
  1237. Global Const $lb_getselcount = 400
  1238. Global Const $lb_getselitems = 401
  1239. Global Const $lb_settabstops = 402
  1240. Global Const $lb_gethorizontalextent = 403
  1241. Global Const $lb_sethorizontalextent = 404
  1242. Global Const $lb_setcolumnwidth = 405
  1243. Global Const $lb_addfile = 406
  1244. Global Const $lb_settopindex = 407
  1245. Global Const $lb_getitemrect = 408
  1246. Global Const $lb_getitemdata = 409
  1247. Global Const $lb_setitemdata = 410
  1248. Global Const $lb_selitemrange = 411
  1249. Global Const $lb_setanchorindex = 412
  1250. Global Const $lb_getanchorindex = 413
  1251. Global Const $lb_setcaretindex = 414
  1252. Global Const $lb_getcaretindex = 415
  1253. Global Const $lb_setitemheight = 416
  1254. Global Const $lb_getitemheight = 417
  1255. Global Const $lb_findstringexact = 418
  1256. Global Const $lb_setlocale = 421
  1257. Global Const $lb_getlocale = 422
  1258. Global Const $lb_setcount = 423
  1259. Global Const $lb_initstorage = 424
  1260. Global Const $lb_itemfrompoint = 425
  1261. Global Const $lb_multipleaddstring = 433
  1262. Global Const $lb_getlistboxinfo = 434
  1263. Global Const $lbn_errspace = -2
  1264. Global Const $lbn_selchange = 1
  1265. Global Const $lbn_dblclk = 2
  1266. Global Const $lbn_selcancel = 3
  1267. Global Const $lbn_setfocus = 4
  1268. Global Const $lbn_killfocus = 5
  1269. Global Const $lvgs_normal = 0
  1270. Global Const $lvgs_collapsed = 1
  1271. Global Const $lvgs_hidden = 2
  1272. Global Const $lvgs_noheader = 4
  1273. Global Const $lvgs_collapsible = 8
  1274. Global Const $lvgs_focused = 16
  1275. Global Const $lvgs_selected = 32
  1276. Global Const $lvgs_subseted = 64
  1277. Global Const $lvgs_subsetlinkfocused = 128
  1278. Global Const $lvggr_group = 0
  1279. Global Const $lvggr_header = 1
  1280. Global Const $lvggr_label = 2
  1281. Global Const $lvggr_subsetlink = 3
  1282. Global Const $lv_err = -1
  1283. Global Const $lvbkif_source_none = 0
  1284. Global Const $lvbkif_source_hbitmap = 1
  1285. Global Const $lvbkif_source_url = 2
  1286. Global Const $lvbkif_source_mask = 3
  1287. Global Const $lvbkif_style_normal = 0
  1288. Global Const $lvbkif_style_tile = 16
  1289. Global Const $lvbkif_style_mask = 16
  1290. Global Const $lvbkif_flag_tileoffset = 256
  1291. Global Const $lvbkif_type_watermark = 268435456
  1292. Global Const $lv_view_details = 1
  1293. Global Const $lv_view_icon = 0
  1294. Global Const $lv_view_list = 3
  1295. Global Const $lv_view_smallicon = 2
  1296. Global Const $lv_view_tile = 4
  1297. Global Const $lva_alignleft = 1
  1298. Global Const $lva_aligntop = 2
  1299. Global Const $lva_default = 0
  1300. Global Const $lva_snaptogrid = 5
  1301. Global Const $lvcdi_item = 0
  1302. Global Const $lvcdi_group = 1
  1303. Global Const $lvcf_alldata = 63
  1304. Global Const $lvcf_fmt = 1
  1305. Global Const $lvcf_image = 16
  1306. Global Const $lvcfmt_justifymask = 3
  1307. Global Const $lvcf_text = 4
  1308. Global Const $lvcf_width = 2
  1309. Global Const $lvcfmt_bitmap_on_right = 4096
  1310. Global Const $lvcfmt_center = 2
  1311. Global Const $lvcfmt_col_has_images = 32768
  1312. Global Const $lvcfmt_image = 2048
  1313. Global Const $lvcfmt_left = 0
  1314. Global Const $lvcfmt_right = 1
  1315. Global Const $lvcfmt_line_break = 1048576
  1316. Global Const $lvcfmt_fill = 2097152
  1317. Global Const $lvcfmt_wrap = 4194304
  1318. Global Const $lvcfmt_no_title = 8388608
  1319. Global Const $lvcfmt_tile_placementmask = BitOR($lvcfmt_line_break, $lvcfmt_fill)
  1320. Global Const $lvfi_nearestxy = 64
  1321. Global Const $lvfi_param = 1
  1322. Global Const $lvfi_partial = 8
  1323. Global Const $lvfi_string = 2
  1324. Global Const $lvfi_substring = 4
  1325. Global Const $lvfi_wrap = 32
  1326. Global Const $lvga_footer_left = 8
  1327. Global Const $lvga_footer_center = 16
  1328. Global Const $lvga_footer_right = 32
  1329. Global Const $lvga_header_left = 1
  1330. Global Const $lvga_header_center = 2
  1331. Global Const $lvga_header_right = 4
  1332. Global Const $lvgf_align = 8
  1333. Global Const $lvgf_descriptiontop = 1024
  1334. Global Const $lvgf_descriptionbottom = 2048
  1335. Global Const $lvgf_extendedimage = 8192
  1336. Global Const $lvgf_footer = 2
  1337. Global Const $lvgf_groupid = 16
  1338. Global Const $lvgf_header = 1
  1339. Global Const $lvgf_items = 16384
  1340. Global Const $lvgf_none = 0
  1341. Global Const $lvgf_state = 4
  1342. Global Const $lvgf_subset = 32768
  1343. Global Const $lvgf_subsetitems = 65536
  1344. Global Const $lvgf_subtitle = 256
  1345. Global Const $lvgf_task = 512
  1346. Global Const $lvgf_titleimage = 4096
  1347. Global Const $lvht_above = 8
  1348. Global Const $lvht_below = 16
  1349. Global Const $lvht_nowhere = 1
  1350. Global Const $lvht_onitemicon = 2
  1351. Global Const $lvht_onitemlabel = 4
  1352. Global Const $lvht_onitemstateicon = 8
  1353. Global Const $lvht_toleft = 64
  1354. Global Const $lvht_toright = 32
  1355. Global Const $lvht_onitem = BitOR($lvht_onitemicon, $lvht_onitemlabel, $lvht_onitemstateicon)
  1356. Global Const $lvht_ex_group_header = 268435456
  1357. Global Const $lvht_ex_group_footer = 536870912
  1358. Global Const $lvht_ex_group_collapse = 1073741824
  1359. Global Const $lvht_ex_group_background = -2147483648
  1360. Global Const $lvht_ex_group_stateicon = 16777216
  1361. Global Const $lvht_ex_group_subsetlink = 33554432
  1362. Global Const $lvht_ex_group = BitOR($lvht_ex_group_background, $lvht_ex_group_collapse, $lvht_ex_group_footer, $lvht_ex_group_header, $lvht_ex_group_stateicon, $lvht_ex_group_subsetlink)
  1363. Global Const $lvht_ex_oncontents = 67108864
  1364. Global Const $lvht_ex_footer = 134217728
  1365. Global Const $lvif_colfmt = 65536
  1366. Global Const $lvif_columns = 512
  1367. Global Const $lvif_groupid = 256
  1368. Global Const $lvif_image = 2
  1369. Global Const $lvif_indent = 16
  1370. Global Const $lvif_norecompute = 2048
  1371. Global Const $lvif_param = 4
  1372. Global Const $lvif_state = 8
  1373. Global Const $lvif_text = 1
  1374. Global Const $lvim_after = 1
  1375. Global Const $lvir_bounds = 0
  1376. Global Const $lvir_icon = 1
  1377. Global Const $lvir_label = 2
  1378. Global Const $lvir_selectbounds = 3
  1379. Global Const $lvis_cut = 4
  1380. Global Const $lvis_drophilited = 8
  1381. Global Const $lvis_focused = 1
  1382. Global Const $lvis_overlaymask = 3840
  1383. Global Const $lvis_selected = 2
  1384. Global Const $lvis_stateimagemask = 61440
  1385. Global Const $lvs_alignleft = 2048
  1386. Global Const $lvs_alignmask = 3072
  1387. Global Const $lvs_aligntop = 0
  1388. Global Const $lvs_autoarrange = 256
  1389. Global Const $lvs_default = 13
  1390. Global Const $lvs_editlabels = 512
  1391. Global Const $lvs_icon = 0
  1392. Global Const $lvs_list = 3
  1393. Global Const $lvs_nocolumnheader = 16384
  1394. Global Const $lvs_nolabelwrap = 128
  1395. Global Const $lvs_noscroll = 8192
  1396. Global Const $lvs_nosortheader = 32768
  1397. Global Const $lvs_ownerdata = 4096
  1398. Global Const $lvs_ownerdrawfixed = 1024
  1399. Global Const $lvs_report = 1
  1400. Global Const $lvs_shareimagelists = 64
  1401. Global Const $lvs_showselalways = 8
  1402. Global Const $lvs_singlesel = 4
  1403. Global Const $lvs_smallicon = 2
  1404. Global Const $lvs_sortascending = 16
  1405. Global Const $lvs_sortdescending = 32
  1406. Global Const $lvs_typemask = 3
  1407. Global Const $lvs_typestylemask = 64512
  1408. Global Const $lvs_ex_autoautoarrange = 16777216
  1409. Global Const $lvs_ex_autocheckselect = 134217728
  1410. Global Const $lvs_ex_autosizecolumns = 268435456
  1411. Global Const $lvs_ex_borderselect = 32768
  1412. Global Const $lvs_ex_checkboxes = 4
  1413. Global Const $lvs_ex_columnoverflow = -2147483648
  1414. Global Const $lvs_ex_columnsnappoints = 1073741824
  1415. Global Const $lvs_ex_doublebuffer = 65536
  1416. Global Const $lvs_ex_flatsb = 256
  1417. Global Const $lvs_ex_fullrowselect = 32
  1418. Global Const $lvs_ex_gridlines = 1
  1419. Global Const $lvs_ex_headerdragdrop = 16
  1420. Global Const $lvs_ex_headerinallviews = 33554432
  1421. Global Const $lvs_ex_hidelabels = 131072
  1422. Global Const $lvs_ex_infotip = 1024
  1423. Global Const $lvs_ex_justifycolumns = 2097152
  1424. Global Const $lvs_ex_labeltip = 16384
  1425. Global Const $lvs_ex_multiworkareas = 8192
  1426. Global Const $lvs_ex_oneclickactivate = 64
  1427. Global Const $lvs_ex_regional = 512
  1428. Global Const $lvs_ex_simpleselect = 1048576
  1429. Global Const $lvs_ex_snaptogrid = 524288
  1430. Global Const $lvs_ex_subitemimages = 2
  1431. Global Const $lvs_ex_trackselect = 8
  1432. Global Const $lvs_ex_transparentbkgnd = 4194304
  1433. Global Const $lvs_ex_transparentshadowtext = 8388608
  1434. Global Const $lvs_ex_twoclickactivate = 128
  1435. Global Const $lvs_ex_underlinecold = 4096
  1436. Global Const $lvs_ex_underlinehot = 2048
  1437. Global Const $gui_ss_default_listview = BitOR($lvs_showselalways, $lvs_singlesel)
  1438. Global Const $lvm_first = 4096
  1439. Global Const $lvm_approximateviewrect = ($lvm_first + 64)
  1440. Global Const $lvm_arrange = ($lvm_first + 22)
  1441. Global Const $lvm_canceleditlabel = ($lvm_first + 179)
  1442. Global Const $lvm_createdragimage = ($lvm_first + 33)
  1443. Global Const $lvm_deleteallitems = ($lvm_first + 9)
  1444. Global Const $lvm_deletecolumn = ($lvm_first + 28)
  1445. Global Const $lvm_deleteitem = ($lvm_first + 8)
  1446. Global Const $lvm_editlabela = ($lvm_first + 23)
  1447. Global Const $lvm_editlabelw = ($lvm_first + 118)
  1448. Global Const $lvm_editlabel = $lvm_editlabela
  1449. Global Const $lvm_enablegroupview = ($lvm_first + 157)
  1450. Global Const $lvm_ensurevisible = ($lvm_first + 19)
  1451. Global Const $lvm_finditem = ($lvm_first + 13)
  1452. Global Const $lvm_getbkcolor = ($lvm_first + 0)
  1453. Global Const $lvm_getbkimagea = ($lvm_first + 69)
  1454. Global Const $lvm_getbkimagew = ($lvm_first + 139)
  1455. Global Const $lvm_getcallbackmask = ($lvm_first + 10)
  1456. Global Const $lvm_getcolumna = ($lvm_first + 25)
  1457. Global Const $lvm_getcolumnw = ($lvm_first + 95)
  1458. Global Const $lvm_getcolumnorderarray = ($lvm_first + 59)
  1459. Global Const $lvm_getcolumnwidth = ($lvm_first + 29)
  1460. Global Const $lvm_getcountperpage = ($lvm_first + 40)
  1461. Global Const $lvm_geteditcontrol = ($lvm_first + 24)
  1462. Global Const $lvm_getemptytext = ($lvm_first + 204)
  1463. Global Const $lvm_getextendedlistviewstyle = ($lvm_first + 55)
  1464. Global Const $lvm_getfocusedgroup = ($lvm_first + 93)
  1465. Global Const $lvm_getfooterinfo = ($lvm_first + 206)
  1466. Global Const $lvm_getfooteritem = ($lvm_first + 208)
  1467. Global Const $lvm_getfooteritemrect = ($lvm_first + 207)
  1468. Global Const $lvm_getfooterrect = ($lvm_first + 205)
  1469. Global Const $lvm_getgroupcount = ($lvm_first + 152)
  1470. Global Const $lvm_getgroupinfo = ($lvm_first + 149)
  1471. Global Const $lvm_getgroupinfobyindex = ($lvm_first + 153)
  1472. Global Const $lvm_getgroupmetrics = ($lvm_first + 156)
  1473. Global Const $lvm_getgrouprect = ($lvm_first + 98)
  1474. Global Const $lvm_getgroupstate = ($lvm_first + 92)
  1475. Global Const $lvm_getheader = ($lvm_first + 31)
  1476. Global Const $lvm_gethotcursor = ($lvm_first + 63)
  1477. Global Const $lvm_gethotitem = ($lvm_first + 61)
  1478. Global Const $lvm_gethovertime = ($lvm_first + 72)
  1479. Global Const $lvm_getimagelist = ($lvm_first + 2)
  1480. Global Const $lvm_getinsertmark = ($lvm_first + 167)
  1481. Global Const $lvm_getinsertmarkcolor = ($lvm_first + 171)
  1482. Global Const $lvm_getinsertmarkrect = ($lvm_first + 169)
  1483. Global Const $lvm_getisearchstringa = ($lvm_first + 52)
  1484. Global Const $lvm_getisearchstringw = ($lvm_first + 117)
  1485. Global Const $lvm_getitema = ($lvm_first + 5)
  1486. Global Const $lvm_getitemw = ($lvm_first + 75)
  1487. Global Const $lvm_getitemcount = ($lvm_first + 4)
  1488. Global Const $lvm_getitemindexrect = ($lvm_first + 209)
  1489. Global Const $lvm_getitemposition = ($lvm_first + 16)
  1490. Global Const $lvm_getitemrect = ($lvm_first + 14)
  1491. Global Const $lvm_getitemspacing = ($lvm_first + 51)
  1492. Global Const $lvm_getitemstate = ($lvm_first + 44)
  1493. Global Const $lvm_getitemtexta = ($lvm_first + 45)
  1494. Global Const $lvm_getitemtextw = ($lvm_first + 115)
  1495. Global Const $lvm_getnextitem = ($lvm_first + 12)
  1496. Global Const $lvm_getnextitemindex = ($lvm_first + 211)
  1497. Global Const $lvm_getnumberofworkareas = ($lvm_first + 73)
  1498. Global Const $lvm_getorigin = ($lvm_first + 41)
  1499. Global Const $lvm_getoutlinecolor = ($lvm_first + 176)
  1500. Global Const $lvm_getselectedcolumn = ($lvm_first + 174)
  1501. Global Const $lvm_getselectedcount = ($lvm_first + 50)
  1502. Global Const $lvm_getselectionmark = ($lvm_first + 66)
  1503. Global Const $lvm_getstringwidtha = ($lvm_first + 17)
  1504. Global Const $lvm_getstringwidthw = ($lvm_first + 87)
  1505. Global Const $lvm_getsubitemrect = ($lvm_first + 56)
  1506. Global Const $lvm_gettextbkcolor = ($lvm_first + 37)
  1507. Global Const $lvm_gettextcolor = ($lvm_first + 35)
  1508. Global Const $lvm_gettileinfo = ($lvm_first + 165)
  1509. Global Const $lvm_gettileviewinfo = ($lvm_first + 163)
  1510. Global Const $lvm_gettooltips = ($lvm_first + 78)
  1511. Global Const $lvm_gettopindex = ($lvm_first + 39)
  1512. Global Const $lvm_getunicodeformat = 8192 + 6
  1513. Global Const $lvm_getview = ($lvm_first + 143)
  1514. Global Const $lvm_getviewrect = ($lvm_first + 34)
  1515. Global Const $lvm_getworkareas = ($lvm_first + 70)
  1516. Global Const $lvm_hasgroup = ($lvm_first + 161)
  1517. Global Const $lvm_hittest = ($lvm_first + 18)
  1518. Global Const $lvm_insertcolumna = ($lvm_first + 27)
  1519. Global Const $lvm_insertcolumnw = ($lvm_first + 97)
  1520. Global Const $lvm_insertgroup = ($lvm_first + 145)
  1521. Global Const $lvm_insertgroupsorted = ($lvm_first + 159)
  1522. Global Const $lvm_insertitema = ($lvm_first + 7)
  1523. Global Const $lvm_insertitemw = ($lvm_first + 77)
  1524. Global Const $lvm_insertmarkhittest = ($lvm_first + 168)
  1525. Global Const $lvm_isgroupviewenabled = ($lvm_first + 175)
  1526. Global Const $lvm_isitemvisible = ($lvm_first + 182)
  1527. Global Const $lvm_mapidtoindex = ($lvm_first + 181)
  1528. Global Const $lvm_mapindextoid = ($lvm_first + 180)
  1529. Global Const $lvm_movegroup = ($lvm_first + 151)
  1530. Global Const $lvm_redrawitems = ($lvm_first + 21)
  1531. Global Const $lvm_removeallgroups = ($lvm_first + 160)
  1532. Global Const $lvm_removegroup = ($lvm_first + 150)
  1533. Global Const $lvm_scroll = ($lvm_first + 20)
  1534. Global Const $lvm_setbkcolor = ($lvm_first + 1)
  1535. Global Const $lvm_setbkimagea = ($lvm_first + 68)
  1536. Global Const $lvm_setbkimagew = ($lvm_first + 138)
  1537. Global Const $lvm_setcallbackmask = ($lvm_first + 11)
  1538. Global Const $lvm_setcolumna = ($lvm_first + 26)
  1539. Global Const $lvm_setcolumnw = ($lvm_first + 96)
  1540. Global Const $lvm_setcolumnorderarray = ($lvm_first + 58)
  1541. Global Const $lvm_setcolumnwidth = ($lvm_first + 30)
  1542. Global Const $lvm_setextendedlistviewstyle = ($lvm_first + 54)
  1543. Global Const $lvm_setgroupinfo = ($lvm_first + 147)
  1544. Global Const $lvm_setgroupmetrics = ($lvm_first + 155)
  1545. Global Const $lvm_sethotcursor = ($lvm_first + 62)
  1546. Global Const $lvm_sethotitem = ($lvm_first + 60)
  1547. Global Const $lvm_sethovertime = ($lvm_first + 71)
  1548. Global Const $lvm_seticonspacing = ($lvm_first + 53)
  1549. Global Const $lvm_setimagelist = ($lvm_first + 3)
  1550. Global Const $lvm_setinfotip = ($lvm_first + 173)
  1551. Global Const $lvm_setinsertmark = ($lvm_first + 166)
  1552. Global Const $lvm_setinsertmarkcolor = ($lvm_first + 170)
  1553. Global Const $lvm_setitema = ($lvm_first + 6)
  1554. Global Const $lvm_setitemw = ($lvm_first + 76)
  1555. Global Const $lvm_setitemcount = ($lvm_first + 47)
  1556. Global Const $lvm_setitemindexstate = ($lvm_first + 210)
  1557. Global Const $lvm_setitemposition = ($lvm_first + 15)
  1558. Global Const $lvm_setitemposition32 = ($lvm_first + 49)
  1559. Global Const $lvm_setitemstate = ($lvm_first + 43)
  1560. Global Const $lvm_setitemtexta = ($lvm_first + 46)
  1561. Global Const $lvm_setitemtextw = ($lvm_first + 116)
  1562. Global Const $lvm_setoutlinecolor = ($lvm_first + 177)
  1563. Global Const $lvm_setselectedcolumn = ($lvm_first + 140)
  1564. Global Const $lvm_setselectionmark = ($lvm_first + 67)
  1565. Global Const $lvm_settextbkcolor = ($lvm_first + 38)
  1566. Global Const $lvm_settextcolor = ($lvm_first + 36)
  1567. Global Const $lvm_settileinfo = ($lvm_first + 164)
  1568. Global Const $lvm_settileviewinfo = ($lvm_first + 162)
  1569. Global Const $lvm_settilewidth = ($lvm_first + 141)
  1570. Global Const $lvm_settooltips = ($lvm_first + 74)
  1571. Global Const $lvm_setunicodeformat = 8192 + 5
  1572. Global Const $lvm_setview = ($lvm_first + 142)
  1573. Global Const $lvm_setworkareas = ($lvm_first + 65)
  1574. Global Const $lvm_sortgroups = ($lvm_first + 158)
  1575. Global Const $lvm_sortitems = ($lvm_first + 48)
  1576. Global Const $lvm_sortitemsex = ($lvm_first + 81)
  1577. Global Const $lvm_subitemhittest = ($lvm_first + 57)
  1578. Global Const $lvm_update = ($lvm_first + 42)
  1579. Global Const $lvn_first = -100
  1580. Global Const $lvn_last = -199
  1581. Global Const $lvn_begindrag = ($lvn_first - 9)
  1582. Global Const $lvn_beginlabeledita = ($lvn_first - 5)
  1583. Global Const $lvn_beginlabeleditw = ($lvn_first - 75)
  1584. Global Const $lvn_beginrdrag = ($lvn_first - 11)
  1585. Global Const $lvn_beginscroll = ($lvn_first - 80)
  1586. Global Const $lvn_columnclick = ($lvn_first - 8)
  1587. Global Const $lvn_columndropdown = ($lvn_first - 64)
  1588. Global Const $lvn_columnoverflowclick = ($lvn_first - 66)
  1589. Global Const $lvn_deleteallitems = ($lvn_first - 4)
  1590. Global Const $lvn_deleteitem = ($lvn_first - 3)
  1591. Global Const $lvn_endlabeledita = ($lvn_first - 6)
  1592. Global Const $lvn_endlabeleditw = ($lvn_first - 76)
  1593. Global Const $lvn_endscroll = ($lvn_first - 81)
  1594. Global Const $lvn_getdispinfoa = ($lvn_first - 50)
  1595. Global Const $lvn_getdispinfow = ($lvn_first - 77)
  1596. Global Const $lvn_getdispinfo = $lvn_getdispinfoa
  1597. Global Const $lvn_getemptymarkup = ($lvn_first - 87)
  1598. Global Const $lvn_getinfotipa = ($lvn_first - 57)
  1599. Global Const $lvn_getinfotipw = ($lvn_first - 58)
  1600. Global Const $lvn_hottrack = ($lvn_first - 21)
  1601. Global Const $lvn_incrementalsearcha = ($lvn_first - 62)
  1602. Global Const $lvn_incrementalsearchw = ($lvn_first - 63)
  1603. Global Const $lvn_insertitem = ($lvn_first - 2)
  1604. Global Const $lvn_itemactivate = ($lvn_first - 14)
  1605. Global Const $lvn_itemchanged = ($lvn_first - 1)
  1606. Global Const $lvn_itemchanging = ($lvn_first + 0)
  1607. Global Const $lvn_keydown = ($lvn_first - 55)
  1608. Global Const $lvn_linkclick = ($lvn_first - 84)
  1609. Global Const $lvn_marqueebegin = ($lvn_first - 56)
  1610. Global Const $lvn_odcachehint = ($lvn_first - 13)
  1611. Global Const $lvn_odfinditema = ($lvn_first - 52)
  1612. Global Const $lvn_odfinditemw = ($lvn_first - 79)
  1613. Global Const $lvn_odfinditem = $lvn_odfinditema
  1614. Global Const $lvn_odstatechanged = ($lvn_first - 15)
  1615. Global Const $lvn_setdispinfoa = ($lvn_first - 51)
  1616. Global Const $lvn_setdispinfow = ($lvn_first - 78)
  1617. Global Const $lvni_above = 256
  1618. Global Const $lvni_below = 512
  1619. Global Const $lvni_toleft = 1024
  1620. Global Const $lvni_toright = 2048
  1621. Global Const $lvni_all = 0
  1622. Global Const $lvni_cut = 4
  1623. Global Const $lvni_drophilited = 8
  1624. Global Const $lvni_focused = 1
  1625. Global Const $lvni_selected = 2
  1626. Global Const $lvscw_autosize = -1
  1627. Global Const $lvscw_autosize_useheader = -2
  1628. Global Const $lvsicf_noinvalidateall = 1
  1629. Global Const $lvsicf_noscroll = 2
  1630. Global Const $lvsil_normal = 0
  1631. Global Const $lvsil_small = 1
  1632. Global Const $lvsil_state = 2
  1633. Global Const $pbs_marquee = 8
  1634. Global Const $pbs_smooth = 1
  1635. Global Const $pbs_smoothreverse = 16
  1636. Global Const $pbs_vertical = 4
  1637. Global Const $gui_ss_default_progress = 0
  1638. Global Const $__progressbarconstant_wm_user = 1024
  1639. Global Const $pbm_deltapos = $__progressbarconstant_wm_user + 3
  1640. Global Const $pbm_getbarcolor = 1039
  1641. Global Const $pbm_getbkcolor = 1038
  1642. Global Const $pbm_getpos = $__progressbarconstant_wm_user + 8
  1643. Global Const $pbm_getrange = $__progressbarconstant_wm_user + 7
  1644. Global Const $pbm_getstate = 1041
  1645. Global Const $pbm_getstep = 1037
  1646. Global Const $pbm_setbarcolor = $__progressbarconstant_wm_user + 9
  1647. Global Const $pbm_setbkcolor = 8192 + 1
  1648. Global Const $pbm_setmarquee = $__progressbarconstant_wm_user + 10
  1649. Global Const $pbm_setpos = $__progressbarconstant_wm_user + 2
  1650. Global Const $pbm_setrange = $__progressbarconstant_wm_user + 1
  1651. Global Const $pbm_setrange32 = $__progressbarconstant_wm_user + 6
  1652. Global Const $pbm_setstate = 1040
  1653. Global Const $pbm_setstep = $__progressbarconstant_wm_user + 4
  1654. Global Const $pbm_stepit = $__progressbarconstant_wm_user + 5
  1655. Global Const $__richeditconstant_wm_user = 1024
  1656. Global Const $em_autourldetect = $__richeditconstant_wm_user + 91
  1657. Global Const $em_canpaste = $__richeditconstant_wm_user + 50
  1658. Global Const $em_canredo = $__richeditconstant_wm_user + 85
  1659. Global Const $em_displayband = $__richeditconstant_wm_user + 51
  1660. Global Const $em_exgetsel = $__richeditconstant_wm_user + 52
  1661. Global Const $em_exlimittext = $__richeditconstant_wm_user + 53
  1662. Global Const $em_exlinefromchar = $__richeditconstant_wm_user + 54
  1663. Global Const $em_exsetsel = $__richeditconstant_wm_user + 55
  1664. Global Const $em_findtext = $__richeditconstant_wm_user + 56
  1665. Global Const $em_findtextex = $__richeditconstant_wm_user + 79
  1666. Global Const $em_findtextexw = $__richeditconstant_wm_user + 124
  1667. Global Const $em_findtextw = $__richeditconstant_wm_user + 123
  1668. Global Const $em_findwordbreak = $__richeditconstant_wm_user + 76
  1669. Global Const $em_formatrange = $__richeditconstant_wm_user + 57
  1670. Global Const $em_getautourldetect = $__richeditconstant_wm_user + 92
  1671. Global Const $em_getbidioptions = $__richeditconstant_wm_user + 201
  1672. Global Const $em_getcharformat = $__richeditconstant_wm_user + 58
  1673. Global Const $em_geteditstyle = $__richeditconstant_wm_user + 205
  1674. Global Const $em_geteventmask = $__richeditconstant_wm_user + 59
  1675. Global Const $em_getimecolor = $__richeditconstant_wm_user + 105
  1676. Global Const $em_getimecompmode = $__richeditconstant_wm_user + 122
  1677. Global Const $em_getimemodebias = $__richeditconstant_wm_user + 127
  1678. Global Const $em_getimeoptions = $__richeditconstant_wm_user + 107
  1679. Global Const $em_getlangoptions = $__richeditconstant_wm_user + 121
  1680. Global Const $em_getoptions = $__richeditconstant_wm_user + 78
  1681. Global Const $em_getparaformat = $__richeditconstant_wm_user + 61
  1682. Global Const $em_getpunctuation = $__richeditconstant_wm_user + 101
  1683. Global Const $em_getredoname = $__richeditconstant_wm_user + 87
  1684. Global Const $em_getscrollpos = $__richeditconstant_wm_user + 221
  1685. Global Const $em_getseltext = $__richeditconstant_wm_user + 62
  1686. Global Const $em_gettextex = $__richeditconstant_wm_user + 94
  1687. Global Const $em_gettextlengthex = $__richeditconstant_wm_user + 95
  1688. Global Const $em_gettextmode = $__richeditconstant_wm_user + 90
  1689. Global Const $em_gettextrange = $__richeditconstant_wm_user + 75
  1690. Global Const $em_gettypographyoptions = $__richeditconstant_wm_user + 203
  1691. Global Const $em_getundoname = $__richeditconstant_wm_user + 86
  1692. Global Const $em_getwordbreakprocex = $__richeditconstant_wm_user + 80
  1693. Global Const $em_getwordwrapmode = $__richeditconstant_wm_user + 103
  1694. Global Const $em_getzoom = $__richeditconstant_wm_user + 224
  1695. Global Const $em_hideselection = $__richeditconstant_wm_user + 63
  1696. Global Const $em_pastespecial = $__richeditconstant_wm_user + 64
  1697. Global Const $em_reconversion = $__richeditconstant_wm_user + 125
  1698. Global Const $em_redo = $__richeditconstant_wm_user + 84
  1699. Global Const $em_requestresize = $__richeditconstant_wm_user + 65
  1700. Global Const $em_selectiontype = $__richeditconstant_wm_user + 66
  1701. Global Const $em_setbidioptions = $__richeditconstant_wm_user + 200
  1702. Global Const $em_setbkgndcolor = $__richeditconstant_wm_user + 67
  1703. Global Const $em_setcharformat = $__richeditconstant_wm_user + 68
  1704. Global Const $em_seteditstyle = $__richeditconstant_wm_user + 204
  1705. Global Const $em_seteventmask = $__richeditconstant_wm_user + 69
  1706. Global Const $em_setfontsize = $__richeditconstant_wm_user + 223
  1707. Global Const $em_setimecolor = $__richeditconstant_wm_user + 104
  1708. Global Const $em_setimemodebias = $__richeditconstant_wm_user + 126
  1709. Global Const $em_setimeoptions = $__richeditconstant_wm_user + 106
  1710. Global Const $em_setlangoptions = $__richeditconstant_wm_user + 120
  1711. Global Const $em_setolecallback = $__richeditconstant_wm_user + 70
  1712. Global Const $em_setoptions = $__richeditconstant_wm_user + 77
  1713. Global Const $em_setpalette = $__richeditconstant_wm_user + 93
  1714. Global Const $em_setparaformat = $__richeditconstant_wm_user + 71
  1715. Global Const $em_setpunctuation = $__richeditconstant_wm_user + 100
  1716. Global Const $em_setscrollpos = $__richeditconstant_wm_user + 222
  1717. Global Const $em_settargetdevice = $__richeditconstant_wm_user + 72
  1718. Global Const $em_settextex = $__richeditconstant_wm_user + 97
  1719. Global Const $em_settextmode = $__richeditconstant_wm_user + 89
  1720. Global Const $em_settypographyoptions = $__richeditconstant_wm_user + 202
  1721. Global Const $em_setundolimit = $__richeditconstant_wm_user + 82
  1722. Global Const $em_setwordbreakprocex = $__richeditconstant_wm_user + 81
  1723. Global Const $em_setwordwrapmode = $__richeditconstant_wm_user + 102
  1724. Global Const $em_setzoom = $__richeditconstant_wm_user + 225
  1725. Global Const $em_showscrollbar = $__richeditconstant_wm_user + 96
  1726. Global Const $em_stopgrouptyping = $__richeditconstant_wm_user + 88
  1727. Global Const $em_streamin = $__richeditconstant_wm_user + 73
  1728. Global Const $em_streamout = $__richeditconstant_wm_user + 74
  1729. Global Const $en_alignltr = 1808
  1730. Global Const $en_alignrtl = 1809
  1731. Global Const $en_correcttext = 1797
  1732. Global Const $en_dragdropdone = 1804
  1733. Global Const $en_dropfiles = 1795
  1734. Global Const $en_imechange = 1799
  1735. Global Const $en_link = 1803
  1736. Global Const $en_msgfilter = 1792
  1737. Global Const $en_objectpositions = 1802
  1738. Global Const $en_oleopfailed = 1801
  1739. Global Const $en_protected = 1796
  1740. Global Const $en_requestresize = 1793
  1741. Global Const $en_saveclipboard = 1800
  1742. Global Const $en_selchange = 1794
  1743. Global Const $en_stopnoundo = 1798
  1744. Global Const $enm_change = 1
  1745. Global Const $enm_correcttext = 4194304
  1746. Global Const $enm_dragdropdone = 16
  1747. Global Const $enm_dropfiles = 1048576
  1748. Global Const $enm_imechange = 8388608
  1749. Global Const $enm_keyevents = 65536
  1750. Global Const $enm_link = 67108864
  1751. Global Const $enm_mouseevents = 131072
  1752. Global Const $enm_objectpositions = 33554432
  1753. Global Const $enm_protected = 2097152
  1754. Global Const $enm_requestresize = 262144
  1755. Global Const $enm_scroll = 4
  1756. Global Const $enm_scrollevents = 8
  1757. Global Const $enm_selchange = 524288
  1758. Global Const $enm_update = 2
  1759. Global Const $bom_defparadir = 1
  1760. Global Const $bom_plaintext = 2
  1761. Global Const $bom_neutraloverride = 4
  1762. Global Const $bom_contextreading = 8
  1763. Global Const $bom_contextalignment = 16
  1764. Global Const $bom_legacybidiclass = 64
  1765. Global Const $boe_rtldir = 1
  1766. Global Const $boe_plaintext = 2
  1767. Global Const $boe_neutraloverride = 4
  1768. Global Const $boe_contextreading = 8
  1769. Global Const $boe_contextalignment = 16
  1770. Global Const $boe_legacybidiclass = 64
  1771. Global Const $st_default = 0
  1772. Global Const $st_keepundo = 1
  1773. Global Const $st_selection = 2
  1774. Global Const $gt_default = 0
  1775. Global Const $gt_selection = 2
  1776. Global Const $gt_usecrlf = 1
  1777. Global Const $gtl_close = 4
  1778. Global Const $gtl_default = 0
  1779. Global Const $gtl_numbytes = 16
  1780. Global Const $gtl_numchars = 8
  1781. Global Const $gtl_precise = 2
  1782. Global Const $gtl_usecrlf = 1
  1783. Global Const $cfu_underlinenone = 0
  1784. Global Const $cfu_underline = 1
  1785. Global Const $cfu_underlineword = 2
  1786. Global Const $cfu_underlinedouble = 3
  1787. Global Const $cfu_underlinedotted = 4
  1788. Global Const $cp_acp = 0
  1789. Global Const $cp_unicode = 1200
  1790. Global Const $cfe_subscript = 65536
  1791. Global Const $cfe_superscript = 131072
  1792. Global Const $cfm_allcaps = 128
  1793. Global Const $cfm_animation = 262144
  1794. Global Const $cfm_backcolor = 67108864
  1795. Global Const $cfm_bold = 1
  1796. Global Const $cfm_charset = 134217728
  1797. Global Const $cfm_color = 1073741824
  1798. Global Const $cfm_disabled = 8192
  1799. Global Const $cfm_emboss = 2048
  1800. Global Const $cfm_face = 536870912
  1801. Global Const $cfm_hidden = 256
  1802. Global Const $cfm_imprint = 4096
  1803. Global Const $cfm_italic = 2
  1804. Global Const $cfm_kerning = 1048576
  1805. Global Const $cfm_lcid = 33554432
  1806. Global Const $cfm_link = 32
  1807. Global Const $cfm_offset = 268435456
  1808. Global Const $cfm_outline = 512
  1809. Global Const $cfm_protected = 16
  1810. Global Const $cfm_revauthor = 32768
  1811. Global Const $cfm_revised = 16384
  1812. Global Const $cfm_shadow = 1024
  1813. Global Const $cfm_size = -2147483648
  1814. Global Const $cfm_smallcaps = 64
  1815. Global Const $cfm_spacing = 2097152
  1816. Global Const $cfm_strikeout = 8
  1817. Global Const $cfm_style = 524288
  1818. Global Const $cfm_subscript = BitOR($cfe_subscript, $cfe_superscript)
  1819. Global Const $cfm_superscript = $cfm_subscript
  1820. Global Const $cfm_underline = 4
  1821. Global Const $cfm_underlinetype = 8388608
  1822. Global Const $cfm_weight = 4194304
  1823. Global Const $cfe_allcaps = $cfm_allcaps
  1824. Global Const $cfe_autobackcolor = $cfm_backcolor
  1825. Global Const $cfe_autocolor = $cfm_color
  1826. Global Const $cfe_bold = $cfm_bold
  1827. Global Const $cfe_disabled = $cfm_disabled
  1828. Global Const $cfe_emboss = $cfm_emboss
  1829. Global Const $cfe_hidden = $cfm_hidden
  1830. Global Const $cfe_imprint = $cfm_imprint
  1831. Global Const $cfe_italic = $cfm_italic
  1832. Global Const $cfe_link = $cfm_link
  1833. Global Const $cfe_outline = $cfm_outline
  1834. Global Const $cfe_protected = $cfm_protected
  1835. Global Const $cfe_revised = $cfm_revised
  1836. Global Const $cfe_shadow = $cfm_shadow
  1837. Global Const $cfe_smallcaps = $cfm_smallcaps
  1838. Global Const $cfe_strikeout = $cfm_strikeout
  1839. Global Const $cfe_underline = $cfm_underline
  1840. Global Const $fr_matchalefhamza = -2147483648
  1841. Global Const $fr_matchdiac = 536870912
  1842. Global Const $fr_matchkashida = 1073741824
  1843. Global Const $scf_default = 0
  1844. Global Const $scf_selection = 1
  1845. Global Const $scf_word = 2
  1846. Global Const $scf_all = 4
  1847. Global Const $scf_useuirules = 8
  1848. Global Const $scf_associatefont = 16
  1849. Global Const $scf_nokbupdate = 32
  1850. Global Const $lf_facesize = 32
  1851. Global Const $max_tab_stops = 32
  1852. Global Const $pfa_left = 1
  1853. Global Const $pfa_right = 2
  1854. Global Const $pfa_center = 3
  1855. Global Const $pfa_justify = 4
  1856. Global Const $pfa_full_interword = 4
  1857. Global Const $pfe_table = 16384
  1858. Global Const $pfm_numbering = 32
  1859. Global Const $pfm_alignment = 8
  1860. Global Const $pfm_spacebefore = 64
  1861. Global Const $pfm_numberingstyle = 8192
  1862. Global Const $pfm_numberingstart = 32768
  1863. Global Const $pfm_border = 2048
  1864. Global Const $pfm_rightindent = 2
  1865. Global Const $pfm_startindent = 1
  1866. Global Const $pfm_offset = 4
  1867. Global Const $pfm_linespacing = 256
  1868. Global Const $pfm_spaceafter = 128
  1869. Global Const $pfm_numberingtab = 16384
  1870. Global Const $pfm_table = 1073741824
  1871. Global Const $pfm_tabstops = 16
  1872. Global Const $pfn_bullet = 1
  1873. Global Const $pfm_rtlpara = 65536
  1874. Global Const $pfm_keep = 131072
  1875. Global Const $pfm_keepnext = 262144
  1876. Global Const $pfm_pagebreakbefore = 524288
  1877. Global Const $pfm_nolinenumber = 1048576
  1878. Global Const $pfm_nowidowcontrol = 2097152
  1879. Global Const $pfm_donothyphen = 4194304
  1880. Global Const $pfm_sidebyside = 8388608
  1881. Global Const $pfe_rtlpara = 1
  1882. Global Const $pfe_keep = 2
  1883. Global Const $pfe_keepnext = 4
  1884. Global Const $pfe_pagebreakbefore = 8
  1885. Global Const $pfe_nolinenumber = 16
  1886. Global Const $pfe_nowidowcontrol = 32
  1887. Global Const $pfe_donothyphen = 64
  1888. Global Const $pfe_sidebyside = 128
  1889. Global Const $pfm_shading = 4096
  1890. Global Const $wb_classify = 3
  1891. Global Const $wb_isdelimiter = 2
  1892. Global Const $wb_left = 0
  1893. Global Const $wb_leftbreak = 6
  1894. Global Const $wb_movewordleft = 4
  1895. Global Const $wb_movewordnext = 5
  1896. Global Const $wb_movewordprev = 4
  1897. Global Const $wb_movewordright = 5
  1898. Global Const $wb_nextbreak = 7
  1899. Global Const $wb_prevbreak = 6
  1900. Global Const $wb_right = 1
  1901. Global Const $wb_rightbreak = 7
  1902. Global Const $wbf_iswhite = 16
  1903. Global Const $wbf_breakline = 32
  1904. Global Const $wbf_breakafter = 64
  1905. Global Const $sf_text = 1
  1906. Global Const $sf_rtf = 2
  1907. Global Const $sf_rtfnoobjs = 3
  1908. Global Const $sf_textized = 4
  1909. Global Const $sf_unicode = 16
  1910. Global Const $sf_usecodepage = 32
  1911. Global Const $sff_plainrtf = 16384
  1912. Global Const $sff_selection = 32768
  1913. Global Const $tbcd_channel = 3
  1914. Global Const $tbcd_thumb = 2
  1915. Global Const $tbcd_tics = 1
  1916. Global Const $__sliderconstant_wm_user = 1024
  1917. Global Const $tbm_clearsel = $__sliderconstant_wm_user + 19
  1918. Global Const $tbm_cleartics = $__sliderconstant_wm_user + 9
  1919. Global Const $tbm_getbuddy = $__sliderconstant_wm_user + 33
  1920. Global Const $tbm_getchannelrect = $__sliderconstant_wm_user + 26
  1921. Global Const $tbm_getlinesize = $__sliderconstant_wm_user + 24
  1922. Global Const $tbm_getnumtics = $__sliderconstant_wm_user + 16
  1923. Global Const $tbm_getpagesize = $__sliderconstant_wm_user + 22
  1924. Global Const $tbm_getpos = $__sliderconstant_wm_user
  1925. Global Const $tbm_getptics = $__sliderconstant_wm_user + 14
  1926. Global Const $tbm_getselend = $__sliderconstant_wm_user + 18
  1927. Global Const $tbm_getselstart = $__sliderconstant_wm_user + 17
  1928. Global Const $tbm_getrangemax = $__sliderconstant_wm_user + 2
  1929. Global Const $tbm_getrangemin = $__sliderconstant_wm_user + 1
  1930. Global Const $tbm_getthumblength = $__sliderconstant_wm_user + 28
  1931. Global Const $tbm_getthumbrect = $__sliderconstant_wm_user + 25
  1932. Global Const $tbm_gettic = $__sliderconstant_wm_user + 3
  1933. Global Const $tbm_getticpos = $__sliderconstant_wm_user + 15
  1934. Global Const $tbm_gettooltips = $__sliderconstant_wm_user + 30
  1935. Global Const $tbm_getunicodeformat = 8192 + 6
  1936. Global Const $tbm_setbuddy = $__sliderconstant_wm_user + 32
  1937. Global Const $tbm_setlinesize = $__sliderconstant_wm_user + 23
  1938. Global Const $tbm_setpagesize = $__sliderconstant_wm_user + 21
  1939. Global Const $tbm_setpos = $__sliderconstant_wm_user + 5
  1940. Global Const $tbm_setrange = $__sliderconstant_wm_user + 6
  1941. Global Const $tbm_setrangemax = $__sliderconstant_wm_user + 8
  1942. Global Const $tbm_setrangemin = $__sliderconstant_wm_user + 7
  1943. Global Const $tbm_setsel = $__sliderconstant_wm_user + 10
  1944. Global Const $tbm_setselend = $__sliderconstant_wm_user + 12
  1945. Global Const $tbm_setselstart = $__sliderconstant_wm_user + 11
  1946. Global Const $tbm_setthumblength = $__sliderconstant_wm_user + 27
  1947. Global Const $tbm_settic = $__sliderconstant_wm_user + 4
  1948. Global Const $tbm_setticfreq = $__sliderconstant_wm_user + 20
  1949. Global Const $tbm_settipside = $__sliderconstant_wm_user + 31
  1950. Global Const $tbm_settooltips = $__sliderconstant_wm_user + 29
  1951. Global Const $tbm_setunicodeformat = 8192 + 5
  1952. Global Const $tbts_bottom = 2
  1953. Global Const $tbts_left = 1
  1954. Global Const $tbts_right = 3
  1955. Global Const $tbts_top = 0
  1956. Global Const $tbs_autoticks = 1
  1957. Global Const $tbs_both = 8
  1958. Global Const $tbs_bottom = 0
  1959. Global Const $tbs_downisleft = 1024
  1960. Global Const $tbs_enableselrange = 32
  1961. Global Const $tbs_fixedlength = 64
  1962. Global Const $tbs_horz = 0
  1963. Global Const $tbs_left = 4
  1964. Global Const $tbs_nothumb = 128
  1965. Global Const $tbs_noticks = 16
  1966. Global Const $tbs_reversed = 512
  1967. Global Const $tbs_right = 0
  1968. Global Const $tbs_top = 4
  1969. Global Const $tbs_tooltips = 256
  1970. Global Const $tbs_vert = 2
  1971. Global Const $gui_ss_default_slider = $tbs_autoticks
  1972. Global Const $ss_left = 0
  1973. Global Const $ss_center = 1
  1974. Global Const $ss_right = 2
  1975. Global Const $ss_icon = 3
  1976. Global Const $ss_blackrect = 4
  1977. Global Const $ss_grayrect = 5
  1978. Global Const $ss_whiterect = 6
  1979. Global Const $ss_blackframe = 7
  1980. Global Const $ss_grayframe = 8
  1981. Global Const $ss_whiteframe = 9
  1982. Global Const $ss_simple = 11
  1983. Global Const $ss_leftnowordwrap = 12
  1984. Global Const $ss_bitmap = 14
  1985. Global Const $ss_etchedhorz = 16
  1986. Global Const $ss_etchedvert = 17
  1987. Global Const $ss_etchedframe = 18
  1988. Global Const $ss_noprefix = 128
  1989. Global Const $ss_notify = 256
  1990. Global Const $ss_centerimage = 512
  1991. Global Const $ss_rightjust = 1024
  1992. Global Const $ss_sunken = 4096
  1993. Global Const $gui_ss_default_label = 0
  1994. Global Const $gui_ss_default_graphic = 0
  1995. Global Const $gui_ss_default_icon = $ss_notify
  1996. Global Const $gui_ss_default_pic = $ss_notify
  1997. Global Const $tcs_ex_flatseparators = 1
  1998. Global Const $tcs_ex_registerdrop = 2
  1999. Global Const $tcht_nowhere = 1
  2000. Global Const $tcht_onitemicon = 2
  2001. Global Const $tcht_onitemlabel = 4
  2002. Global Const $tcht_onitem = 6
  2003. Global Const $tcif_text = 1
  2004. Global Const $tcif_image = 2
  2005. Global Const $tcif_rtlreading = 4
  2006. Global Const $tcif_param = 8
  2007. Global Const $tcif_state = 16
  2008. Global Const $tcif_alldata = 27
  2009. Global Const $tcis_buttonpressed = 1
  2010. Global Const $tcis_highlighted = 2
  2011. Global Const $tc_err = -1
  2012. Global Const $tcs_bottom = 2
  2013. Global Const $tcs_buttons = 256
  2014. Global Const $tcs_fixedwidth = 1024
  2015. Global Const $tcs_flatbuttons = 8
  2016. Global Const $tcs_focusnever = 32768
  2017. Global Const $tcs_focusonbuttondown = 4096
  2018. Global Const $tcs_forceiconleft = 16
  2019. Global Const $tcs_forcelabelleft = 32
  2020. Global Const $tcs_hottrack = 64
  2021. Global Const $tcs_multiline = 512
  2022. Global Const $tcs_multiselect = 4
  2023. Global Const $tcs_ownerdrawfixed = 8192
  2024. Global Const $tcs_raggedright = 2048
  2025. Global Const $tcs_right = 2
  2026. Global Const $tcs_rightjustify = 0
  2027. Global Const $tcs_scrollopposite = 1
  2028. Global Const $tcs_singleline = 0
  2029. Global Const $tcs_tabs = 0
  2030. Global Const $tcs_tooltips = 16384
  2031. Global Const $tcs_vertical = 128
  2032. Global Const $gui_ss_default_tab = 0
  2033. Global Const $tcm_first = 4864
  2034. Global Const $tccm_first = 8192
  2035. Global Const $tcm_adjustrect = ($tcm_first + 40)
  2036. Global Const $tcm_deleteallitems = ($tcm_first + 9)
  2037. Global Const $tcm_deleteitem = ($tcm_first + 8)
  2038. Global Const $tcm_deselectall = ($tcm_first + 50)
  2039. Global Const $tcm_getcurfocus = ($tcm_first + 47)
  2040. Global Const $tcm_getcursel = ($tcm_first + 11)
  2041. Global Const $tcm_getextendedstyle = ($tcm_first + 53)
  2042. Global Const $tcm_getimagelist = ($tcm_first + 2)
  2043. Global Const $tcm_getitema = ($tcm_first + 5)
  2044. Global Const $tcm_getitemw = ($tcm_first + 60)
  2045. Global Const $tcm_getitemcount = ($tcm_first + 4)
  2046. Global Const $tcm_getitemrect = ($tcm_first + 10)
  2047. Global Const $tcm_getrowcount = ($tcm_first + 44)
  2048. Global Const $tcm_gettooltips = ($tcm_first + 45)
  2049. Global Const $tccm_getunicodeformat = ($tccm_first + 6)
  2050. Global Const $tcm_getunicodeformat = $tccm_getunicodeformat
  2051. Global Const $tcm_highlightitem = ($tcm_first + 51)
  2052. Global Const $tcm_hittest = ($tcm_first + 13)
  2053. Global Const $tcm_insertitema = ($tcm_first + 7)
  2054. Global Const $tcm_insertitemw = ($tcm_first + 62)
  2055. Global Const $tcm_removeimage = ($tcm_first + 42)
  2056. Global Const $tcm_setitema = ($tcm_first + 6)
  2057. Global Const $tcm_setitemw = ($tcm_first + 61)
  2058. Global Const $tcm_setitemextra = ($tcm_first + 14)
  2059. Global Const $tcm_setitemsize = $tcm_first + 41
  2060. Global Const $tcm_setcurfocus = ($tcm_first + 48)
  2061. Global Const $tcm_setcursel = ($tcm_first + 12)
  2062. Global Const $tcm_setextendedstyle = ($tcm_first + 52)
  2063. Global Const $tcm_setimagelist = $tcm_first + 3
  2064. Global Const $tcm_setmintabwidth = ($tcm_first + 49)
  2065. Global Const $tcm_setpadding = ($tcm_first + 43)
  2066. Global Const $tcm_settooltips = ($tcm_first + 46)
  2067. Global Const $tccm_setunicodeformat = ($tccm_first + 5)
  2068. Global Const $tcm_setunicodeformat = $tccm_setunicodeformat
  2069. Global Const $tcn_first = -550
  2070. Global Const $tcn_focuschange = ($tcn_first - 4)
  2071. Global Const $tcn_getobject = ($tcn_first - 3)
  2072. Global Const $tcn_keydown = ($tcn_first + 0)
  2073. Global Const $tcn_selchange = ($tcn_first - 1)
  2074. Global Const $tcn_selchanging = ($tcn_first - 2)
  2075. Global Const $tvs_hasbuttons = 1
  2076. Global Const $tvs_haslines = 2
  2077. Global Const $tvs_linesatroot = 4
  2078. Global Const $tvs_editlabels = 8
  2079. Global Const $tvs_disabledragdrop = 16
  2080. Global Const $tvs_showselalways = 32
  2081. Global Const $tvs_rtlreading = 64
  2082. Global Const $tvs_notooltips = 128
  2083. Global Const $tvs_checkboxes = 256
  2084. Global Const $tvs_trackselect = 512
  2085. Global Const $tvs_singleexpand = 1024
  2086. Global Const $tvs_infotip = 2048
  2087. Global Const $tvs_fullrowselect = 4096
  2088. Global Const $tvs_noscroll = 8192
  2089. Global Const $tvs_nonevenheight = 16384
  2090. Global Const $tvs_nohscroll = 32768
  2091. Global Const $tvs_default = 55
  2092. Global Const $gui_ss_default_treeview = BitOR($tvs_hasbuttons, $tvs_haslines, $tvs_linesatroot, $tvs_disabledragdrop, $tvs_showselalways)
  2093. Global Const $tve_collapse = 1
  2094. Global Const $tve_expand = 2
  2095. Global Const $tve_toggle = 3
  2096. Global Const $tve_expandpartial = 16384
  2097. Global Const $tve_collapsereset = 32768
  2098. Global Const $tvgn_root = 0
  2099. Global Const $tvgn_next = 1
  2100. Global Const $tvgn_previous = 2
  2101. Global Const $tvgn_parent = 3
  2102. Global Const $tvgn_child = 4
  2103. Global Const $tvgn_firstvisible = 5
  2104. Global Const $tvgn_nextvisible = 6
  2105. Global Const $tvgn_previousvisible = 7
  2106. Global Const $tvgn_drophilite = 8
  2107. Global Const $tvgn_caret = 9
  2108. Global Const $tvgn_lastvisible = 10
  2109. Global Const $tvht_nowhere = 1
  2110. Global Const $tvht_onitemicon = 2
  2111. Global Const $tvht_onitemlabel = 4
  2112. Global Const $tvht_onitemindent = 8
  2113. Global Const $tvht_onitembutton = 16
  2114. Global Const $tvht_onitemright = 32
  2115. Global Const $tvht_onitemstateicon = 64
  2116. Global Const $tvht_onitem = 70
  2117. Global Const $tvht_above = 256
  2118. Global Const $tvht_below = 512
  2119. Global Const $tvht_toright = 1024
  2120. Global Const $tvht_toleft = 2048
  2121. Global Const $tvi_root = -65536
  2122. Global Const $tvi_first = -65535
  2123. Global Const $tvi_last = -65534
  2124. Global Const $tvi_sort = -65533
  2125. Global Const $tvif_text = 1
  2126. Global Const $tvif_image = 2
  2127. Global Const $tvif_param = 4
  2128. Global Const $tvif_state = 8
  2129. Global Const $tvif_handle = 16
  2130. Global Const $tvif_selectedimage = 32
  2131. Global Const $tvif_children = 64
  2132. Global Const $tvif_integral = 128
  2133. Global Const $tvif_expandedimage = 256
  2134. Global Const $tvif_stateex = 512
  2135. Global Const $tvif_di_setitem = 4096
  2136. Global Const $tvsil_normal = 0
  2137. Global Const $tvsil_state = 2
  2138. Global Const $tvc_bykeyboard = 2
  2139. Global Const $tvc_bymouse = 1
  2140. Global Const $tvc_unknown = 0
  2141. Global Const $tvis_focused = 1
  2142. Global Const $tvis_selected = 2
  2143. Global Const $tvis_cut = 4
  2144. Global Const $tvis_drophilited = 8
  2145. Global Const $tvis_bold = 16
  2146. Global Const $tvis_expanded = 32
  2147. Global Const $tvis_expandedonce = 64
  2148. Global Const $tvis_expandpartial = 128
  2149. Global Const $tvis_overlaymask = 3840
  2150. Global Const $tvis_stateimagemask = 61440
  2151. Global Const $tvis_usermask = 61440
  2152. Global Const $tvis_unchecked = 4096
  2153. Global Const $tvis_checked = 8192
  2154. Global Const $tvna_add = 1
  2155. Global Const $tvna_addfirst = 2
  2156. Global Const $tvna_addchild = 3
  2157. Global Const $tvna_addchildfirst = 4
  2158. Global Const $tvna_insert = 5
  2159. Global Const $tvta_addfirst = 1
  2160. Global Const $tvta_add = 2
  2161. Global Const $tvta_insert = 3
  2162. Global Const $tv_first = 4352
  2163. Global Const $tvm_insertitema = $tv_first + 0
  2164. Global Const $tvm_deleteitem = $tv_first + 1
  2165. Global Const $tvm_expand = $tv_first + 2
  2166. Global Const $tvm_getitemrect = $tv_first + 4
  2167. Global Const $tvm_getcount = $tv_first + 5
  2168. Global Const $tvm_getindent = $tv_first + 6
  2169. Global Const $tvm_setindent = $tv_first + 7
  2170. Global Const $tvm_getimagelist = $tv_first + 8
  2171. Global Const $tvm_setimagelist = $tv_first + 9
  2172. Global Const $tvm_getnextitem = $tv_first + 10
  2173. Global Const $tvm_selectitem = $tv_first + 11
  2174. Global Const $tvm_getitema = $tv_first + 12
  2175. Global Const $tvm_setitema = $tv_first + 13
  2176. Global Const $tvm_editlabela = $tv_first + 14
  2177. Global Const $tvm_geteditcontrol = $tv_first + 15
  2178. Global Const $tvm_getvisiblecount = $tv_first + 16
  2179. Global Const $tvm_hittest = $tv_first + 17
  2180. Global Const $tvm_createdragimage = $tv_first + 18
  2181. Global Const $tvm_sortchildren = $tv_first + 19
  2182. Global Const $tvm_ensurevisible = $tv_first + 20
  2183. Global Const $tvm_sortchildrencb = $tv_first + 21
  2184. Global Const $tvm_endeditlabelnow = $tv_first + 22
  2185. Global Const $tvm_getisearchstringa = $tv_first + 23
  2186. Global Const $tvm_settooltips = $tv_first + 24
  2187. Global Const $tvm_gettooltips = $tv_first + 25
  2188. Global Const $tvm_setinsertmark = $tv_first + 26
  2189. Global Const $tvm_setitemheight = $tv_first + 27
  2190. Global Const $tvm_getitemheight = $tv_first + 28
  2191. Global Const $tvm_setbkcolor = $tv_first + 29
  2192. Global Const $tvm_settextcolor = $tv_first + 30
  2193. Global Const $tvm_getbkcolor = $tv_first + 31
  2194. Global Const $tvm_gettextcolor = $tv_first + 32
  2195. Global Const $tvm_setscrolltime = $tv_first + 33
  2196. Global Const $tvm_getscrolltime = $tv_first + 34
  2197. Global Const $tvm_setinsertmarkcolor = $tv_first + 37
  2198. Global Const $tvm_getinsertmarkcolor = $tv_first + 38
  2199. Global Const $tvm_getitemstate = $tv_first + 39
  2200. Global Const $tvm_setlinecolor = $tv_first + 40
  2201. Global Const $tvm_getlinecolor = $tv_first + 41
  2202. Global Const $tvm_mapaccidtohtreeitem = $tv_first + 42
  2203. Global Const $tvm_maphtreeitemtoaccid = $tv_first + 43
  2204. Global Const $tvm_insertitemw = $tv_first + 50
  2205. Global Const $tvm_getitemw = $tv_first + 62
  2206. Global Const $tvm_setitemw = $tv_first + 63
  2207. Global Const $tvm_getisearchstringw = $tv_first + 64
  2208. Global Const $tvm_editlabelw = $tv_first + 65
  2209. Global Const $tvm_getunicodeformat = 8192 + 6
  2210. Global Const $tvm_setunicodeformat = 8192 + 5
  2211. Global Const $tvn_first = -400
  2212. Global Const $tvn_selchanginga = $tvn_first - 1
  2213. Global Const $tvn_selchangeda = $tvn_first - 2
  2214. Global Const $tvn_getdispinfoa = $tvn_first - 3
  2215. Global Const $tvn_setdispinfoa = $tvn_first - 4
  2216. Global Const $tvn_itemexpandinga = $tvn_first - 5
  2217. Global Const $tvn_itemexpandeda = $tvn_first - 6
  2218. Global Const $tvn_begindraga = $tvn_first - 7
  2219. Global Const $tvn_beginrdraga = $tvn_first - 8
  2220. Global Const $tvn_deleteitema = $tvn_first - 9
  2221. Global Const $tvn_beginlabeledita = $tvn_first - 10
  2222. Global Const $tvn_endlabeledita = $tvn_first - 11
  2223. Global Const $tvn_keydown = $tvn_first - 12
  2224. Global Const $tvn_getinfotipa = $tvn_first - 13
  2225. Global Const $tvn_getinfotipw = $tvn_first - 14
  2226. Global Const $tvn_singleexpand = $tvn_first - 15
  2227. Global Const $tvn_selchangingw = $tvn_first - 50
  2228. Global Const $tvn_selchangedw = $tvn_first - 51
  2229. Global Const $tvn_getdispinfow = $tvn_first - 52
  2230. Global Const $tvn_setdispinfow = $tvn_first - 53
  2231. Global Const $tvn_itemexpandingw = $tvn_first - 54
  2232. Global Const $tvn_itemexpandedw = $tvn_first - 55
  2233. Global Const $tvn_begindragw = $tvn_first - 56
  2234. Global Const $tvn_beginrdragw = $tvn_first - 57
  2235. Global Const $tvn_deleteitemw = $tvn_first - 58
  2236. Global Const $tvn_beginlabeleditw = $tvn_first - 59
  2237. Global Const $tvn_endlabeleditw = $tvn_first - 60
  2238. Global Const $uds_wrap = 1
  2239. Global Const $uds_setbuddyint = 2
  2240. Global Const $uds_alignright = 4
  2241. Global Const $uds_alignleft = 8
  2242. Global Const $uds_arrowkeys = 32
  2243. Global Const $uds_horz = 64
  2244. Global Const $uds_nothousands = 128
  2245. Global Const $gui_ss_default_updown = $uds_alignleft
  2246.  
  2247. Func _sendmessage($hwnd, $imsg, $wparam = 0, $lparam = 0, $ireturn = 0, $wparamtype = "wparam", $lparamtype = "lparam", $sreturntype = "lresult")
  2248.     Local $aresult = DllCall("user32.dll", $sreturntype, "SendMessageW", "hwnd", $hwnd, "uint", $imsg, $wparamtype, $wparam, $lparamtype, $lparam)
  2249.     If @error Then Return SetError(@error, @extended, "")
  2250.     If $ireturn >= 0 AND $ireturn <= 4 Then Return $aresult[$ireturn]
  2251.     Return $aresult
  2252. EndFunc
  2253.  
  2254. Func _sendmessagea($hwnd, $imsg, $wparam = 0, $lparam = 0, $ireturn = 0, $wparamtype = "wparam", $lparamtype = "lparam", $sreturntype = "lresult")
  2255.     Local $aresult = DllCall("user32.dll", $sreturntype, "SendMessageA", "hwnd", $hwnd, "uint", $imsg, $wparamtype, $wparam, $lparamtype, $lparam)
  2256.     If @error Then Return SetError(@error, @extended, "")
  2257.     If $ireturn >= 0 AND $ireturn <= 4 Then Return $aresult[$ireturn]
  2258.     Return $aresult
  2259. EndFunc
  2260.  
  2261. Global Const $hgdi_error = Ptr(-1)
  2262. Global Const $invalid_handle_value = Ptr(-1)
  2263. Global Const $clr_invalid = -1
  2264. Global Const $null_brush = 5
  2265. Global Const $null_pen = 8
  2266. Global Const $black_brush = 4
  2267. Global Const $dkgray_brush = 3
  2268. Global Const $dc_brush = 18
  2269. Global Const $gray_brush = 2
  2270. Global Const $hollow_brush = $null_brush
  2271. Global Const $ltgray_brush = 1
  2272. Global Const $white_brush = 0
  2273. Global Const $black_pen = 7
  2274. Global Const $dc_pen = 19
  2275. Global Const $white_pen = 6
  2276. Global Const $ansi_fixed_font = 11
  2277. Global Const $ansi_var_font = 12
  2278. Global Const $device_default_font = 14
  2279. Global Const $default_gui_font = 17
  2280. Global Const $oem_fixed_font = 10
  2281. Global Const $system_font = 13
  2282. Global Const $system_fixed_font = 16
  2283. Global Const $default_palette = 15
  2284. Global Const $mb_precomposed = 1
  2285. Global Const $mb_composite = 2
  2286. Global Const $mb_useglyphchars = 4
  2287. Global Const $ulw_alpha = 2
  2288. Global Const $ulw_colorkey = 1
  2289. Global Const $ulw_opaque = 4
  2290. Global Const $ulw_ex_noresize = 8
  2291. Global Const $wh_callwndproc = 4
  2292. Global Const $wh_callwndprocret = 12
  2293. Global Const $wh_cbt = 5
  2294. Global Const $wh_debug = 9
  2295. Global Const $wh_foregroundidle = 11
  2296. Global Const $wh_getmessage = 3
  2297. Global Const $wh_journalplayback = 1
  2298. Global Const $wh_journalrecord = 0
  2299. Global Const $wh_keyboard = 2
  2300. Global Const $wh_keyboard_ll = 13
  2301. Global Const $wh_mouse = 7
  2302. Global Const $wh_mouse_ll = 14
  2303. Global Const $wh_msgfilter = -1
  2304. Global Const $wh_shell = 10
  2305. Global Const $wh_sysmsgfilter = 6
  2306. Global Const $wpf_asyncwindowplacement = 4
  2307. Global Const $wpf_restoretomaximized = 2
  2308. Global Const $wpf_setminposition = 1
  2309. Global Const $kf_extended = 256
  2310. Global Const $kf_altdown = 8192
  2311. Global Const $kf_up = 32768
  2312. Global Const $llkhf_extended = BitShift($kf_extended, 8)
  2313. Global Const $llkhf_injected = 16
  2314. Global Const $llkhf_altdown = BitShift($kf_altdown, 8)
  2315. Global Const $llkhf_up = BitShift($kf_up, 8)
  2316. Global Const $ofn_allowmultiselect = 512
  2317. Global Const $ofn_createprompt = 8192
  2318. Global Const $ofn_dontaddtorecent = 33554432
  2319. Global Const $ofn_enablehook = 32
  2320. Global Const $ofn_enableincludenotify = 4194304
  2321. Global Const $ofn_enablesizing = 8388608
  2322. Global Const $ofn_enabletemplate = 64
  2323. Global Const $ofn_enabletemplatehandle = 128
  2324. Global Const $ofn_explorer = 524288
  2325. Global Const $ofn_extensiondifferent = 1024
  2326. Global Const $ofn_filemustexist = 4096
  2327. Global Const $ofn_forceshowhidden = 268435456
  2328. Global Const $ofn_hidereadonly = 4
  2329. Global Const $ofn_longnames = 2097152
  2330. Global Const $ofn_nochangedir = 8
  2331. Global Const $ofn_nodereferencelinks = 1048576
  2332. Global Const $ofn_nolongnames = 262144
  2333. Global Const $ofn_nonetworkbutton = 131072
  2334. Global Const $ofn_noreadonlyreturn = 32768
  2335. Global Const $ofn_notestfilecreate = 65536
  2336. Global Const $ofn_novalidate = 256
  2337. Global Const $ofn_overwriteprompt = 2
  2338. Global Const $ofn_pathmustexist = 2048
  2339. Global Const $ofn_readonly = 1
  2340. Global Const $ofn_shareaware = 16384
  2341. Global Const $ofn_showhelp = 16
  2342. Global Const $ofn_ex_noplacesbar = 1
  2343. Global Const $tmpf_fixed_pitch = 1
  2344. Global Const $tmpf_vector = 2
  2345. Global Const $tmpf_truetype = 4
  2346. Global Const $tmpf_device = 8
  2347. Global Const $duplicate_close_source = 1
  2348. Global Const $duplicate_same_access = 2
  2349. Global Const $di_mask = 1
  2350. Global Const $di_image = 2
  2351. Global Const $di_normal = 3
  2352. Global Const $di_compat = 4
  2353. Global Const $di_defaultsize = 8
  2354. Global Const $di_nomirror = 16
  2355. Global Const $display_device_attached_to_desktop = 1
  2356. Global Const $display_device_multi_driver = 2
  2357. Global Const $display_device_primary_device = 4
  2358. Global Const $display_device_mirroring_driver = 8
  2359. Global Const $display_device_vga_compatible = 16
  2360. Global Const $display_device_removable = 32
  2361. Global Const $display_device_disconnect = 33554432
  2362. Global Const $display_device_remote = 67108864
  2363. Global Const $display_device_modespruned = 134217728
  2364. Global Const $flashw_caption = 1
  2365. Global Const $flashw_tray = 2
  2366. Global Const $flashw_timer = 4
  2367. Global Const $flashw_timernofg = 12
  2368. Global Const $format_message_allocate_buffer = 256
  2369. Global Const $format_message_ignore_inserts = 512
  2370. Global Const $format_message_from_string = 1024
  2371. Global Const $format_message_from_hmodule = 2048
  2372. Global Const $format_message_from_system = 4096
  2373. Global Const $format_message_argument_array = 8192
  2374. Global Const $gw_hwndfirst = 0
  2375. Global Const $gw_hwndlast = 1
  2376. Global Const $gw_hwndnext = 2
  2377. Global Const $gw_hwndprev = 3
  2378. Global Const $gw_owner = 4
  2379. Global Const $gw_child = 5
  2380. Global Const $gwl_wndproc = -4
  2381. Global Const $gwl_hinstance = -6
  2382. Global Const $gwl_hwndparent = -8
  2383. Global Const $gwl_id = -12
  2384. Global Const $gwl_style = -16
  2385. Global Const $gwl_exstyle = -20
  2386. Global Const $gwl_userdata = -21
  2387. Global Const $std_cut = 0
  2388. Global Const $std_copy = 1
  2389. Global Const $std_paste = 2
  2390. Global Const $std_undo = 3
  2391. Global Const $std_redow = 4
  2392. Global Const $std_delete = 5
  2393. Global Const $std_filenew = 6
  2394. Global Const $std_fileopen = 7
  2395. Global Const $std_filesave = 8
  2396. Global Const $std_printpre = 9
  2397. Global Const $std_properties = 10
  2398. Global Const $std_help = 11
  2399. Global Const $std_find = 12
  2400. Global Const $std_replace = 13
  2401. Global Const $std_print = 14
  2402. Global Const $image_bitmap = 0
  2403. Global Const $image_icon = 1
  2404. Global Const $image_cursor = 2
  2405. Global Const $image_enhmetafile = 3
  2406. Global Const $kb_sendspecial = 0
  2407. Global Const $kb_sendraw = 1
  2408. Global Const $kb_capsoff = 0
  2409. Global Const $kb_capson = 1
  2410. Global Const $dont_resolve_dll_references = 1
  2411. Global Const $load_library_as_datafile = 2
  2412. Global Const $load_with_altered_search_path = 8
  2413. Global Const $load_ignore_code_authz_level = 16
  2414. Global Const $load_library_as_datafile_exclusive = 64
  2415. Global Const $load_library_as_image_resource = 32
  2416. Global Const $load_library_search_application_dir = 512
  2417. Global Const $load_library_search_default_dirs = 4096
  2418. Global Const $load_library_search_dll_load_dir = 256
  2419. Global Const $load_library_search_system32 = 2048
  2420. Global Const $load_library_search_user_dirs = 1024
  2421. Global Const $s_ok = 0
  2422. Global Const $e_abort = -2147467260
  2423. Global Const $e_accessdenied = -2147024891
  2424. Global Const $e_fail = -2147467259
  2425. Global Const $e_handle = -2147024890
  2426. Global Const $e_invalidarg = -2147024809
  2427. Global Const $e_nointerface = -2147467262
  2428. Global Const $e_notimpl = -2147467263
  2429. Global Const $e_outofmemory = -2147024882
  2430. Global Const $e_pointer = -2147467261
  2431. Global Const $e_unexpected = -2147418113
  2432. Global Const $lr_defaultcolor = 0
  2433. Global Const $lr_monochrome = 1
  2434. Global Const $lr_color = 2
  2435. Global Const $lr_copyreturnorg = 4
  2436. Global Const $lr_copydeleteorg = 8
  2437. Global Const $lr_loadfromfile = 16
  2438. Global Const $lr_loadtransparent = 32
  2439. Global Const $lr_defaultsize = 64
  2440. Global Const $lr_vgacolor = 128
  2441. Global Const $lr_loadmap3dcolors = 4096
  2442. Global Const $lr_createdibsection = 8192
  2443. Global Const $lr_copyfromresource = 16384
  2444. Global Const $lr_shared = 32768
  2445. Global Const $obm_trtype = 32732
  2446. Global Const $obm_lfarrowi = 32734
  2447. Global Const $obm_rgarrowi = 32735
  2448. Global Const $obm_dnarrowi = 32736
  2449. Global Const $obm_uparrowi = 32737
  2450. Global Const $obm_combo = 32738
  2451. Global Const $obm_mnarrow = 32739
  2452. Global Const $obm_lfarrowd = 32740
  2453. Global Const $obm_rgarrowd = 32741
  2454. Global Const $obm_dnarrowd = 32742
  2455. Global Const $obm_uparrowd = 32743
  2456. Global Const $obm_restored = 32744
  2457. Global Const $obm_zoomd = 32745
  2458. Global Const $obm_reduced = 32746
  2459. Global Const $obm_restore = 32747
  2460. Global Const $obm_zoom = 32748
  2461. Global Const $obm_reduce = 32749
  2462. Global Const $obm_lfarrow = 32750
  2463. Global Const $obm_rgarrow = 32751
  2464. Global Const $obm_dnarrow = 32752
  2465. Global Const $obm_uparrow = 32753
  2466. Global Const $obm_close = 32754
  2467. Global Const $obm_old_restore = 32755
  2468. Global Const $obm_old_zoom = 32756
  2469. Global Const $obm_old_reduce = 32757
  2470. Global Const $obm_btncorners = 32758
  2471. Global Const $obm_checkboxes = 32759
  2472. Global Const $obm_check = 32760
  2473. Global Const $obm_btsize = 32761
  2474. Global Const $obm_old_lfarrow = 32762
  2475. Global Const $obm_old_rgarrow = 32763
  2476. Global Const $obm_old_dnarrow = 32764
  2477. Global Const $obm_old_uparrow = 32765
  2478. Global Const $obm_size = 32766
  2479. Global Const $obm_old_close = 32767
  2480. Global Const $oic_sample = 32512
  2481. Global Const $oic_hand = 32513
  2482. Global Const $oic_ques = 32514
  2483. Global Const $oic_bang = 32515
  2484. Global Const $oic_note = 32516
  2485. Global Const $oic_winlogo = 32517
  2486. Global Const $oic_warning = $oic_bang
  2487. Global Const $oic_error = $oic_hand
  2488. Global Const $oic_information = $oic_note
  2489. Global Const $tagpoint = "struct;long X;long Y;endstruct"
  2490. Global Const $tagrect = "struct;long Left;long Top;long Right;long Bottom;endstruct"
  2491. Global Const $tagsize = "struct;long X;long Y;endstruct"
  2492. Global Const $tagmargins = "int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight"
  2493. Global Const $tagfiletime = "struct;dword Lo;dword Hi;endstruct"
  2494. Global Const $tagsystemtime = "struct;word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds;endstruct"
  2495. Global Const $tagtime_zone_information = "struct;long Bias;wchar StdName[32];word StdDate[8];long StdBias;wchar DayName[32];word DayDate[8];long DayBias;endstruct"
  2496. Global Const $tagnmhdr = "struct;hwnd hWndFrom;uint_ptr IDFrom;INT Code;endstruct"
  2497. Global Const $tagcomboboxexitem = "uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;int SelectedImage;int OverlayImage;" & "int Indent;lparam Param"
  2498. Global Const $tagnmcbedragbegin = $tagnmhdr & ";int ItemID;wchar szText[260]"
  2499. Global Const $tagnmcbeendedit = $tagnmhdr & ";bool fChanged;int NewSelection;wchar szText[260];int Why"
  2500. Global Const $tagnmcomboboxex = $tagnmhdr & ";uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;" & "int SelectedImage;int OverlayImage;int Indent;lparam Param"
  2501. Global Const $tagdtprange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;" & "word MinSecond;word MinMSecond;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;" & "word MaxMinute;word MaxSecond;word MaxMSecond;bool MinValid;bool MaxValid"
  2502. Global Const $tagnmdatetimechange = $tagnmhdr & ";dword Flag;" & $tagsystemtime
  2503. Global Const $tagnmdatetimeformat = $tagnmhdr & ";ptr Format;" & $tagsystemtime & ";ptr pDisplay;wchar Display[64]"
  2504. Global Const $tagnmdatetimeformatquery = $tagnmhdr & ";ptr Format;struct;long SizeX;long SizeY;endstruct"
  2505. Global Const $tagnmdatetimekeydown = $tagnmhdr & ";int VirtKey;ptr Format;" & $tagsystemtime
  2506. Global Const $tagnmdatetimestring = $tagnmhdr & ";ptr UserString;" & $tagsystemtime & ";dword Flags"
  2507. Global Const $tageventlogrecord = "dword Length;dword Reserved;dword RecordNumber;dword TimeGenerated;dword TimeWritten;dword EventID;" & "word EventType;word NumStrings;word EventCategory;word ReservedFlags;dword ClosingRecordNumber;dword StringOffset;" & "dword UserSidLength;dword UserSidOffset;dword DataLength;dword DataOffset"
  2508. Global Const $taggdip_effectparams_blur = "float Radius; bool ExpandEdge"
  2509. Global Const $taggdip_effectparams_brightnesscontrast = "int BrightnessLevel; int ContrastLevel"
  2510. Global Const $taggdip_effectparams_colorbalance = "int CyanRed; int MagentaGreen; int YellowBlue"
  2511. Global Const $taggdip_effectparams_colorcurve = "int Adjustment; int Channel; int AdjustValue"
  2512. Global Const $taggdip_effectparams_colorlut = "byte LutB[256]; byte LutG[256]; byte LutR[256]; byte LutA[256]"
  2513. Global Const $taggdip_effectparams_huesaturationlightness = "int HueLevel; int SaturationLevel; int LightnessLevel"
  2514. Global Const $taggdip_effectparams_levels = "int Highlight; int Midtone; int Shadow"
  2515. Global Const $taggdip_effectparams_redeyecorrection = "uint NumberOfAreas; ptr Areas"
  2516. Global Const $taggdip_effectparams_sharpen = "float Radius; float Amount"
  2517. Global Const $taggdip_effectparams_tint = "int Hue; int Amount"
  2518. Global Const $taggdipbitmapdata = "uint Width;uint Height;int Stride;int Format;ptr Scan0;uint_ptr Reserved"
  2519. Global Const $taggdipcolormatrix = "float m[25]"
  2520. Global Const $taggdipencoderparam = "struct;byte GUID[16];ulong NumberOfValues;ulong Type;ptr Values;endstruct"
  2521. Global Const $taggdipencoderparams = "uint Count;" & $taggdipencoderparam
  2522. Global Const $taggdiprectf = "struct;float X;float Y;float Width;float Height;endstruct"
  2523. Global Const $taggdipstartupinput = "uint Version;ptr Callback;bool NoThread;bool NoCodecs"
  2524. Global Const $taggdipstartupoutput = "ptr HookProc;ptr UnhookProc"
  2525. Global Const $taggdipimagecodecinfo = "byte CLSID[16];byte FormatID[16];ptr CodecName;ptr DllName;ptr FormatDesc;ptr FileExt;" & "ptr MimeType;dword Flags;dword Version;dword SigCount;dword SigSize;ptr SigPattern;ptr SigMask"
  2526. Global Const $taggdippencoderparams = "uint Count;byte Params[1]"
  2527. Global Const $taghditem = "uint Mask;int XY;ptr Text;handle hBMP;int TextMax;int Fmt;lparam Param;int Image;int Order;uint Type;ptr pFilter;uint State"
  2528. Global Const $tagnmhddispinfo = $tagnmhdr & ";int Item;uint Mask;ptr Text;int TextMax;int Image;lparam lParam"
  2529. Global Const $tagnmhdfilterbtnclick = $tagnmhdr & ";int Item;" & $tagrect
  2530. Global Const $tagnmheader = $tagnmhdr & ";int Item;int Button;ptr pItem"
  2531. Global Const $taggetipaddress = "byte Field4;byte Field3;byte Field2;byte Field1"
  2532. Global Const $tagnmipaddress = $tagnmhdr & ";int Field;int Value"
  2533. Global Const $taglvfindinfo = "struct;uint Flags;ptr Text;lparam Param;" & $tagpoint & ";uint Direction;endstruct"
  2534. Global Const $taglvhittestinfo = $tagpoint & ";uint Flags;int Item;int SubItem;int iGroup"
  2535. Global Const $taglvitem = "struct;uint Mask;int Item;int SubItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;lparam Param;" & "int Indent;int GroupID;uint Columns;ptr pColumns;ptr piColFmt;int iGroup;endstruct"
  2536. Global Const $tagnmlistview = $tagnmhdr & ";int Item;int SubItem;uint NewState;uint OldState;uint Changed;" & "struct;long ActionX;long ActionY;endstruct;lparam Param"
  2537. Global Const $tagnmlvcustomdraw = "struct;" & $tagnmhdr & ";dword dwDrawStage;handle hdc;" & $tagrect & ";dword_ptr dwItemSpec;uint uItemState;lparam lItemlParam;endstruct" & ";dword clrText;dword clrTextBk;int iSubItem;dword dwItemType;dword clrFace;int iIconEffect;" & "int iIconPhase;int iPartId;int iStateId;struct;long TextLeft;long TextTop;long TextRight;long TextBottom;endstruct;uint uAlign"
  2538. Global Const $tagnmlvdispinfo = $tagnmhdr & ";" & $taglvitem
  2539. Global Const $tagnmlvfinditem = $tagnmhdr & ";int Start;" & $taglvfindinfo
  2540. Global Const $tagnmlvgetinfotip = $tagnmhdr & ";dword Flags;ptr Text;int TextMax;int Item;int SubItem;lparam lParam"
  2541. Global Const $tagnmitemactivate = $tagnmhdr & ";int Index;int SubItem;uint NewState;uint OldState;uint Changed;" & $tagpoint & ";lparam lParam;uint KeyFlags"
  2542. Global Const $tagnmlvkeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
  2543. Global Const $tagnmlvscroll = $tagnmhdr & ";int DX;int DY"
  2544. Global Const $tagmchittestinfo = "uint Size;" & $tagpoint & ";uint Hit;" & $tagsystemtime & ";" & $tagrect & ";int iOffset;int iRow;int iCol"
  2545. Global Const $tagmcmonthrange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds;short Span"
  2546. Global Const $tagmcrange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds;short MinSet;short MaxSet"
  2547. Global Const $tagmcselrange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds"
  2548. Global Const $tagnmdaystate = $tagnmhdr & ";" & $tagsystemtime & ";int DayState;ptr pDayState"
  2549. Global Const $tagnmselchange = $tagnmhdr & ";struct;word BegYear;word BegMonth;word BegDOW;word BegDay;word BegHour;word BegMinute;word BegSecond;word BegMSeconds;endstruct;" & "struct;word EndYear;word EndMonth;word EndDOW;word EndDay;word EndHour;word EndMinute;word EndSecond;word EndMSeconds;endstruct"
  2550. Global Const $tagnmobjectnotify = $tagnmhdr & ";int Item;ptr piid;ptr pObject;long Result;dword dwFlags"
  2551. Global Const $tagnmtckeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
  2552. Global Const $tagtvitem = "struct;uint Mask;handle hItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;int SelectedImage;" & "int Children;lparam Param;endstruct"
  2553. Global Const $tagtvitemex = "struct;" & $tagtvitem & ";int Integral;uint uStateEx;hwnd hwnd;int iExpandedImage;int iReserved;endstruct"
  2554. Global Const $tagnmtreeview = $tagnmhdr & ";uint Action;" & "struct;uint OldMask;handle OldhItem;uint OldState;uint OldStateMask;" & "ptr OldText;int OldTextMax;int OldImage;int OldSelectedImage;int OldChildren;lparam OldParam;endstruct;" & "struct;uint NewMask;handle NewhItem;uint NewState;uint NewStateMask;" & "ptr NewText;int NewTextMax;int NewImage;int NewSelectedImage;int NewChildren;lparam NewParam;endstruct;" & "struct;long PointX;long PointY;endstruct"
  2555. Global Const $tagnmtvcustomdraw = "struct;" & $tagnmhdr & ";dword DrawStage;handle HDC;" & $tagrect & ";dword_ptr ItemSpec;uint ItemState;lparam ItemParam;endstruct" & ";dword ClrText;dword ClrTextBk;int Level"
  2556. Global Const $tagnmtvdispinfo = $tagnmhdr & ";" & $tagtvitem
  2557. Global Const $tagnmtvgetinfotip = $tagnmhdr & ";ptr Text;int TextMax;handle hItem;lparam lParam"
  2558. Global Const $tagtvhittestinfo = $tagpoint & ";uint Flags;handle Item"
  2559. Global Const $tagnmtvkeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
  2560. Global Const $tagnmmouse = $tagnmhdr & ";dword_ptr ItemSpec;dword_ptr ItemData;" & $tagpoint & ";lparam HitInfo"
  2561. Global Const $tagtoken_privileges = "dword Count;align 4;int64 LUID;dword Attributes"
  2562. Global Const $tagimageinfo = "handle hBitmap;handle hMask;int Unused1;int Unused2;" & $tagrect
  2563. Global Const $tagmenuinfo = "dword Size;INT Mask;dword Style;uint YMax;handle hBack;dword ContextHelpID;ulong_ptr MenuData"
  2564. Global Const $tagmenuiteminfo = "uint Size;uint Mask;uint Type;uint State;uint ID;handle SubMenu;handle BmpChecked;handle BmpUnchecked;" & "ulong_ptr ItemData;ptr TypeData;uint CCH;handle BmpItem"
  2565. Global Const $tagrebarbandinfo = "uint cbSize;uint fMask;uint fStyle;dword clrFore;dword clrBack;ptr lpText;uint cch;" & "int iImage;hwnd hwndChild;uint cxMinChild;uint cyMinChild;uint cx;handle hbmBack;uint wID;uint cyChild;uint cyMaxChild;" & "uint cyIntegral;uint cxIdeal;lparam lParam;uint cxHeader" & ((@OSVersion = "WIN_XP") ? "" : ";" & $tagrect & ";uint uChevronState")
  2566. Global Const $tagnmrebarautobreak = $tagnmhdr & ";uint uBand;uint wID;lparam lParam;uint uMsg;uint fStyleCurrent;bool fAutoBreak"
  2567. Global Const $tagnmrbautosize = $tagnmhdr & ";bool fChanged;" & "struct;long TargetLeft;long TargetTop;long TargetRight;long TargetBottom;endstruct;" & "struct;long ActualLeft;long ActualTop;long ActualRight;long ActualBottom;endstruct"
  2568. Global Const $tagnmrebar = $tagnmhdr & ";dword dwMask;uint uBand;uint fStyle;uint wID;lparam lParam"
  2569. Global Const $tagnmrebarchevron = $tagnmhdr & ";uint uBand;uint wID;lparam lParam;" & $tagrect & ";lparam lParamNM"
  2570. Global Const $tagnmrebarchildsize = $tagnmhdr & ";uint uBand;uint wID;" & "struct;long CLeft;long CTop;long CRight;long CBottom;endstruct;" & "struct;long BLeft;long BTop;long BRight;long BBottom;endstruct"
  2571. Global Const $tagcolorscheme = "dword Size;dword BtnHighlight;dword BtnShadow"
  2572. Global Const $tagnmtoolbar = $tagnmhdr & ";int iItem;" & "struct;int iBitmap;int idCommand;byte fsState;byte fsStyle;dword_ptr dwData;int_ptr iString;endstruct" & ";int cchText;ptr pszText;" & $tagrect
  2573. Global Const $tagnmtbhotitem = $tagnmhdr & ";int idOld;int idNew;dword dwFlags"
  2574. Global Const $tagtbbutton = "int Bitmap;int Command;byte State;byte Style;dword_ptr Param;int_ptr String"
  2575. Global Const $tagtbbuttoninfo = "uint Size;dword Mask;int Command;int Image;byte State;byte Style;word CX;dword_ptr Param;ptr Text;int TextMax"
  2576. Global Const $tagnetresource = "dword Scope;dword Type;dword DisplayType;dword Usage;ptr LocalName;ptr RemoteName;ptr Comment;ptr Provider"
  2577. Global Const $tagoverlapped = "ulong_ptr Internal;ulong_ptr InternalHigh;struct;dword Offset;dword OffsetHigh;endstruct;handle hEvent"
  2578. Global Const $tagopenfilename = "dword StructSize;hwnd hwndOwner;handle hInstance;ptr lpstrFilter;ptr lpstrCustomFilter;" & "dword nMaxCustFilter;dword nFilterIndex;ptr lpstrFile;dword nMaxFile;ptr lpstrFileTitle;dword nMaxFileTitle;" & "ptr lpstrInitialDir;ptr lpstrTitle;dword Flags;word nFileOffset;word nFileExtension;ptr lpstrDefExt;lparam lCustData;" & "ptr lpfnHook;ptr lpTemplateName;ptr pvReserved;dword dwReserved;dword FlagsEx"
  2579. Global Const $tagbitmapinfoheader = "struct;dword biSize;long biWidth;long biHeight;word biPlanes;word biBitCount;" & "dword biCompression;dword biSizeImage;long biXPelsPerMeter;long biYPelsPerMeter;dword biClrUsed;dword biClrImportant;endstruct"
  2580. Global Const $tagbitmapinfo = $tagbitmapinfoheader & ";dword biRGBQuad[1]"
  2581. Global Const $tagblendfunction = "byte Op;byte Flags;byte Alpha;byte Format"
  2582. Global Const $tagguid = "struct;ulong Data1;ushort Data2;ushort Data3;byte Data4[8];endstruct"
  2583. Global Const $tagwindowplacement = "uint length;uint flags;uint showCmd;long ptMinPosition[2];long ptMaxPosition[2];long rcNormalPosition[4]"
  2584. Global Const $tagwindowpos = "hwnd hWnd;hwnd InsertAfter;int X;int Y;int CX;int CY;uint Flags"
  2585. Global Const $tagscrollinfo = "uint cbSize;uint fMask;int nMin;int nMax;uint nPage;int nPos;int nTrackPos"
  2586. Global Const $tagscrollbarinfo = "dword cbSize;" & $tagrect & ";int dxyLineButton;int xyThumbTop;" & "int xyThumbBottom;int reserved;dword rgstate[6]"
  2587. Global Const $taglogfont = "struct;long Height;long Width;long Escapement;long Orientation;long Weight;byte Italic;byte Underline;" & "byte Strikeout;byte CharSet;byte OutPrecision;byte ClipPrecision;byte Quality;byte PitchAndFamily;wchar FaceName[32];endstruct"
  2588. Global Const $tagkbdllhookstruct = "dword vkCode;dword scanCode;dword flags;dword time;ulong_ptr dwExtraInfo"
  2589. Global Const $tagprocess_information = "handle hProcess;handle hThread;dword ProcessID;dword ThreadID"
  2590. Global Const $tagstartupinfo = "dword Size;ptr Reserved1;ptr Desktop;ptr Title;dword X;dword Y;dword XSize;dword YSize;dword XCountChars;" & "dword YCountChars;dword FillAttribute;dword Flags;word ShowWindow;word Reserved2;ptr Reserved3;handle StdInput;" & "handle StdOutput;handle StdError"
  2591. Global Const $tagsecurity_attributes = "dword Length;ptr Descriptor;bool InheritHandle"
  2592. Global Const $tagwin32_find_data = "dword dwFileAttributes;dword ftCreationTime[2];dword ftLastAccessTime[2];dword ftLastWriteTime[2];dword nFileSizeHigh;dword nFileSizeLow;dword dwReserved0;dword dwReserved1;wchar cFileName[260];wchar cAlternateFileName[14]"
  2593. Global Const $tagtextmetric = "long tmHeight;long tmAscent;long tmDescent;long tmInternalLeading;long tmExternalLeading;" & "long tmAveCharWidth;long tmMaxCharWidth;long tmWeight;long tmOverhang;long tmDigitizedAspectX;long tmDigitizedAspectY;" & "wchar tmFirstChar;wchar tmLastChar;wchar tmDefaultChar;wchar tmBreakChar;byte tmItalic;byte tmUnderlined;byte tmStruckOut;" & "byte tmPitchAndFamily;byte tmCharSet"
  2594. Global Const $fc_nooverwrite = 0
  2595. Global Const $fc_overwrite = 1
  2596. Global Const $fc_createpath = 8
  2597. Global Const $ft_modified = 0
  2598. Global Const $ft_created = 1
  2599. Global Const $ft_accessed = 2
  2600. Global Const $fo_read = 0
  2601. Global Const $fo_append = 1
  2602. Global Const $fo_overwrite = 2
  2603. Global Const $fo_createpath = 8
  2604. Global Const $fo_binary = 16
  2605. Global Const $fo_unicode = 32
  2606. Global Const $fo_utf16_le = 32
  2607. Global Const $fo_utf16_be = 64
  2608. Global Const $fo_utf8 = 128
  2609. Global Const $fo_utf8_nobom = 256
  2610. Global Const $fo_utf8_full = 16384
  2611. Global Const $eof = -1
  2612. Global Const $fd_filemustexist = 1
  2613. Global Const $fd_pathmustexist = 2
  2614. Global Const $fd_multiselect = 4
  2615. Global Const $fd_promptcreatenew = 8
  2616. Global Const $fd_promptoverwrite = 16
  2617. Global Const $create_new = 1
  2618. Global Const $create_always = 2
  2619. Global Const $open_existing = 3
  2620. Global Const $open_always = 4
  2621. Global Const $truncate_existing = 5
  2622. Global Const $invalid_set_file_pointer = -1
  2623. Global Const $file_begin = 0
  2624. Global Const $file_current = 1
  2625. Global Const $file_end = 2
  2626. Global Const $file_attribute_readonly = 1
  2627. Global Const $file_attribute_hidden = 2
  2628. Global Const $file_attribute_system = 4
  2629. Global Const $file_attribute_directory = 16
  2630. Global Const $file_attribute_archive = 32
  2631. Global Const $file_attribute_device = 64
  2632. Global Const $file_attribute_normal = 128
  2633. Global Const $file_attribute_temporary = 256
  2634. Global Const $file_attribute_sparse_file = 512
  2635. Global Const $file_attribute_reparse_point = 1024
  2636. Global Const $file_attribute_compressed = 2048
  2637. Global Const $file_attribute_offline = 4096
  2638. Global Const $file_attribute_not_content_indexed = 8192
  2639. Global Const $file_attribute_encrypted = 16384
  2640. Global Const $file_share_read = 1
  2641. Global Const $file_share_write = 2
  2642. Global Const $file_share_delete = 4
  2643. Global Const $file_share_readwrite = BitOR($file_share_read, $file_share_write)
  2644. Global Const $file_share_any = BitOR($file_share_read, $file_share_write, $file_share_delete)
  2645. Global Const $generic_all = 268435456
  2646. Global Const $generic_execute = 536870912
  2647. Global Const $generic_write = 1073741824
  2648. Global Const $generic_read = -2147483648
  2649. Global Const $generic_readwrite = BitOR($generic_read, $generic_write)
  2650. Global Const $se_assignprimarytoken_name = "SeAssignPrimaryTokenPrivilege"
  2651. Global Const $se_audit_name = "SeAuditPrivilege"
  2652. Global Const $se_backup_name = "SeBackupPrivilege"
  2653. Global Const $se_change_notify_name = "SeChangeNotifyPrivilege"
  2654. Global Const $se_create_global_name = "SeCreateGlobalPrivilege"
  2655. Global Const $se_create_pagefile_name = "SeCreatePagefilePrivilege"
  2656. Global Const $se_create_permanent_name = "SeCreatePermanentPrivilege"
  2657. Global Const $se_create_symbolic_link_name = "SeCreateSymbolicLinkPrivilege"
  2658. Global Const $se_create_token_name = "SeCreateTokenPrivilege"
  2659. Global Const $se_debug_name = "SeDebugPrivilege"
  2660. Global Const $se_enable_delegation_name = "SeEnableDelegationPrivilege"
  2661. Global Const $se_impersonate_name = "SeImpersonatePrivilege"
  2662. Global Const $se_inc_base_priority_name = "SeIncreaseBasePriorityPrivilege"
  2663. Global Const $se_inc_working_set_name = "SeIncreaseWorkingSetPrivilege"
  2664. Global Const $se_increase_quota_name = "SeIncreaseQuotaPrivilege"
  2665. Global Const $se_load_driver_name = "SeLoadDriverPrivilege"
  2666. Global Const $se_lock_memory_name = "SeLockMemoryPrivilege"
  2667. Global Const $se_machine_account_name = "SeMachineAccountPrivilege"
  2668. Global Const $se_manage_volume_name = "SeManageVolumePrivilege"
  2669. Global Const $se_prof_single_process_name = "SeProfileSingleProcessPrivilege"
  2670. Global Const $se_relabel_name = "SeRelabelPrivilege"
  2671. Global Const $se_remote_shutdown_name = "SeRemoteShutdownPrivilege"
  2672. Global Const $se_restore_name = "SeRestorePrivilege"
  2673. Global Const $se_security_name = "SeSecurityPrivilege"
  2674. Global Const $se_shutdown_name = "SeShutdownPrivilege"
  2675. Global Const $se_sync_agent_name = "SeSyncAgentPrivilege"
  2676. Global Const $se_system_environment_name = "SeSystemEnvironmentPrivilege"
  2677. Global Const $se_system_profile_name = "SeSystemProfilePrivilege"
  2678. Global Const $se_systemtime_name = "SeSystemtimePrivilege"
  2679. Global Const $se_take_ownership_name = "SeTakeOwnershipPrivilege"
  2680. Global Const $se_tcb_name = "SeTcbPrivilege"
  2681. Global Const $se_time_zone_name = "SeTimeZonePrivilege"
  2682. Global Const $se_trusted_credman_access_name = "SeTrustedCredManAccessPrivilege"
  2683. Global Const $se_unsolicited_input_name = "SeUnsolicitedInputPrivilege"
  2684. Global Const $se_undock_name = "SeUndockPrivilege"
  2685. Global Const $se_privilege_enabled_by_default = 1
  2686. Global Const $se_privilege_enabled = 2
  2687. Global Const $se_privilege_removed = 4
  2688. Global Const $se_privilege_used_for_access = -2147483648
  2689. Global Const $se_group_mandatory = 1
  2690. Global Const $se_group_enabled_by_default = 2
  2691. Global Const $se_group_enabled = 4
  2692. Global Const $se_group_owner = 8
  2693. Global Const $se_group_use_for_deny_only = 16
  2694. Global Const $se_group_integrity = 32
  2695. Global Const $se_group_integrity_enabled = 64
  2696. Global Const $se_group_resource = 536870912
  2697. Global Const $se_group_logon_id = -1073741824
  2698. Global Enum $tokenprimary = 1, $tokenimpersonation
  2699. Global Enum $securityanonymous = 0, $securityidentification, $securityimpersonation, $securitydelegation
  2700. Global Enum $tokenuser = 1, $tokengroups, $tokenprivileges, $tokenowner, $tokenprimarygroup, $tokendefaultdacl, $tokensource, $tokentype, $tokenimpersonationlevel, $tokenstatistics, $tokenrestrictedsids, $tokensessionid, $tokengroupsandprivileges, $tokensessionreference, $tokensandboxinert, $tokenauditpolicy, $tokenorigin, $tokenelevationtype, $tokenlinkedtoken, $tokenelevation, $tokenhasrestrictions, $tokenaccessinformation, $tokenvirtualizationallowed, $tokenvirtualizationenabled, $tokenintegritylevel, $tokenuiaccess, $tokenmandatorypolicy, $tokenlogonsid
  2701. Global Const $token_assign_primary = 1
  2702. Global Const $token_duplicate = 2
  2703. Global Const $token_impersonate = 4
  2704. Global Const $token_query = 8
  2705. Global Const $token_query_source = 16
  2706. Global Const $token_adjust_privileges = 32
  2707. Global Const $token_adjust_groups = 64
  2708. Global Const $token_adjust_default = 128
  2709. Global Const $token_adjust_sessionid = 256
  2710. Global Const $token_all_access = 983551
  2711. Global Const $token_read = 131080
  2712. Global Const $token_write = 131296
  2713. Global Const $token_execute = 131072
  2714. Global Const $token_has_traverse_privilege = 1
  2715. Global Const $token_has_backup_privilege = 2
  2716. Global Const $token_has_restore_privilege = 4
  2717. Global Const $token_has_admin_group = 8
  2718. Global Const $token_is_restricted = 16
  2719. Global Const $token_session_not_referenced = 32
  2720. Global Const $token_sandbox_inert = 64
  2721. Global Const $token_has_impersonate_privilege = 128
  2722. Global Const $rights_delete = 65536
  2723. Global Const $read_control = 131072
  2724. Global Const $write_dac = 262144
  2725. Global Const $write_owner = 524288
  2726. Global Const $synchronize = 1048576
  2727. Global Const $access_system_security = 16777216
  2728. Global Const $standard_rights_required = 983040
  2729. Global Const $standard_rights_read = $read_control
  2730. Global Const $standard_rights_write = $read_control
  2731. Global Const $standard_rights_execute = $read_control
  2732. Global Const $standard_rights_all = 2031616
  2733. Global Const $specific_rights_all = 65535
  2734. Global Enum $not_used_access = 0, $grant_access, $set_access, $deny_access, $revoke_access, $set_audit_success, $set_audit_failure
  2735. Global Enum $trustee_is_unknown = 0, $trustee_is_user, $trustee_is_group, $trustee_is_domain, $trustee_is_alias, $trustee_is_well_known_group, $trustee_is_deleted, $trustee_is_invalid, $trustee_is_computer
  2736. Global Const $logon_with_profile = 1
  2737. Global Const $logon_netcredentials_only = 2
  2738. Global Enum $sidtypeuser = 1, $sidtypegroup, $sidtypedomain, $sidtypealias, $sidtypewellknowngroup, $sidtypedeletedaccount, $sidtypeinvalid, $sidtypeunknown, $sidtypecomputer, $sidtypelabel
  2739. Global Const $sid_administrators = "S-1-5-32-544"
  2740. Global Const $sid_users = "S-1-5-32-545"
  2741. Global Const $sid_guests = "S-1-5-32-546"
  2742. Global Const $sid_account_operators = "S-1-5-32-548"
  2743. Global Const $sid_server_operators = "S-1-5-32-549"
  2744. Global Const $sid_print_operators = "S-1-5-32-550"
  2745. Global Const $sid_backup_operators = "S-1-5-32-551"
  2746. Global Const $sid_replicator = "S-1-5-32-552"
  2747. Global Const $sid_owner = "S-1-3-0"
  2748. Global Const $sid_everyone = "S-1-1-0"
  2749. Global Const $sid_network = "S-1-5-2"
  2750. Global Const $sid_interactive = "S-1-5-4"
  2751. Global Const $sid_system = "S-1-5-18"
  2752. Global Const $sid_authenticated_users = "S-1-5-11"
  2753. Global Const $sid_schannel_authentication = "S-1-5-64-14"
  2754. Global Const $sid_digest_authentication = "S-1-5-64-21"
  2755. Global Const $sid_nt_service = "S-1-5-80"
  2756. Global Const $sid_untrusted_mandatory_level = "S-1-16-0"
  2757. Global Const $sid_low_mandatory_level = "S-1-16-4096"
  2758. Global Const $sid_medium_mandatory_level = "S-1-16-8192"
  2759. Global Const $sid_medium_plus_mandatory_level = "S-1-16-8448"
  2760. Global Const $sid_high_mandatory_level = "S-1-16-12288"
  2761. Global Const $sid_system_mandatory_level = "S-1-16-16384"
  2762. Global Const $sid_protected_process_mandatory_level = "S-1-16-20480"
  2763. Global Const $sid_secure_process_mandatory_level = "S-1-16-28672"
  2764. Global Const $sid_all_services = "S-1-5-80-0"
  2765.  
  2766. Func _winapi_getlasterror($ierror = @error, $iextended = @extended)
  2767.     Local $aresult = DllCall("kernel32.dll", "dword", "GetLastError")
  2768.     Return SetError($ierror, $iextended, $aresult[0])
  2769. EndFunc
  2770.  
  2771. Func _winapi_setlasterror($ierrorcode, $ierror = @error, $iextended = @extended)
  2772.     DllCall("kernel32.dll", "none", "SetLastError", "dword", $ierrorcode)
  2773.     Return SetError($ierror, $iextended, NULL )
  2774. EndFunc
  2775.  
  2776. Func _security__adjusttokenprivileges($htoken, $fdisableall, $pnewstate, $ibufferlen, $pprevstate = 0, $prequired = 0)
  2777.     Local $acall = DllCall("advapi32.dll", "bool", "AdjustTokenPrivileges", "handle", $htoken, "bool", $fdisableall, "struct*", $pnewstate, "dword", $ibufferlen, "struct*", $pprevstate, "struct*", $prequired)
  2778.     If @error Then Return SetError(@error, @extended, False)
  2779.     Return NOT ($acall[0] = 0)
  2780. EndFunc
  2781.  
  2782. Func _security__createprocesswithtoken($htoken, $ilogonflags, $scommandline, $icreationflags, $scurdir, $tstartupinfo, $tprocess_information)
  2783.     Local $acall = DllCall("advapi32.dll", "bool", "CreateProcessWithTokenW", "handle", $htoken, "dword", $ilogonflags, "ptr", 0, "wstr", $scommandline, "dword", $icreationflags, "struct*", 0, "wstr", $scurdir, "struct*", $tstartupinfo, "struct*", $tprocess_information)
  2784.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, False)
  2785.     Return True
  2786. EndFunc
  2787.  
  2788. Func _security__duplicatetokenex($hexistingtoken, $idesiredaccess, $iimpersonationlevel, $itokentype)
  2789.     Local $acall = DllCall("advapi32.dll", "bool", "DuplicateTokenEx", "handle", $hexistingtoken, "dword", $idesiredaccess, "struct*", 0, "int", $iimpersonationlevel, "int", $itokentype, "handle*", 0)
  2790.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, 0)
  2791.     Return $acall[6]
  2792. EndFunc
  2793.  
  2794. Func _security__getaccountsid($saccount, $ssystem = "")
  2795.     Local $aacct = _security__lookupaccountname($saccount, $ssystem)
  2796.     If @error Then Return SetError(@error, @extended, 0)
  2797.     If IsArray($aacct) Then Return _security__stringsidtosid($aacct[0])
  2798.     Return ""
  2799. EndFunc
  2800.  
  2801. Func _security__getlengthsid($psid)
  2802.     If NOT _security__isvalidsid($psid) Then Return SetError(@error + 10, @extended, 0)
  2803.     Local $acall = DllCall("advapi32.dll", "dword", "GetLengthSid", "struct*", $psid)
  2804.     If @error Then Return SetError(@error, @extended, 0)
  2805.     Return $acall[0]
  2806. EndFunc
  2807.  
  2808. Func _security__gettokeninformation($htoken, $iclass)
  2809.     Local $acall = DllCall("advapi32.dll", "bool", "GetTokenInformation", "handle", $htoken, "int", $iclass, "struct*", 0, "dword", 0, "dword*", 0)
  2810.     If @error OR NOT $acall[5] Then Return SetError(@error + 10, @extended, 0)
  2811.     Local $ilen = $acall[5]
  2812.     Local $tbuffer = DllStructCreate("byte[" & $ilen & "]")
  2813.     $acall = DllCall("advapi32.dll", "bool", "GetTokenInformation", "handle", $htoken, "int", $iclass, "struct*", $tbuffer, "dword", DllStructGetSize($tbuffer), "dword*", 0)
  2814.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, 0)
  2815.     Return $tbuffer
  2816. EndFunc
  2817.  
  2818. Func _security__impersonateself($ilevel = $securityimpersonation)
  2819.     Local $acall = DllCall("advapi32.dll", "bool", "ImpersonateSelf", "int", $ilevel)
  2820.     If @error Then Return SetError(@error, @extended, False)
  2821.     Return NOT ($acall[0] = 0)
  2822. EndFunc
  2823.  
  2824. Func _security__isvalidsid($psid)
  2825.     Local $acall = DllCall("advapi32.dll", "bool", "IsValidSid", "struct*", $psid)
  2826.     If @error Then Return SetError(@error, @extended, False)
  2827.     Return NOT ($acall[0] = 0)
  2828. EndFunc
  2829.  
  2830. Func _security__lookupaccountname($saccount, $ssystem = "")
  2831.     Local $tdata = DllStructCreate("byte SID[256]")
  2832.     Local $acall = DllCall("advapi32.dll", "bool", "LookupAccountNameW", "wstr", $ssystem, "wstr", $saccount, "struct*", $tdata, "dword*", DllStructGetSize($tdata), "wstr", "", "dword*", DllStructGetSize($tdata), "int*", 0)
  2833.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, 0)
  2834.     Local $aacct[3]
  2835.     $aacct[0] = _security__sidtostringsid(DllStructGetPtr($tdata, "SID"))
  2836.     $aacct[1] = $acall[5]
  2837.     $aacct[2] = $acall[7]
  2838.     Return $aacct
  2839. EndFunc
  2840.  
  2841. Func _security__lookupaccountsid($vsid, $ssystem = "")
  2842.     Local $psid, $aacct[3]
  2843.     If IsString($vsid) Then
  2844.         $psid = _security__stringsidtosid($vsid)
  2845.     Else
  2846.         $psid = $vsid
  2847.     EndIf
  2848.     If NOT _security__isvalidsid($psid) Then Return SetError(@error + 10, @extended, 0)
  2849.     Local $typesystem = "ptr"
  2850.     If $ssystem Then $typesystem = "wstr"
  2851.     Local $acall = DllCall("advapi32.dll", "bool", "LookupAccountSidW", $typesystem, $ssystem, "struct*", $psid, "wstr", "", "dword*", 65536, "wstr", "", "dword*", 65536, "int*", 0)
  2852.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, 0)
  2853.     Local $aacct[3]
  2854.     $aacct[0] = $acall[3]
  2855.     $aacct[1] = $acall[5]
  2856.     $aacct[2] = $acall[7]
  2857.     Return $aacct
  2858. EndFunc
  2859.  
  2860. Func _security__lookupprivilegevalue($ssystem, $sname)
  2861.     Local $acall = DllCall("advapi32.dll", "bool", "LookupPrivilegeValueW", "wstr", $ssystem, "wstr", $sname, "int64*", 0)
  2862.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, 0)
  2863.     Return $acall[3]
  2864. EndFunc
  2865.  
  2866. Func _security__openprocesstoken($hprocess, $iaccess)
  2867.     Local $acall = DllCall("advapi32.dll", "bool", "OpenProcessToken", "handle", $hprocess, "dword", $iaccess, "handle*", 0)
  2868.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, 0)
  2869.     Return $acall[3]
  2870. EndFunc
  2871.  
  2872. Func _security__openthreadtoken($iaccess, $hthread = 0, $fopenasself = False)
  2873.     If $hthread = 0 Then
  2874.         Local $aresult = DllCall("kernel32.dll", "handle", "GetCurrentThread")
  2875.         If @error Then Return SetError(@error + 10, @extended, 0)
  2876.         $hthread = $aresult[0]
  2877.     EndIf
  2878.     Local $acall = DllCall("advapi32.dll", "bool", "OpenThreadToken", "handle", $hthread, "dword", $iaccess, "bool", $fopenasself, "handle*", 0)
  2879.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, 0)
  2880.     Return $acall[4]
  2881. EndFunc
  2882.  
  2883. Func _security__openthreadtokenex($iaccess, $hthread = 0, $fopenasself = False)
  2884.     Local $htoken = _security__openthreadtoken($iaccess, $hthread, $fopenasself)
  2885.     If $htoken = 0 Then
  2886.         Local Const $error_no_token = 1008
  2887.         If _winapi_getlasterror() <> $error_no_token Then Return SetError(20, _winapi_getlasterror(), 0)
  2888.         If NOT _security__impersonateself() Then Return SetError(@error + 10, _winapi_getlasterror(), 0)
  2889.         $htoken = _security__openthreadtoken($iaccess, $hthread, $fopenasself)
  2890.         If $htoken = 0 Then Return SetError(@error, _winapi_getlasterror(), 0)
  2891.     EndIf
  2892.     Return $htoken
  2893. EndFunc
  2894.  
  2895. Func _security__setprivilege($htoken, $sprivilege, $fenable)
  2896.     Local $iluid = _security__lookupprivilegevalue("", $sprivilege)
  2897.     If $iluid = 0 Then Return SetError(@error + 10, @extended, False)
  2898.     Local Const $tagtoken_privileges = "dword Count;align 4;int64 LUID;dword Attributes"
  2899.     Local $tcurrstate = DllStructCreate($tagtoken_privileges)
  2900.     Local $icurrstate = DllStructGetSize($tcurrstate)
  2901.     Local $tprevstate = DllStructCreate($tagtoken_privileges)
  2902.     Local $iprevstate = DllStructGetSize($tprevstate)
  2903.     Local $trequired = DllStructCreate("int Data")
  2904.     DllStructSetData($tcurrstate, "Count", 1)
  2905.     DllStructSetData($tcurrstate, "LUID", $iluid)
  2906.     If NOT _security__adjusttokenprivileges($htoken, False, $tcurrstate, $icurrstate, $tprevstate, $trequired) Then Return SetError(2, @error, False)
  2907.     DllStructSetData($tprevstate, "Count", 1)
  2908.     DllStructSetData($tprevstate, "LUID", $iluid)
  2909.     Local $iattributes = DllStructGetData($tprevstate, "Attributes")
  2910.     If $fenable Then
  2911.         $iattributes = BitOR($iattributes, $se_privilege_enabled)
  2912.     Else
  2913.         $iattributes = BitAND($iattributes, BitNOT($se_privilege_enabled))
  2914.     EndIf
  2915.     DllStructSetData($tprevstate, "Attributes", $iattributes)
  2916.     If NOT _security__adjusttokenprivileges($htoken, False, $tprevstate, $iprevstate, $tcurrstate, $trequired) Then Return SetError(3, @error, False)
  2917.     Return True
  2918. EndFunc
  2919.  
  2920. Func _security__settokeninformation($htoken, $itokeninformation, $vtokeninformation, $itokeninformationlength)
  2921.     Local $acall = DllCall("advapi32.dll", "bool", "SetTokenInformation", "handle", $htoken, "int", $itokeninformation, "struct*", $vtokeninformation, "dword", $itokeninformationlength)
  2922.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, False)
  2923.     Return True
  2924. EndFunc
  2925.  
  2926. Func _security__sidtostringsid($psid)
  2927.     If NOT _security__isvalidsid($psid) Then Return SetError(@error + 10, 0, "")
  2928.     Local $acall = DllCall("advapi32.dll", "bool", "ConvertSidToStringSidW", "struct*", $psid, "ptr*", 0)
  2929.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, "")
  2930.     Local $pstringsid = $acall[2]
  2931.     Local $alen = DllCall("kernel32.dll", "int", "lstrlenW", "struct*", $pstringsid)
  2932.     Local $ssid = DllStructGetData(DllStructCreate("wchar Text[" & $alen[0] + 1 & "]", $pstringsid), "Text")
  2933.     DllCall("kernel32.dll", "handle", "LocalFree", "handle", $pstringsid)
  2934.     Return $ssid
  2935. EndFunc
  2936.  
  2937. Func _security__sidtypestr($itype)
  2938.     Switch $itype
  2939.         Case $sidtypeuser
  2940.             Return "User"
  2941.         Case $sidtypegroup
  2942.             Return "Group"
  2943.         Case $sidtypedomain
  2944.             Return "Domain"
  2945.         Case $sidtypealias
  2946.             Return "Alias"
  2947.         Case $sidtypewellknowngroup
  2948.             Return "Well Known Group"
  2949.         Case $sidtypedeletedaccount
  2950.             Return "Deleted Account"
  2951.         Case $sidtypeinvalid
  2952.             Return "Invalid"
  2953.         Case $sidtypeunknown
  2954.             Return "Unknown Type"
  2955.         Case $sidtypecomputer
  2956.             Return "Computer"
  2957.         Case $sidtypelabel
  2958.             Return "A mandatory integrity label SID"
  2959.         Case Else
  2960.             Return "Unknown SID Type"
  2961.     EndSwitch
  2962. EndFunc
  2963.  
  2964. Func _security__stringsidtosid($ssid)
  2965.     Local $acall = DllCall("advapi32.dll", "bool", "ConvertStringSidToSidW", "wstr", $ssid, "ptr*", 0)
  2966.     If @error OR NOT $acall[0] Then Return SetError(@error, @extended, 0)
  2967.     Local $psid = $acall[2]
  2968.     Local $tbuffer = DllStructCreate("byte Data[" & _security__getlengthsid($psid) & "]", $psid)
  2969.     Local $tsid = DllStructCreate("byte Data[" & DllStructGetSize($tbuffer) & "]")
  2970.     DllStructSetData($tsid, "Data", DllStructGetData($tbuffer, "Data"))
  2971.     DllCall("kernel32.dll", "handle", "LocalFree", "handle", $psid)
  2972.     Return $tsid
  2973. EndFunc
  2974.  
  2975. Global $__gainprocess_winapi[64][2] = [[0, 0]]
  2976. Global $__gawinlist_winapi[64][2] = [[0, 0]]
  2977. Global Const $__winapiconstant_wm_setfont = 48
  2978. Global Const $__winapiconstant_fw_normal = 400
  2979. Global Const $__winapiconstant_default_charset = 1
  2980. Global Const $__winapiconstant_out_default_precis = 0
  2981. Global Const $__winapiconstant_clip_default_precis = 0
  2982. Global Const $__winapiconstant_default_quality = 0
  2983. Global Const $__winapiconstant_logpixelsx = 88
  2984. Global Const $__winapiconstant_logpixelsy = 90
  2985. Global Const $tagcursorinfo = "dword Size;dword Flags;handle hCursor;" & $tagpoint
  2986. Global Const $tagdisplay_device = "dword Size;wchar Name[32];wchar String[128];dword Flags;wchar ID[128];wchar Key[128]"
  2987. Global Const $tagflashwinfo = "uint Size;hwnd hWnd;dword Flags;uint Count;dword TimeOut"
  2988. Global Const $tagiconinfo = "bool Icon;dword XHotSpot;dword YHotSpot;handle hMask;handle hColor"
  2989. Global Const $tagmemorystatusex = "dword Length;dword MemoryLoad;" & "uint64 TotalPhys;uint64 AvailPhys;uint64 TotalPageFile;uint64 AvailPageFile;" & "uint64 TotalVirtual;uint64 AvailVirtual;uint64 AvailExtendedVirtual"
  2990.  
  2991. Func _winapi_attachconsole($iprocessid = -1)
  2992.     Local $aresult = DllCall("kernel32.dll", "bool", "AttachConsole", "dword", $iprocessid)
  2993.     If @error Then Return SetError(@error, @extended, False)
  2994.     Return $aresult[0]
  2995. EndFunc
  2996.  
  2997. Func _winapi_attachthreadinput($iattach, $iattachto, $fattach)
  2998.     Local $aresult = DllCall("user32.dll", "bool", "AttachThreadInput", "dword", $iattach, "dword", $iattachto, "bool", $fattach)
  2999.     If @error Then Return SetError(@error, @extended, False)
  3000.     Return $aresult[0]
  3001. EndFunc
  3002.  
  3003. Func _winapi_beep($ifreq = 500, $iduration = 1000)
  3004.     Local $aresult = DllCall("kernel32.dll", "bool", "Beep", "dword", $ifreq, "dword", $iduration)
  3005.     If @error Then Return SetError(@error, @extended, False)
  3006.     Return $aresult[0]
  3007. EndFunc
  3008.  
  3009. Func _winapi_bitblt($hdestdc, $ixdest, $iydest, $iwidth, $iheight, $hsrcdc, $ixsrc, $iysrc, $irop)
  3010.     Local $aresult = DllCall("gdi32.dll", "bool", "BitBlt", "handle", $hdestdc, "int", $ixdest, "int", $iydest, "int", $iwidth, "int", $iheight, "handle", $hsrcdc, "int", $ixsrc, "int", $iysrc, "dword", $irop)
  3011.     If @error Then Return SetError(@error, @extended, False)
  3012.     Return $aresult[0]
  3013. EndFunc
  3014.  
  3015. Func _winapi_callnexthookex($hhk, $icode, $wparam, $lparam)
  3016.     Local $aresult = DllCall("user32.dll", "lresult", "CallNextHookEx", "handle", $hhk, "int", $icode, "wparam", $wparam, "lparam", $lparam)
  3017.     If @error Then Return SetError(@error, @extended, -1)
  3018.     Return $aresult[0]
  3019. EndFunc
  3020.  
  3021. Func _winapi_callwindowproc($lpprevwndfunc, $hwnd, $msg, $wparam, $lparam)
  3022.     Local $aresult = DllCall("user32.dll", "lresult", "CallWindowProc", "ptr", $lpprevwndfunc, "hwnd", $hwnd, "uint", $msg, "wparam", $wparam, "lparam", $lparam)
  3023.     If @error Then Return SetError(@error, @extended, -1)
  3024.     Return $aresult[0]
  3025. EndFunc
  3026.  
  3027. Func _winapi_clienttoscreen($hwnd, ByRef $tpoint)
  3028.     Local $aret = DllCall("user32.dll", "bool", "ClientToScreen", "hwnd", $hwnd, "struct*", $tpoint)
  3029.     If @error OR NOT $aret[0] Then Return SetError(@error + 10, @extended, 0)
  3030.     Return $tpoint
  3031. EndFunc
  3032.  
  3033. Func _winapi_closehandle($hobject)
  3034.     Local $aresult = DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $hobject)
  3035.     If @error Then Return SetError(@error, @extended, False)
  3036.     Return $aresult[0]
  3037. EndFunc
  3038.  
  3039. Func _winapi_combinergn($hrgndest, $hrgnsrc1, $hrgnsrc2, $icombinemode)
  3040.     Local $aresult = DllCall("gdi32.dll", "int", "CombineRgn", "handle", $hrgndest, "handle", $hrgnsrc1, "handle", $hrgnsrc2, "int", $icombinemode)
  3041.     If @error Then Return SetError(@error, @extended, 0)
  3042.     Return $aresult[0]
  3043. EndFunc
  3044.  
  3045. Func _winapi_commdlgextendederror()
  3046.     Local Const $cderr_dialogfailure = 65535
  3047.     Local Const $cderr_findresfailure = 6
  3048.     Local Const $cderr_initialization = 2
  3049.     Local Const $cderr_loadresfailure = 7
  3050.     Local Const $cderr_loadstrfailure = 5
  3051.     Local Const $cderr_lockresfailure = 8
  3052.     Local Const $cderr_memallocfailure = 9
  3053.     Local Const $cderr_memlockfailure = 10
  3054.     Local Const $cderr_nohinstance = 4
  3055.     Local Const $cderr_nohook = 11
  3056.     Local Const $cderr_notemplate = 3
  3057.     Local Const $cderr_registermsgfail = 12
  3058.     Local Const $cderr_structsize = 1
  3059.     Local Const $fnerr_buffertoosmall = 12291
  3060.     Local Const $fnerr_invalidfilename = 12290
  3061.     Local Const $fnerr_subclassfailure = 12289
  3062.     Local $aresult = DllCall("comdlg32.dll", "dword", "CommDlgExtendedError")
  3063.     If NOT @error Then
  3064.         Switch $aresult[0]
  3065.             Case $cderr_dialogfailure
  3066.                 Return SetError($aresult[0], 0, "The dialog box could not be created." & @LF & "The common dialog box function's call to the DialogBox function failed." & @LF & "For example, this error occurs if the common dialog box call specifies an invalid window handle.")
  3067.             Case $cderr_findresfailure
  3068.                 Return SetError($aresult[0], 0, "The common dialog box function failed to find a specified resource.")
  3069.             Case $cderr_initialization
  3070.                 Return SetError($aresult[0], 0, "The common dialog box function failed during initialization." & @LF & "This error often occurs when sufficient memory is not available.")
  3071.             Case $cderr_loadresfailure
  3072.                 Return SetError($aresult[0], 0, "The common dialog box function failed to load a specified resource.")
  3073.             Case $cderr_loadstrfailure
  3074.                 Return SetError($aresult[0], 0, "The common dialog box function failed to load a specified string.")
  3075.             Case $cderr_lockresfailure
  3076.                 Return SetError($aresult[0], 0, "The common dialog box function failed to lock a specified resource.")
  3077.             Case $cderr_memallocfailure
  3078.                 Return SetError($aresult[0], 0, "The common dialog box function was unable to allocate memory for internal structures.")
  3079.             Case $cderr_memlockfailure
  3080.                 Return SetError($aresult[0], 0, "The common dialog box function was unable to lock the memory associated with a handle.")
  3081.             Case $cderr_nohinstance
  3082.                 Return SetError($aresult[0], 0, "The ENABLETEMPLATE flag was set in the Flags member of the initialization structure for the corresponding common dialog box," & @LF & "but you failed to provide a corresponding instance handle.")
  3083.             Case $cderr_nohook
  3084.                 Return SetError($aresult[0], 0, "The ENABLEHOOK flag was set in the Flags member of the initialization structure for the corresponding common dialog box," & @LF & "but you failed to provide a pointer to a corresponding hook procedure.")
  3085.             Case $cderr_notemplate
  3086.                 Return SetError($aresult[0], 0, "The ENABLETEMPLATE flag was set in the Flags member of the initialization structure for the corresponding common dialog box," & @LF & "but you failed to provide a corresponding template.")
  3087.             Case $cderr_registermsgfail
  3088.                 Return SetError($aresult[0], 0, "The RegisterWindowMessage function returned an error code when it was called by the common dialog box function.")
  3089.             Case $cderr_structsize
  3090.                 Return SetError($aresult[0], 0, "The lStructSize member of the initialization structure for the corresponding common dialog box is invalid")
  3091.             Case $fnerr_buffertoosmall
  3092.                 Return SetError($aresult[0], 0, "The buffer pointed to by the lpstrFile member of the OPENFILENAME structure is too small for the file name specified by the user." & @LF & "The first two bytes of the lpstrFile buffer contain an integer value specifying the size, in TCHARs, required to receive the full name.")
  3093.             Case $fnerr_invalidfilename
  3094.                 Return SetError($aresult[0], 0, "A file name is invalid.")
  3095.             Case $fnerr_subclassfailure
  3096.                 Return SetError($aresult[0], 0, "An attempt to subclass a list box failed because sufficient memory was not available.")
  3097.         EndSwitch
  3098.     EndIf
  3099.     Return SetError(@error, @extended, "0x" & Hex($aresult[0]))
  3100. EndFunc
  3101.  
  3102. Func _winapi_copyicon($hicon)
  3103.     Local $aresult = DllCall("user32.dll", "handle", "CopyIcon", "handle", $hicon)
  3104.     If @error Then Return SetError(@error, @extended, 0)
  3105.     Return $aresult[0]
  3106. EndFunc
  3107.  
  3108. Func _winapi_createbitmap($iwidth, $iheight, $iplanes = 1, $ibitsperpel = 1, $pbits = 0)
  3109.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateBitmap", "int", $iwidth, "int", $iheight, "uint", $iplanes, "uint", $ibitsperpel, "ptr", $pbits)
  3110.     If @error Then Return SetError(@error, @extended, 0)
  3111.     Return $aresult[0]
  3112. EndFunc
  3113.  
  3114. Func _winapi_createcompatiblebitmap($hdc, $iwidth, $iheight)
  3115.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateCompatibleBitmap", "handle", $hdc, "int", $iwidth, "int", $iheight)
  3116.     If @error Then Return SetError(@error, @extended, 0)
  3117.     Return $aresult[0]
  3118. EndFunc
  3119.  
  3120. Func _winapi_createcompatibledc($hdc)
  3121.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateCompatibleDC", "handle", $hdc)
  3122.     If @error Then Return SetError(@error, @extended, 0)
  3123.     Return $aresult[0]
  3124. EndFunc
  3125.  
  3126. Func _winapi_createevent($pattributes = 0, $fmanualreset = True, $finitialstate = True, $sname = "")
  3127.     Local $snametype = "wstr"
  3128.     If $sname = "" Then
  3129.         $sname = 0
  3130.         $snametype = "ptr"
  3131.     EndIf
  3132.     Local $aresult = DllCall("kernel32.dll", "handle", "CreateEventW", "ptr", $pattributes, "bool", $fmanualreset, "bool", $finitialstate, $snametype, $sname)
  3133.     If @error Then Return SetError(@error, @extended, 0)
  3134.     Return $aresult[0]
  3135. EndFunc
  3136.  
  3137. Func _winapi_createfile($sfilename, $icreation, $iaccess = 4, $ishare = 0, $iattributes = 0, $psecurity = 0)
  3138.     Local $ida = 0, $ism = 0, $icd = 0, $ifa = 0
  3139.     If BitAND($iaccess, 1) <> 0 Then $ida = BitOR($ida, $generic_execute)
  3140.     If BitAND($iaccess, 2) <> 0 Then $ida = BitOR($ida, $generic_read)
  3141.     If BitAND($iaccess, 4) <> 0 Then $ida = BitOR($ida, $generic_write)
  3142.     If BitAND($ishare, 1) <> 0 Then $ism = BitOR($ism, $file_share_delete)
  3143.     If BitAND($ishare, 2) <> 0 Then $ism = BitOR($ism, $file_share_read)
  3144.     If BitAND($ishare, 4) <> 0 Then $ism = BitOR($ism, $file_share_write)
  3145.     Switch $icreation
  3146.         Case 0
  3147.             $icd = $create_new
  3148.         Case 1
  3149.             $icd = $create_always
  3150.         Case 2
  3151.             $icd = $open_existing
  3152.         Case 3
  3153.             $icd = $open_always
  3154.         Case 4
  3155.             $icd = $truncate_existing
  3156.     EndSwitch
  3157.     If BitAND($iattributes, 1) <> 0 Then $ifa = BitOR($ifa, $file_attribute_archive)
  3158.     If BitAND($iattributes, 2) <> 0 Then $ifa = BitOR($ifa, $file_attribute_hidden)
  3159.     If BitAND($iattributes, 4) <> 0 Then $ifa = BitOR($ifa, $file_attribute_readonly)
  3160.     If BitAND($iattributes, 8) <> 0 Then $ifa = BitOR($ifa, $file_attribute_system)
  3161.     Local $aresult = DllCall("kernel32.dll", "handle", "CreateFileW", "wstr", $sfilename, "dword", $ida, "dword", $ism, "ptr", $psecurity, "dword", $icd, "dword", $ifa, "ptr", 0)
  3162.     If @error OR ($aresult[0] = $invalid_handle_value) Then Return SetError(@error, @extended, 0)
  3163.     Return $aresult[0]
  3164. EndFunc
  3165.  
  3166. Func _winapi_createfont($nheight, $nwidth, $nescape = 0, $norientn = 0, $fnweight = $__winapiconstant_fw_normal, $bitalic = False, $bunderline = False, $bstrikeout = False, $ncharset = $__winapiconstant_default_charset, $noutputprec = $__winapiconstant_out_default_precis, $nclipprec = $__winapiconstant_clip_default_precis, $nquality = $__winapiconstant_default_quality, $npitch = 0, $szface = "Arial")
  3167.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateFontW", "int", $nheight, "int", $nwidth, "int", $nescape, "int", $norientn, "int", $fnweight, "dword", $bitalic, "dword", $bunderline, "dword", $bstrikeout, "dword", $ncharset, "dword", $noutputprec, "dword", $nclipprec, "dword", $nquality, "dword", $npitch, "wstr", $szface)
  3168.     If @error Then Return SetError(@error, @extended, 0)
  3169.     Return $aresult[0]
  3170. EndFunc
  3171.  
  3172. Func _winapi_createfontindirect($tlogfont)
  3173.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateFontIndirectW", "struct*", $tlogfont)
  3174.     If @error Then Return SetError(@error, @extended, 0)
  3175.     Return $aresult[0]
  3176. EndFunc
  3177.  
  3178. Func _winapi_createpen($ipenstyle, $iwidth, $ncolor)
  3179.     Local $aresult = DllCall("gdi32.dll", "handle", "CreatePen", "int", $ipenstyle, "int", $iwidth, "INT", $ncolor)
  3180.     If @error Then Return SetError(@error, @extended, 0)
  3181.     Return $aresult[0]
  3182. EndFunc
  3183.  
  3184. Func _winapi_createprocess($sappname, $scommand, $psecurity, $pthread, $finherit, $iflags, $penviron, $sdir, $pstartupinfo, $pprocess)
  3185.     Local $tcommand = 0
  3186.     Local $sappnametype = "wstr", $sdirtype = "wstr"
  3187.     If $sappname = "" Then
  3188.         $sappnametype = "ptr"
  3189.         $sappname = 0
  3190.     EndIf
  3191.     If $scommand <> "" Then
  3192.         $tcommand = DllStructCreate("wchar Text[" & 260 + 1 & "]")
  3193.         DllStructSetData($tcommand, "Text", $scommand)
  3194.     EndIf
  3195.     If $sdir = "" Then
  3196.         $sdirtype = "ptr"
  3197.         $sdir = 0
  3198.     EndIf
  3199.     Local $aresult = DllCall("kernel32.dll", "bool", "CreateProcessW", $sappnametype, $sappname, "struct*", $tcommand, "ptr", $psecurity, "ptr", $pthread, "bool", $finherit, "dword", $iflags, "ptr", $penviron, $sdirtype, $sdir, "ptr", $pstartupinfo, "ptr", $pprocess)
  3200.     If @error Then Return SetError(@error, @extended, False)
  3201.     Return $aresult[0]
  3202. EndFunc
  3203.  
  3204. Func _winapi_createrectrgn($ileftrect, $itoprect, $irightrect, $ibottomrect)
  3205.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateRectRgn", "int", $ileftrect, "int", $itoprect, "int", $irightrect, "int", $ibottomrect)
  3206.     If @error Then Return SetError(@error, @extended, 0)
  3207.     Return $aresult[0]
  3208. EndFunc
  3209.  
  3210. Func _winapi_createroundrectrgn($ileftrect, $itoprect, $irightrect, $ibottomrect, $iwidthellipse, $iheightellipse)
  3211.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateRoundRectRgn", "int", $ileftrect, "int", $itoprect, "int", $irightrect, "int", $ibottomrect, "int", $iwidthellipse, "int", $iheightellipse)
  3212.     If @error Then Return SetError(@error, @extended, 0)
  3213.     Return $aresult[0]
  3214. EndFunc
  3215.  
  3216. Func _winapi_createsolidbitmap($hwnd, $icolor, $iwidth, $iheight, $brgb = 1)
  3217.     Local $hdc = _winapi_getdc($hwnd)
  3218.     Local $hdestdc = _winapi_createcompatibledc($hdc)
  3219.     Local $hbitmap = _winapi_createcompatiblebitmap($hdc, $iwidth, $iheight)
  3220.     Local $hold = _winapi_selectobject($hdestdc, $hbitmap)
  3221.     Local $trect = DllStructCreate($tagrect)
  3222.     DllStructSetData($trect, 1, 0)
  3223.     DllStructSetData($trect, 2, 0)
  3224.     DllStructSetData($trect, 3, $iwidth)
  3225.     DllStructSetData($trect, 4, $iheight)
  3226.     If $brgb Then
  3227.         $icolor = BitOR(BitAND($icolor, 65280), BitShift(BitAND($icolor, 255), -16), BitShift(BitAND($icolor, 16711680), 16))
  3228.     EndIf
  3229.     Local $hbrush = _winapi_createsolidbrush($icolor)
  3230.     If NOT _winapi_fillrect($hdestdc, $trect, $hbrush) Then
  3231.         _winapi_deleteobject($hbitmap)
  3232.         $hbitmap = 0
  3233.     EndIf
  3234.     _winapi_deleteobject($hbrush)
  3235.     _winapi_releasedc($hwnd, $hdc)
  3236.     _winapi_selectobject($hdestdc, $hold)
  3237.     _winapi_deletedc($hdestdc)
  3238.     If NOT $hbitmap Then Return SetError(1, 0, 0)
  3239.     Return $hbitmap
  3240. EndFunc
  3241.  
  3242. Func _winapi_createsolidbrush($ncolor)
  3243.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateSolidBrush", "INT", $ncolor)
  3244.     If @error Then Return SetError(@error, @extended, 0)
  3245.     Return $aresult[0]
  3246. EndFunc
  3247.  
  3248. Func _winapi_createwindowex($iexstyle, $sclass, $sname, $istyle, $ix, $iy, $iwidth, $iheight, $hparent, $hmenu = 0, $hinstance = 0, $pparam = 0)
  3249.     If $hinstance = 0 Then $hinstance = _winapi_getmodulehandle("")
  3250.     Local $aresult = DllCall("user32.dll", "hwnd", "CreateWindowExW", "dword", $iexstyle, "wstr", $sclass, "wstr", $sname, "dword", $istyle, "int", $ix, "int", $iy, "int", $iwidth, "int", $iheight, "hwnd", $hparent, "handle", $hmenu, "handle", $hinstance, "ptr", $pparam)
  3251.     If @error Then Return SetError(@error, @extended, 0)
  3252.     Return $aresult[0]
  3253. EndFunc
  3254.  
  3255. Func _winapi_defwindowproc($hwnd, $imsg, $iwparam, $ilparam)
  3256.     Local $aresult = DllCall("user32.dll", "lresult", "DefWindowProc", "hwnd", $hwnd, "uint", $imsg, "wparam", $iwparam, "lparam", $ilparam)
  3257.     If @error Then Return SetError(@error, @extended, 0)
  3258.     Return $aresult[0]
  3259. EndFunc
  3260.  
  3261. Func _winapi_deletedc($hdc)
  3262.     Local $aresult = DllCall("gdi32.dll", "bool", "DeleteDC", "handle", $hdc)
  3263.     If @error Then Return SetError(@error, @extended, False)
  3264.     Return $aresult[0]
  3265. EndFunc
  3266.  
  3267. Func _winapi_deleteobject($hobject)
  3268.     Local $aresult = DllCall("gdi32.dll", "bool", "DeleteObject", "handle", $hobject)
  3269.     If @error Then Return SetError(@error, @extended, False)
  3270.     Return $aresult[0]
  3271. EndFunc
  3272.  
  3273. Func _winapi_destroyicon($hicon)
  3274.     Local $aresult = DllCall("user32.dll", "bool", "DestroyIcon", "handle", $hicon)
  3275.     If @error Then Return SetError(@error, @extended, False)
  3276.     Return $aresult[0]
  3277. EndFunc
  3278.  
  3279. Func _winapi_destroywindow($hwnd)
  3280.     Local $aresult = DllCall("user32.dll", "bool", "DestroyWindow", "hwnd", $hwnd)
  3281.     If @error Then Return SetError(@error, @extended, False)
  3282.     Return $aresult[0]
  3283. EndFunc
  3284.  
  3285. Func _winapi_drawedge($hdc, $ptrrect, $nedgetype, $grfflags)
  3286.     Local $aresult = DllCall("user32.dll", "bool", "DrawEdge", "handle", $hdc, "ptr", $ptrrect, "uint", $nedgetype, "uint", $grfflags)
  3287.     If @error Then Return SetError(@error, @extended, False)
  3288.     Return $aresult[0]
  3289. EndFunc
  3290.  
  3291. Func _winapi_drawframecontrol($hdc, $ptrrect, $ntype, $nstate)
  3292.     Local $aresult = DllCall("user32.dll", "bool", "DrawFrameControl", "handle", $hdc, "ptr", $ptrrect, "uint", $ntype, "uint", $nstate)
  3293.     If @error Then Return SetError(@error, @extended, False)
  3294.     Return $aresult[0]
  3295. EndFunc
  3296.  
  3297. Func _winapi_drawicon($hdc, $ix, $iy, $hicon)
  3298.     Local $aresult = DllCall("user32.dll", "bool", "DrawIcon", "handle", $hdc, "int", $ix, "int", $iy, "handle", $hicon)
  3299.     If @error Then Return SetError(@error, @extended, False)
  3300.     Return $aresult[0]
  3301. EndFunc
  3302.  
  3303. Func _winapi_drawiconex($hdc, $ix, $iy, $hicon, $iwidth = 0, $iheight = 0, $istep = 0, $hbrush = 0, $iflags = 3)
  3304.     Local $ioptions
  3305.     Switch $iflags
  3306.         Case 1
  3307.             $ioptions = $di_mask
  3308.         Case 2
  3309.             $ioptions = $di_image
  3310.         Case 3
  3311.             $ioptions = $di_normal
  3312.         Case 4
  3313.             $ioptions = $di_compat
  3314.         Case 5
  3315.             $ioptions = $di_defaultsize
  3316.         Case Else
  3317.             $ioptions = $di_nomirror
  3318.     EndSwitch
  3319.     Local $aresult = DllCall("user32.dll", "bool", "DrawIconEx", "handle", $hdc, "int", $ix, "int", $iy, "handle", $hicon, "int", $iwidth, "int", $iheight, "uint", $istep, "handle", $hbrush, "uint", $ioptions)
  3320.     If @error Then Return SetError(@error, @extended, False)
  3321.     Return $aresult[0]
  3322. EndFunc
  3323.  
  3324. Func _winapi_drawline($hdc, $ix1, $iy1, $ix2, $iy2)
  3325.     _winapi_moveto($hdc, $ix1, $iy1)
  3326.     If @error Then Return SetError(@error, @extended, False)
  3327.     _winapi_lineto($hdc, $ix2, $iy2)
  3328.     If @error Then Return SetError(@error + 10, @extended, False)
  3329.     Return True
  3330. EndFunc
  3331.  
  3332. Func _winapi_drawtext($hdc, $stext, ByRef $trect, $iflags)
  3333.     Local $aresult = DllCall("user32.dll", "int", "DrawTextW", "handle", $hdc, "wstr", $stext, "int", -1, "struct*", $trect, "uint", $iflags)
  3334.     If @error Then Return SetError(@error, @extended, 0)
  3335.     Return $aresult[0]
  3336. EndFunc
  3337.  
  3338. Func _winapi_duplicatehandle($hsourceprocesshandle, $hsourcehandle, $htargetprocesshandle, $idesiredaccess, $finherithandle, $ioptions)
  3339.     Local $aresult = DllCall("kernel32.dll", "bool", "DuplicateHandle", "handle", $hsourceprocesshandle, "handle", $hsourcehandle, "handle", $htargetprocesshandle, "handle*", 0, "dword", $idesiredaccess, "bool", $finherithandle, "dword", $ioptions)
  3340.     If @error OR NOT $aresult[0] Then Return SetError(@error, @extended, 0)
  3341.     Return $aresult[4]
  3342. EndFunc
  3343.  
  3344. Func _winapi_enablewindow($hwnd, $fenable = True)
  3345.     Local $aresult = DllCall("user32.dll", "bool", "EnableWindow", "hwnd", $hwnd, "bool", $fenable)
  3346.     If @error Then Return SetError(@error, @extended, False)
  3347.     Return $aresult[0]
  3348. EndFunc
  3349.  
  3350. Func _winapi_enumdisplaydevices($sdevice, $idevnum)
  3351.     Local $tname = 0, $iflags = 0, $adevice[5]
  3352.     If $sdevice <> "" Then
  3353.         $tname = DllStructCreate("wchar Text[" & StringLen($sdevice) + 1 & "]")
  3354.         DllStructSetData($tname, "Text", $sdevice)
  3355.     EndIf
  3356.     Local $tdevice = DllStructCreate($tagdisplay_device)
  3357.     Local $idevice = DllStructGetSize($tdevice)
  3358.     DllStructSetData($tdevice, "Size", $idevice)
  3359.     Local $aret = DllCall("user32.dll", "bool", "EnumDisplayDevicesW", "struct*", $tname, "dword", $idevnum, "struct*", $tdevice, "dword", 1)
  3360.     If @error OR NOT $aret[0] Then Return SetError(@error + 10, @extended, 0)
  3361.     Local $in = DllStructGetData($tdevice, "Flags")
  3362.     If BitAND($in, $display_device_attached_to_desktop) <> 0 Then $iflags = BitOR($iflags, 1)
  3363.     If BitAND($in, $display_device_primary_device) <> 0 Then $iflags = BitOR($iflags, 2)
  3364.     If BitAND($in, $display_device_mirroring_driver) <> 0 Then $iflags = BitOR($iflags, 4)
  3365.     If BitAND($in, $display_device_vga_compatible) <> 0 Then $iflags = BitOR($iflags, 8)
  3366.     If BitAND($in, $display_device_removable) <> 0 Then $iflags = BitOR($iflags, 16)
  3367.     If BitAND($in, $display_device_modespruned) <> 0 Then $iflags = BitOR($iflags, 32)
  3368.     $adevice[0] = True
  3369.     $adevice[1] = DllStructGetData($tdevice, "Name")
  3370.     $adevice[2] = DllStructGetData($tdevice, "String")
  3371.     $adevice[3] = $iflags
  3372.     $adevice[4] = DllStructGetData($tdevice, "ID")
  3373.     Return $adevice
  3374. EndFunc
  3375.  
  3376. Func _winapi_enumwindows($fvisible = True, $hwnd = Default)
  3377.     __winapi_enumwindowsinit()
  3378.     If $hwnd = Default Then $hwnd = _winapi_getdesktopwindow()
  3379.     __winapi_enumwindowschild($hwnd, $fvisible)
  3380.     Return $__gawinlist_winapi
  3381. EndFunc
  3382.  
  3383. Func __winapi_enumwindowsadd($hwnd, $sclass = "")
  3384.     If $sclass = "" Then $sclass = _winapi_getclassname($hwnd)
  3385.     $__gawinlist_winapi[0][0] += 1
  3386.     Local $icount = $__gawinlist_winapi[0][0]
  3387.     If $icount >= $__gawinlist_winapi[0][1] Then
  3388.         ReDim $__gawinlist_winapi[$icount + 64][2]
  3389.         $__gawinlist_winapi[0][1] += 64
  3390.     EndIf
  3391.     $__gawinlist_winapi[$icount][0] = $hwnd
  3392.     $__gawinlist_winapi[$icount][1] = $sclass
  3393. EndFunc
  3394.  
  3395. Func __winapi_enumwindowschild($hwnd, $fvisible = True)
  3396.     $hwnd = _winapi_getwindow($hwnd, $gw_child)
  3397.     While $hwnd <> 0
  3398.         If (NOT $fvisible) OR _winapi_iswindowvisible($hwnd) Then
  3399.             __winapi_enumwindowsadd($hwnd)
  3400.             __winapi_enumwindowschild($hwnd, $fvisible)
  3401.         EndIf
  3402.         $hwnd = _winapi_getwindow($hwnd, $gw_hwndnext)
  3403.     WEnd
  3404. EndFunc
  3405.  
  3406. Func __winapi_enumwindowsinit()
  3407.     ReDim $__gawinlist_winapi[64][2]
  3408.     $__gawinlist_winapi[0][0] = 0
  3409.     $__gawinlist_winapi[0][1] = 64
  3410. EndFunc
  3411.  
  3412. Func _winapi_enumwindowspopup()
  3413.     __winapi_enumwindowsinit()
  3414.     Local $hwnd = _winapi_getwindow(_winapi_getdesktopwindow(), $gw_child)
  3415.     Local $sclass
  3416.     While $hwnd <> 0
  3417.         If _winapi_iswindowvisible($hwnd) Then
  3418.             $sclass = _winapi_getclassname($hwnd)
  3419.             If $sclass = "#32768" Then
  3420.                 __winapi_enumwindowsadd($hwnd)
  3421.             ElseIf $sclass = "ToolbarWindow32" Then
  3422.                 __winapi_enumwindowsadd($hwnd)
  3423.             ElseIf $sclass = "ToolTips_Class32" Then
  3424.                 __winapi_enumwindowsadd($hwnd)
  3425.             ElseIf $sclass = "BaseBar" Then
  3426.                 __winapi_enumwindowschild($hwnd)
  3427.             EndIf
  3428.         EndIf
  3429.         $hwnd = _winapi_getwindow($hwnd, $gw_hwndnext)
  3430.     WEnd
  3431.     Return $__gawinlist_winapi
  3432. EndFunc
  3433.  
  3434. Func _winapi_enumwindowstop()
  3435.     __winapi_enumwindowsinit()
  3436.     Local $hwnd = _winapi_getwindow(_winapi_getdesktopwindow(), $gw_child)
  3437.     While $hwnd <> 0
  3438.         If _winapi_iswindowvisible($hwnd) Then __winapi_enumwindowsadd($hwnd)
  3439.         $hwnd = _winapi_getwindow($hwnd, $gw_hwndnext)
  3440.     WEnd
  3441.     Return $__gawinlist_winapi
  3442. EndFunc
  3443.  
  3444. Func _winapi_expandenvironmentstrings($sstring)
  3445.     Local $aresult = DllCall("kernel32.dll", "dword", "ExpandEnvironmentStringsW", "wstr", $sstring, "wstr", "", "dword", 4096)
  3446.     If @error OR NOT $aresult[0] Then Return SetError(@error + 10, @extended, "")
  3447.     Return $aresult[2]
  3448. EndFunc
  3449.  
  3450. Func _winapi_extracticonex($sfile, $iindex, $plarge, $psmall, $iicons)
  3451.     Local $aresult = DllCall("shell32.dll", "uint", "ExtractIconExW", "wstr", $sfile, "int", $iindex, "struct*", $plarge, "struct*", $psmall, "uint", $iicons)
  3452.     If @error Then Return SetError(@error, @extended, 0)
  3453.     Return $aresult[0]
  3454. EndFunc
  3455.  
  3456. Func _winapi_fatalappexit($smessage)
  3457.     DllCall("kernel32.dll", "none", "FatalAppExitW", "uint", 0, "wstr", $smessage)
  3458.     If @error Then Return SetError(@error, @extended)
  3459. EndFunc
  3460.  
  3461. Func _winapi_fillrect($hdc, $ptrrect, $hbrush)
  3462.     Local $aresult
  3463.     If IsPtr($hbrush) Then
  3464.         $aresult = DllCall("user32.dll", "int", "FillRect", "handle", $hdc, "struct*", $ptrrect, "handle", $hbrush)
  3465.     Else
  3466.         $aresult = DllCall("user32.dll", "int", "FillRect", "handle", $hdc, "struct*", $ptrrect, "dword_ptr", $hbrush)
  3467.     EndIf
  3468.     If @error Then Return SetError(@error, @extended, False)
  3469.     Return $aresult[0]
  3470. EndFunc
  3471.  
  3472. Func _winapi_findexecutable($sfilename, $sdirectory = "")
  3473.     Local $aresult = DllCall("shell32.dll", "INT", "FindExecutableW", "wstr", $sfilename, "wstr", $sdirectory, "wstr", "")
  3474.     If @error Then Return SetError(@error, @extended, "")
  3475.     If $aresult[0] <= 32 Then Return SetError(10, $aresult[0], "")
  3476.     Return SetExtended($aresult[0], $aresult[3])
  3477. EndFunc
  3478.  
  3479. Func _winapi_findwindow($sclassname, $swindowname)
  3480.     Local $aresult = DllCall("user32.dll", "hwnd", "FindWindowW", "wstr", $sclassname, "wstr", $swindowname)
  3481.     If @error Then Return SetError(@error, @extended, 0)
  3482.     Return $aresult[0]
  3483. EndFunc
  3484.  
  3485. Func _winapi_flashwindow($hwnd, $finvert = True)
  3486.     Local $aresult = DllCall("user32.dll", "bool", "FlashWindow", "hwnd", $hwnd, "bool", $finvert)
  3487.     If @error Then Return SetError(@error, @extended, False)
  3488.     Return $aresult[0]
  3489. EndFunc
  3490.  
  3491. Func _winapi_flashwindowex($hwnd, $iflags = 3, $icount = 3, $itimeout = 0)
  3492.     Local $tflash = DllStructCreate($tagflashwinfo)
  3493.     Local $iflash = DllStructGetSize($tflash)
  3494.     Local $imode = 0
  3495.     If BitAND($iflags, 1) <> 0 Then $imode = BitOR($imode, $flashw_caption)
  3496.     If BitAND($iflags, 2) <> 0 Then $imode = BitOR($imode, $flashw_tray)
  3497.     If BitAND($iflags, 4) <> 0 Then $imode = BitOR($imode, $flashw_timer)
  3498.     If BitAND($iflags, 8) <> 0 Then $imode = BitOR($imode, $flashw_timernofg)
  3499.     DllStructSetData($tflash, "Size", $iflash)
  3500.     DllStructSetData($tflash, "hWnd", $hwnd)
  3501.     DllStructSetData($tflash, "Flags", $imode)
  3502.     DllStructSetData($tflash, "Count", $icount)
  3503.     DllStructSetData($tflash, "Timeout", $itimeout)
  3504.     Local $aresult = DllCall("user32.dll", "bool", "FlashWindowEx", "struct*", $tflash)
  3505.     If @error Then Return SetError(@error, @extended, False)
  3506.     Return $aresult[0]
  3507. EndFunc
  3508.  
  3509. Func _winapi_floattoint($nfloat)
  3510.     Local $tfloat = DllStructCreate("float")
  3511.     Local $tint = DllStructCreate("int", DllStructGetPtr($tfloat))
  3512.     DllStructSetData($tfloat, 1, $nfloat)
  3513.     Return DllStructGetData($tint, 1)
  3514. EndFunc
  3515.  
  3516. Func _winapi_flushfilebuffers($hfile)
  3517.     Local $aresult = DllCall("kernel32.dll", "bool", "FlushFileBuffers", "handle", $hfile)
  3518.     If @error Then Return SetError(@error, @extended, False)
  3519.     Return $aresult[0]
  3520. EndFunc
  3521.  
  3522. Func _winapi_formatmessage($iflags, $psource, $imessageid, $ilanguageid, ByRef $pbuffer, $isize, $varguments)
  3523.     Local $sbuffertype = "struct*"
  3524.     If IsString($pbuffer) Then $sbuffertype = "wstr"
  3525.     Local $aresult = DllCall("Kernel32.dll", "dword", "FormatMessageW", "dword", $iflags, "ptr", $psource, "dword", $imessageid, "dword", $ilanguageid, $sbuffertype, $pbuffer, "dword", $isize, "ptr", $varguments)
  3526.     If @error OR NOT $aresult[0] Then Return SetError(@error + 10, @extended, 0)
  3527.     If $sbuffertype = "wstr" Then $pbuffer = $aresult[5]
  3528.     Return $aresult[0]
  3529. EndFunc
  3530.  
  3531. Func _winapi_framerect($hdc, $ptrrect, $hbrush)
  3532.     Local $aresult = DllCall("user32.dll", "int", "FrameRect", "handle", $hdc, "ptr", $ptrrect, "handle", $hbrush)
  3533.     If @error Then Return SetError(@error, @extended, False)
  3534.     Return $aresult[0]
  3535. EndFunc
  3536.  
  3537. Func _winapi_freelibrary($hmodule)
  3538.     Local $aresult = DllCall("kernel32.dll", "bool", "FreeLibrary", "handle", $hmodule)
  3539.     If @error Then Return SetError(@error, @extended, False)
  3540.     Return $aresult[0]
  3541. EndFunc
  3542.  
  3543. Func _winapi_getancestor($hwnd, $iflags = 1)
  3544.     Local $aresult = DllCall("user32.dll", "hwnd", "GetAncestor", "hwnd", $hwnd, "uint", $iflags)
  3545.     If @error Then Return SetError(@error, @extended, 0)
  3546.     Return $aresult[0]
  3547. EndFunc
  3548.  
  3549. Func _winapi_getasynckeystate($ikey)
  3550.     Local $aresult = DllCall("user32.dll", "short", "GetAsyncKeyState", "int", $ikey)
  3551.     If @error Then Return SetError(@error, @extended, 0)
  3552.     Return $aresult[0]
  3553. EndFunc
  3554.  
  3555. Func _winapi_getbkmode($hdc)
  3556.     Local $aresult = DllCall("gdi32.dll", "int", "GetBkMode", "handle", $hdc)
  3557.     If @error Then Return SetError(@error, @extended, 0)
  3558.     Return $aresult[0]
  3559. EndFunc
  3560.  
  3561. Func _winapi_getclassname($hwnd)
  3562.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  3563.     Local $aresult = DllCall("user32.dll", "int", "GetClassNameW", "hwnd", $hwnd, "wstr", "", "int", 4096)
  3564.     If @error OR NOT $aresult[0] Then Return SetError(@error, @extended, "")
  3565.     Return SetExtended($aresult[0], $aresult[2])
  3566. EndFunc
  3567.  
  3568. Func _winapi_getclientheight($hwnd)
  3569.     Local $trect = _winapi_getclientrect($hwnd)
  3570.     If @error Then Return SetError(@error, @extended, 0)
  3571.     Return DllStructGetData($trect, "Bottom") - DllStructGetData($trect, "Top")
  3572. EndFunc
  3573.  
  3574. Func _winapi_getclientwidth($hwnd)
  3575.     Local $trect = _winapi_getclientrect($hwnd)
  3576.     If @error Then Return SetError(@error, @extended, 0)
  3577.     Return DllStructGetData($trect, "Right") - DllStructGetData($trect, "Left")
  3578. EndFunc
  3579.  
  3580. Func _winapi_getclientrect($hwnd)
  3581.     Local $trect = DllStructCreate($tagrect)
  3582.     Local $aret = DllCall("user32.dll", "bool", "GetClientRect", "hwnd", $hwnd, "struct*", $trect)
  3583.     If @error OR NOT $aret[0] Then Return SetError(@error + 10, @extended, 0)
  3584.     Return $trect
  3585. EndFunc
  3586.  
  3587. Func _winapi_getcurrentprocess()
  3588.     Local $aresult = DllCall("kernel32.dll", "handle", "GetCurrentProcess")
  3589.     If @error Then Return SetError(@error, @extended, 0)
  3590.     Return $aresult[0]
  3591. EndFunc
  3592.  
  3593. Func _winapi_getcurrentprocessid()
  3594.     Local $aresult = DllCall("kernel32.dll", "dword", "GetCurrentProcessId")
  3595.     If @error Then Return SetError(@error, @extended, 0)
  3596.     Return $aresult[0]
  3597. EndFunc
  3598.  
  3599. Func _winapi_getcurrentthread()
  3600.     Local $aresult = DllCall("kernel32.dll", "handle", "GetCurrentThread")
  3601.     If @error Then Return SetError(@error, @extended, 0)
  3602.     Return $aresult[0]
  3603. EndFunc
  3604.  
  3605. Func _winapi_getcurrentthreadid()
  3606.     Local $aresult = DllCall("kernel32.dll", "dword", "GetCurrentThreadId")
  3607.     If @error Then Return SetError(@error, @extended, 0)
  3608.     Return $aresult[0]
  3609. EndFunc
  3610.  
  3611. Func _winapi_getcursorinfo()
  3612.     Local $tcursor = DllStructCreate($tagcursorinfo)
  3613.     Local $icursor = DllStructGetSize($tcursor)
  3614.     DllStructSetData($tcursor, "Size", $icursor)
  3615.     Local $aret = DllCall("user32.dll", "bool", "GetCursorInfo", "struct*", $tcursor)
  3616.     If @error OR NOT $aret[0] Then Return SetError(@error + 10, @extended, 0)
  3617.     Local $acursor[5]
  3618.     $acursor[0] = True
  3619.     $acursor[1] = DllStructGetData($tcursor, "Flags") <> 0
  3620.     $acursor[2] = DllStructGetData($tcursor, "hCursor")
  3621.     $acursor[3] = DllStructGetData($tcursor, "X")
  3622.     $acursor[4] = DllStructGetData($tcursor, "Y")
  3623.     Return $acursor
  3624. EndFunc
  3625.  
  3626. Func _winapi_getdc($hwnd)
  3627.     Local $aresult = DllCall("user32.dll", "handle", "GetDC", "hwnd", $hwnd)
  3628.     If @error Then Return SetError(@error, @extended, 0)
  3629.     Return $aresult[0]
  3630. EndFunc
  3631.  
  3632. Func _winapi_getdesktopwindow()
  3633.     Local $aresult = DllCall("user32.dll", "hwnd", "GetDesktopWindow")
  3634.     If @error Then Return SetError(@error, @extended, 0)
  3635.     Return $aresult[0]
  3636. EndFunc
  3637.  
  3638. Func _winapi_getdevicecaps($hdc, $iindex)
  3639.     Local $aresult = DllCall("gdi32.dll", "int", "GetDeviceCaps", "handle", $hdc, "int", $iindex)
  3640.     If @error Then Return SetError(@error, @extended, 0)
  3641.     Return $aresult[0]
  3642. EndFunc
  3643.  
  3644. Func _winapi_getdibits($hdc, $hbmp, $istartscan, $iscanlines, $pbits, $pbi, $iusage)
  3645.     Local $aresult = DllCall("gdi32.dll", "int", "GetDIBits", "handle", $hdc, "handle", $hbmp, "uint", $istartscan, "uint", $iscanlines, "ptr", $pbits, "ptr", $pbi, "uint", $iusage)
  3646.     If @error Then Return SetError(@error, @extended, False)
  3647.     Return $aresult[0]
  3648. EndFunc
  3649.  
  3650. Func _winapi_getdlgctrlid($hwnd)
  3651.     Local $aresult = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hwnd)
  3652.     If @error Then Return SetError(@error, @extended, 0)
  3653.     Return $aresult[0]
  3654. EndFunc
  3655.  
  3656. Func _winapi_getdlgitem($hwnd, $iitemid)
  3657.     Local $aresult = DllCall("user32.dll", "hwnd", "GetDlgItem", "hwnd", $hwnd, "int", $iitemid)
  3658.     If @error Then Return SetError(@error, @extended, 0)
  3659.     Return $aresult[0]
  3660. EndFunc
  3661.  
  3662. Func _winapi_getfilesizeex($hfile)
  3663.     Local $aresult = DllCall("kernel32.dll", "bool", "GetFileSizeEx", "handle", $hfile, "int64*", 0)
  3664.     If @error OR NOT $aresult[0] Then Return SetError(@error, @extended, -1)
  3665.     Return $aresult[2]
  3666. EndFunc
  3667.  
  3668. Func _winapi_getfocus()
  3669.     Local $aresult = DllCall("user32.dll", "hwnd", "GetFocus")
  3670.     If @error Then Return SetError(@error, @extended, 0)
  3671.     Return $aresult[0]
  3672. EndFunc
  3673.  
  3674. Func _winapi_getforegroundwindow()
  3675.     Local $aresult = DllCall("user32.dll", "hwnd", "GetForegroundWindow")
  3676.     If @error Then Return SetError(@error, @extended, 0)
  3677.     Return $aresult[0]
  3678. EndFunc
  3679.  
  3680. Func _winapi_getguiresources($iflag = 0, $hprocess = -1)
  3681.     If $hprocess = -1 Then $hprocess = _winapi_getcurrentprocess()
  3682.     Local $aresult = DllCall("user32.dll", "dword", "GetGuiResources", "handle", $hprocess, "dword", $iflag)
  3683.     If @error Then Return SetError(@error, @extended, 0)
  3684.     Return $aresult[0]
  3685. EndFunc
  3686.  
  3687. Func _winapi_geticoninfo($hicon)
  3688.     Local $tinfo = DllStructCreate($tagiconinfo)
  3689.     Local $aret = DllCall("user32.dll", "bool", "GetIconInfo", "handle", $hicon, "struct*", $tinfo)
  3690.     If @error OR NOT $aret[0] Then Return SetError(@error + 10, @extended, 0)
  3691.     Local $aicon[6]
  3692.     $aicon[0] = True
  3693.     $aicon[1] = DllStructGetData($tinfo, "Icon") <> 0
  3694.     $aicon[2] = DllStructGetData($tinfo, "XHotSpot")
  3695.     $aicon[3] = DllStructGetData($tinfo, "YHotSpot")
  3696.     $aicon[4] = DllStructGetData($tinfo, "hMask")
  3697.     $aicon[5] = DllStructGetData($tinfo, "hColor")
  3698.     Return $aicon
  3699. EndFunc
  3700.  
  3701. Func _winapi_getlasterrormessage()
  3702.     Local $ilasterror = _winapi_getlasterror()
  3703.     Local $tbufferptr = DllStructCreate("ptr")
  3704.     Local $ncount = _winapi_formatmessage(BitOR($format_message_allocate_buffer, $format_message_from_system), 0, $ilasterror, 0, $tbufferptr, 0, 0)
  3705.     If @error Then Return SetError(@error, 0, "")
  3706.     Local $stext = ""
  3707.     Local $pbuffer = DllStructGetData($tbufferptr, 1)
  3708.     If $pbuffer Then
  3709.         If $ncount > 0 Then
  3710.             Local $tbuffer = DllStructCreate("wchar[" & ($ncount + 1) & "]", $pbuffer)
  3711.             $stext = DllStructGetData($tbuffer, 1)
  3712.         EndIf
  3713.         _winapi_localfree($pbuffer)
  3714.     EndIf
  3715.     Return $stext
  3716. EndFunc
  3717.  
  3718. Func _winapi_getlayeredwindowattributes($hwnd, ByRef $i_transcolor, ByRef $transparency, $ascolorref = False)
  3719.     $i_transcolor = -1
  3720.     $transparency = -1
  3721.     Local $aresult = DllCall("user32.dll", "bool", "GetLayeredWindowAttributes", "hwnd", $hwnd, "INT*", $i_transcolor, "byte*", $transparency, "dword*", 0)
  3722.     If @error OR NOT $aresult[0] Then Return SetError(@error, @extended, 0)
  3723.     If NOT $ascolorref Then
  3724.         $aresult[2] = Int(BinaryMid($aresult[2], 3, 1) & BinaryMid($aresult[2], 2, 1) & BinaryMid($aresult[2], 1, 1))
  3725.     EndIf
  3726.     $i_transcolor = $aresult[2]
  3727.     $transparency = $aresult[3]
  3728.     Return $aresult[4]
  3729. EndFunc
  3730.  
  3731. Func _winapi_getmodulehandle($smodulename)
  3732.     Local $smodulenametype = "wstr"
  3733.     If $smodulename = "" Then
  3734.         $smodulename = 0
  3735.         $smodulenametype = "ptr"
  3736.     EndIf
  3737.     Local $aresult = DllCall("kernel32.dll", "handle", "GetModuleHandleW", $smodulenametype, $smodulename)
  3738.     If @error Then Return SetError(@error, @extended, 0)
  3739.     Return $aresult[0]
  3740. EndFunc
  3741.  
  3742. Func _winapi_getmousepos($ftoclient = False, $hwnd = 0)
  3743.     Local $imode = Opt("MouseCoordMode", 1)
  3744.     Local $apos = MouseGetPos()
  3745.     Opt("MouseCoordMode", $imode)
  3746.     Local $tpoint = DllStructCreate($tagpoint)
  3747.     DllStructSetData($tpoint, "X", $apos[0])
  3748.     DllStructSetData($tpoint, "Y", $apos[1])
  3749.     If $ftoclient AND NOT _winapi_screentoclient($hwnd, $tpoint) Then Return SetError(@error + 20, @extended, 0)
  3750.     Return $tpoint
  3751. EndFunc
  3752.  
  3753. Func _winapi_getmouseposx($ftoclient = False, $hwnd = 0)
  3754.     Local $tpoint = _winapi_getmousepos($ftoclient, $hwnd)
  3755.     If @error Then Return SetError(@error, @extended, 0)
  3756.     Return DllStructGetData($tpoint, "X")
  3757. EndFunc
  3758.  
  3759. Func _winapi_getmouseposy($ftoclient = False, $hwnd = 0)
  3760.     Local $tpoint = _winapi_getmousepos($ftoclient, $hwnd)
  3761.     If @error Then Return SetError(@error, @extended, 0)
  3762.     Return DllStructGetData($tpoint, "Y")
  3763. EndFunc
  3764.  
  3765. Func _winapi_getobject($hobject, $isize, $pobject)
  3766.     Local $aresult = DllCall("gdi32.dll", "int", "GetObjectW", "handle", $hobject, "int", $isize, "ptr", $pobject)
  3767.     If @error Then Return SetError(@error, @extended, 0)
  3768.     Return $aresult[0]
  3769. EndFunc
  3770.  
  3771. Func _winapi_getopenfilename($stitle = "", $sfilter = "All files (*.*)", $sinitaldir = ".", $sdefaultfile = "", $sdefaultext = "", $ifilterindex = 1, $iflags = 0, $iflagsex = 0, $hwndowner = 0)
  3772.     Local $ipathlen = 4096
  3773.     Local $inulls = 0
  3774.     Local $tofn = DllStructCreate($tagopenfilename)
  3775.     Local $afiles[1] = [0]
  3776.     Local $iflag = $iflags
  3777.     Local $asflines = StringSplit($sfilter, "|")
  3778.     Local $asfilter[$asflines[0] * 2 + 1]
  3779.     Local $istart, $ifinal, $stfilter
  3780.     $asfilter[0] = $asflines[0] * 2
  3781.     For $i = 1 To $asflines[0]
  3782.         $istart = StringInStr($asflines[$i], "(", 0, 1)
  3783.         $ifinal = StringInStr($asflines[$i], ")", 0, -1)
  3784.         $asfilter[$i * 2 - 1] = StringStripWS(StringLeft($asflines[$i], $istart - 1), 3)
  3785.         $asfilter[$i * 2] = StringStripWS(StringTrimRight(StringTrimLeft($asflines[$i], $istart), StringLen($asflines[$i]) - $ifinal + 1), 3)
  3786.         $stfilter &= "wchar[" & StringLen($asfilter[$i * 2 - 1]) + 1 & "];wchar[" & StringLen($asfilter[$i * 2]) + 1 & "];"
  3787.     Next
  3788.     Local $ttitle = DllStructCreate("wchar Title[" & StringLen($stitle) + 1 & "]")
  3789.     Local $tinitialdir = DllStructCreate("wchar InitDir[" & StringLen($sinitaldir) + 1 & "]")
  3790.     Local $tfilter = DllStructCreate($stfilter & "wchar")
  3791.     Local $tpath = DllStructCreate("wchar Path[" & $ipathlen & "]")
  3792.     Local $textn = DllStructCreate("wchar Extension[" & StringLen($sdefaultext) + 1 & "]")
  3793.     For $i = 1 To $asfilter[0]
  3794.         DllStructSetData($tfilter, $i, $asfilter[$i])
  3795.     Next
  3796.     DllStructSetData($ttitle, "Title", $stitle)
  3797.     DllStructSetData($tinitialdir, "InitDir", $sinitaldir)
  3798.     DllStructSetData($tpath, "Path", $sdefaultfile)
  3799.     DllStructSetData($textn, "Extension", $sdefaultext)
  3800.     DllStructSetData($tofn, "StructSize", DllStructGetSize($tofn))
  3801.     DllStructSetData($tofn, "hwndOwner", $hwndowner)
  3802.     DllStructSetData($tofn, "lpstrFilter", DllStructGetPtr($tfilter))
  3803.     DllStructSetData($tofn, "nFilterIndex", $ifilterindex)
  3804.     DllStructSetData($tofn, "lpstrFile", DllStructGetPtr($tpath))
  3805.     DllStructSetData($tofn, "nMaxFile", $ipathlen)
  3806.     DllStructSetData($tofn, "lpstrInitialDir", DllStructGetPtr($tinitialdir))
  3807.     DllStructSetData($tofn, "lpstrTitle", DllStructGetPtr($ttitle))
  3808.     DllStructSetData($tofn, "Flags", $iflag)
  3809.     DllStructSetData($tofn, "lpstrDefExt", DllStructGetPtr($textn))
  3810.     DllStructSetData($tofn, "FlagsEx", $iflagsex)
  3811.     Local $ares = DllCall("comdlg32.dll", "bool", "GetOpenFileNameW", "struct*", $tofn)
  3812.     If @error OR NOT $ares[0] Then Return SetError(@error + 10, @extended, $afiles)
  3813.     If BitAND($iflags, $ofn_allowmultiselect) = $ofn_allowmultiselect AND BitAND($iflags, $ofn_explorer) = $ofn_explorer Then
  3814.         For $x = 1 To $ipathlen
  3815.             If DllStructGetData($tpath, "Path", $x) = Chr(0) Then
  3816.                 DllStructSetData($tpath, "Path", "|", $x)
  3817.                 $inulls += 1
  3818.             Else
  3819.                 $inulls = 0
  3820.             EndIf
  3821.             If $inulls = 2 Then ExitLoop
  3822.         Next
  3823.         DllStructSetData($tpath, "Path", Chr(0), $x - 1)
  3824.         $afiles = StringSplit(DllStructGetData($tpath, "Path"), "|")
  3825.         If $afiles[0] = 1 Then Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
  3826.         Return StringSplit(DllStructGetData($tpath, "Path"), "|")
  3827.     ElseIf BitAND($iflags, $ofn_allowmultiselect) = $ofn_allowmultiselect Then
  3828.         $afiles = StringSplit(DllStructGetData($tpath, "Path"), " ")
  3829.         If $afiles[0] = 1 Then Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
  3830.         Return StringSplit(StringReplace(DllStructGetData($tpath, "Path"), " ", "|"), "|")
  3831.     Else
  3832.         Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
  3833.     EndIf
  3834. EndFunc
  3835.  
  3836. Func _winapi_getoverlappedresult($hfile, $poverlapped, ByRef $ibytes, $fwait = False)
  3837.     Local $aresult = DllCall("kernel32.dll", "bool", "GetOverlappedResult", "handle", $hfile, "ptr", $poverlapped, "dword*", 0, "bool", $fwait)
  3838.     If @error OR NOT $aresult[0] Then Return SetError(@error, @extended, False)
  3839.     $ibytes = $aresult[3]
  3840.     Return $aresult[0]
  3841. EndFunc
  3842.  
  3843. Func _winapi_getparent($hwnd)
  3844.     Local $aresult = DllCall("user32.dll", "hwnd", "GetParent", "hwnd", $hwnd)
  3845.     If @error Then Return SetError(@error, @extended, 0)
  3846.     Return $aresult[0]
  3847. EndFunc
  3848.  
  3849. Func _winapi_getprocaddress($hmodule, $vname)
  3850.     Local $stype = "str"
  3851.     If IsNumber($vname) Then $stype = "word"
  3852.     Local $aresult = DllCall("kernel32.dll", "ptr", "GetProcAddress", "handle", $hmodule, $stype, $vname)
  3853.     If @error OR NOT $aresult[0] Then Return SetError(@error, @extended, 0)
  3854.     Return $aresult[0]
  3855. EndFunc
  3856.  
  3857. Func _winapi_getprocessaffinitymask($hprocess)
  3858.     Local $aresult = DllCall("kernel32.dll", "bool", "GetProcessAffinityMask", "handle", $hprocess, "dword_ptr*", 0, "dword_ptr*", 0)
  3859.     If @error OR NOT $aresult[0] Then Return SetError(@error + 10, @extended, 0)
  3860.     Local $amask[3]
  3861.     $amask[0] = True
  3862.     $amask[1] = $aresult[2]
  3863.     $amask[2] = $aresult[3]
  3864.     Return $amask
  3865. EndFunc
  3866.  
  3867. Func _winapi_getsavefilename($stitle = "", $sfilter = "All files (*.*)", $sinitaldir = ".", $sdefaultfile = "", $sdefaultext = "", $ifilterindex = 1, $iflags = 0, $iflagsex = 0, $hwndowner = 0)
  3868.     Local $ipathlen = 4096
  3869.     Local $tofn = DllStructCreate($tagopenfilename)
  3870.     Local $afiles[1] = [0]
  3871.     Local $iflag = $iflags
  3872.     Local $asflines = StringSplit($sfilter, "|")
  3873.     Local $asfilter[$asflines[0] * 2 + 1]
  3874.     Local $istart, $ifinal, $stfilter
  3875.     $asfilter[0] = $asflines[0] * 2
  3876.     For $i = 1 To $asflines[0]
  3877.         $istart = StringInStr($asflines[$i], "(", 0, 1)
  3878.         $ifinal = StringInStr($asflines[$i], ")", 0, -1)
  3879.         $asfilter[$i * 2 - 1] = StringStripWS(StringLeft($asflines[$i], $istart - 1), 3)
  3880.         $asfilter[$i * 2] = StringStripWS(StringTrimRight(StringTrimLeft($asflines[$i], $istart), StringLen($asflines[$i]) - $ifinal + 1), 3)
  3881.         $stfilter &= "wchar[" & StringLen($asfilter[$i * 2 - 1]) + 1 & "];wchar[" & StringLen($asfilter[$i * 2]) + 1 & "];"
  3882.     Next
  3883.     Local $ttitle = DllStructCreate("wchar Title[" & StringLen($stitle) + 1 & "]")
  3884.     Local $tinitialdir = DllStructCreate("wchar InitDir[" & StringLen($sinitaldir) + 1 & "]")
  3885.     Local $tfilter = DllStructCreate($stfilter & "wchar")
  3886.     Local $tpath = DllStructCreate("wchar Path[" & $ipathlen & "]")
  3887.     Local $textn = DllStructCreate("wchar Extension[" & StringLen($sdefaultext) + 1 & "]")
  3888.     For $i = 1 To $asfilter[0]
  3889.         DllStructSetData($tfilter, $i, $asfilter[$i])
  3890.     Next
  3891.     DllStructSetData($ttitle, "Title", $stitle)
  3892.     DllStructSetData($tinitialdir, "InitDir", $sinitaldir)
  3893.     DllStructSetData($tpath, "Path", $sdefaultfile)
  3894.     DllStructSetData($textn, "Extension", $sdefaultext)
  3895.     DllStructSetData($tofn, "StructSize", DllStructGetSize($tofn))
  3896.     DllStructSetData($tofn, "hwndOwner", $hwndowner)
  3897.     DllStructSetData($tofn, "lpstrFilter", DllStructGetPtr($tfilter))
  3898.     DllStructSetData($tofn, "nFilterIndex", $ifilterindex)
  3899.     DllStructSetData($tofn, "lpstrFile", DllStructGetPtr($tpath))
  3900.     DllStructSetData($tofn, "nMaxFile", $ipathlen)
  3901.     DllStructSetData($tofn, "lpstrInitialDir", DllStructGetPtr($tinitialdir))
  3902.     DllStructSetData($tofn, "lpstrTitle", DllStructGetPtr($ttitle))
  3903.     DllStructSetData($tofn, "Flags", $iflag)
  3904.     DllStructSetData($tofn, "lpstrDefExt", DllStructGetPtr($textn))
  3905.     DllStructSetData($tofn, "FlagsEx", $iflagsex)
  3906.     Local $ares = DllCall("comdlg32.dll", "bool", "GetSaveFileNameW", "struct*", $tofn)
  3907.     If @error OR NOT $ares[0] Then Return SetError(@error + 10, @extended, $afiles)
  3908.     Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
  3909. EndFunc
  3910.  
  3911. Func _winapi_getstockobject($iobject)
  3912.     Local $aresult = DllCall("gdi32.dll", "handle", "GetStockObject", "int", $iobject)
  3913.     If @error Then Return SetError(@error, @extended, 0)
  3914.     Return $aresult[0]
  3915. EndFunc
  3916.  
  3917. Func _winapi_getstdhandle($istdhandle)
  3918.     If $istdhandle < 0 OR $istdhandle > 2 Then Return SetError(2, 0, -1)
  3919.     Local Const $ahandle[3] = [-10, -11, -12]
  3920.     Local $aresult = DllCall("kernel32.dll", "handle", "GetStdHandle", "dword", $ahandle[$istdhandle])
  3921.     If @error Then Return SetError(@error, @extended, -1)
  3922.     Return $aresult[0]
  3923. EndFunc
  3924.  
  3925. Func _winapi_getsyscolor($iindex)
  3926.     Local $aresult = DllCall("user32.dll", "INT", "GetSysColor", "int", $iindex)
  3927.     If @error Then Return SetError(@error, @extended, 0)
  3928.     Return $aresult[0]
  3929. EndFunc
  3930.  
  3931. Func _winapi_getsyscolorbrush($iindex)
  3932.     Local $aresult = DllCall("user32.dll", "handle", "GetSysColorBrush", "int", $iindex)
  3933.     If @error Then Return SetError(@error, @extended, 0)
  3934.     Return $aresult[0]
  3935. EndFunc
  3936.  
  3937. Func _winapi_getsystemmetrics($iindex)
  3938.     Local $aresult = DllCall("user32.dll", "int", "GetSystemMetrics", "int", $iindex)
  3939.     If @error Then Return SetError(@error, @extended, 0)
  3940.     Return $aresult[0]
  3941. EndFunc
  3942.  
  3943. Func _winapi_gettextextentpoint32($hdc, $stext)
  3944.     Local $tsize = DllStructCreate($tagsize)
  3945.     Local $isize = StringLen($stext)
  3946.     Local $aret = DllCall("gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hdc, "wstr", $stext, "int", $isize, "struct*", $tsize)
  3947.     If @error OR NOT $aret[0] Then Return SetError(@error + 10, @extended, 0)
  3948.     Return $tsize
  3949. EndFunc
  3950.  
  3951. Func _winapi_gettextmetrics($hdc)
  3952.     Local $ttextmetric = DllStructCreate($tagtextmetric)
  3953.     Local $ret = DllCall("gdi32.dll", "bool", "GetTextMetricsW", "handle", $hdc, "struct*", $ttextmetric)
  3954.     If @error OR NOT $ret[0] Then Return SetError(@error + 10, @extended, 0)
  3955.     Return $ttextmetric
  3956. EndFunc
  3957.  
  3958. Func _winapi_getwindow($hwnd, $icmd)
  3959.     Local $aresult = DllCall("user32.dll", "hwnd", "GetWindow", "hwnd", $hwnd, "uint", $icmd)
  3960.     If @error Then Return SetError(@error, @extended, 0)
  3961.     Return $aresult[0]
  3962. EndFunc
  3963.  
  3964. Func _winapi_getwindowdc($hwnd)
  3965.     Local $aresult = DllCall("user32.dll", "handle", "GetWindowDC", "hwnd", $hwnd)
  3966.     If @error Then Return SetError(@error, @extended, 0)
  3967.     Return $aresult[0]
  3968. EndFunc
  3969.  
  3970. Func _winapi_getwindowheight($hwnd)
  3971.     Local $trect = _winapi_getwindowrect($hwnd)
  3972.     If @error Then Return SetError(@error, @extended, 0)
  3973.     Return DllStructGetData($trect, "Bottom") - DllStructGetData($trect, "Top")
  3974. EndFunc
  3975.  
  3976. Func _winapi_getwindowlong($hwnd, $iindex)
  3977.     Local $sfuncname = "GetWindowLongW"
  3978.     If @AutoItX64 Then $sfuncname = "GetWindowLongPtrW"
  3979.     Local $aresult = DllCall("user32.dll", "long_ptr", $sfuncname, "hwnd", $hwnd, "int", $iindex)
  3980.     If @error OR NOT $aresult[0] Then Return SetError(@error + 10, @extended, 0)
  3981.     Return $aresult[0]
  3982. EndFunc
  3983.  
  3984. Func _winapi_getwindowplacement($hwnd)
  3985.     Local $twindowplacement = DllStructCreate($tagwindowplacement)
  3986.     DllStructSetData($twindowplacement, "length", DllStructGetSize($twindowplacement))
  3987.     Local $aret = DllCall("user32.dll", "bool", "GetWindowPlacement", "hwnd", $hwnd, "struct*", $twindowplacement)
  3988.     If @error OR NOT $aret[0] Then Return SetError(@error + 10, @extended, 0)
  3989.     Return $twindowplacement
  3990. EndFunc
  3991.  
  3992. Func _winapi_getwindowrect($hwnd)
  3993.     Local $trect = DllStructCreate($tagrect)
  3994.     Local $aret = DllCall("user32.dll", "bool", "GetWindowRect", "hwnd", $hwnd, "struct*", $trect)
  3995.     If @error OR NOT $aret[0] Then Return SetError(@error + 10, @extended, 0)
  3996.     Return $trect
  3997. EndFunc
  3998.  
  3999. Func _winapi_getwindowrgn($hwnd, $hrgn)
  4000.     Local $aresult = DllCall("user32.dll", "int", "GetWindowRgn", "hwnd", $hwnd, "handle", $hrgn)
  4001.     If @error Then Return SetError(@error, @extended, 0)
  4002.     Return $aresult[0]
  4003. EndFunc
  4004.  
  4005. Func _winapi_getwindowtext($hwnd)
  4006.     Local $aresult = DllCall("user32.dll", "int", "GetWindowTextW", "hwnd", $hwnd, "wstr", "", "int", 4096)
  4007.     If @error OR NOT $aresult[0] Then Return SetError(@error + 10, @extended, "")
  4008.     Return SetExtended($aresult[0], $aresult[2])
  4009. EndFunc
  4010.  
  4011. Func _winapi_getwindowthreadprocessid($hwnd, ByRef $ipid)
  4012.     Local $aresult = DllCall("user32.dll", "dword", "GetWindowThreadProcessId", "hwnd", $hwnd, "dword*", 0)
  4013.     If @error Then Return SetError(@error, @extended, 0)
  4014.     $ipid = $aresult[2]
  4015.     Return $aresult[0]
  4016. EndFunc
  4017.  
  4018. Func _winapi_getwindowwidth($hwnd)
  4019.     Local $trect = _winapi_getwindowrect($hwnd)
  4020.     If @error Then Return SetError(@error, @extended, 0)
  4021.     Return DllStructGetData($trect, "Right") - DllStructGetData($trect, "Left")
  4022. EndFunc
  4023.  
  4024. Func _winapi_getxyfrompoint(ByRef $tpoint, ByRef $ix, ByRef $iy)
  4025.     $ix = DllStructGetData($tpoint, "X")
  4026.     $iy = DllStructGetData($tpoint, "Y")
  4027. EndFunc
  4028.  
  4029. Func _winapi_globalmemorystatus()
  4030.     Local $tmem = DllStructCreate($tagmemorystatusex)
  4031.     DllStructSetData($tmem, 1, DllStructGetSize($tmem))
  4032.     Local $aret = DllCall("kernel32.dll", "bool", "GlobalMemoryStatusEx", "struct*", $tmem)
  4033.     If @error OR NOT $aret[0] Then Return SetError(@error + 10, @extended, 0)
  4034.     Local $amem[7]
  4035.     $amem[0] = DllStructGetData($tmem, 2)
  4036.     $amem[1] = DllStructGetData($tmem, 3)
  4037.     $amem[2] = DllStructGetData($tmem, 4)
  4038.     $amem[3] = DllStructGetData($tmem, 5)
  4039.     $amem[4] = DllStructGetData($tmem, 6)
  4040.     $amem[5] = DllStructGetData($tmem, 7)
  4041.     $amem[6] = DllStructGetData($tmem, 8)
  4042.     Return $amem
  4043. EndFunc
  4044.  
  4045. Func _winapi_guidfromstring($sguid)
  4046.     Local $tguid = DllStructCreate($tagguid)
  4047.     _winapi_guidfromstringex($sguid, $tguid)
  4048.     If @error Then Return SetError(@error + 10, @extended, 0)
  4049.     Return $tguid
  4050. EndFunc
  4051.  
  4052. Func _winapi_guidfromstringex($sguid, $pguid)
  4053.     Local $aresult = DllCall("ole32.dll", "long", "CLSIDFromString", "wstr", $sguid, "struct*", $pguid)
  4054.     If @error Then Return SetError(@error, @extended, False)
  4055.     Return $aresult[0]
  4056. EndFunc
  4057.  
  4058. Func _winapi_hiword($ilong)
  4059.     Return BitShift($ilong, 16)
  4060. EndFunc
  4061.  
  4062. Func _winapi_inprocess($hwnd, ByRef $hlastwnd)
  4063.     If $hwnd = $hlastwnd Then Return True
  4064.     For $ii = $__gainprocess_winapi[0][0] To 1 Step -1
  4065.         If $hwnd = $__gainprocess_winapi[$ii][0] Then
  4066.             If $__gainprocess_winapi[$ii][1] Then
  4067.                 $hlastwnd = $hwnd
  4068.                 Return True
  4069.             Else
  4070.                 Return False
  4071.             EndIf
  4072.         EndIf
  4073.     Next
  4074.     Local $iprocessid
  4075.     _winapi_getwindowthreadprocessid($hwnd, $iprocessid)
  4076.     Local $icount = $__gainprocess_winapi[0][0] + 1
  4077.     If $icount >= 64 Then $icount = 1
  4078.     $__gainprocess_winapi[0][0] = $icount
  4079.     $__gainprocess_winapi[$icount][0] = $hwnd
  4080.     $__gainprocess_winapi[$icount][1] = ($iprocessid = @AutoItPID)
  4081.     Return $__gainprocess_winapi[$icount][1]
  4082. EndFunc
  4083.  
  4084. Func _winapi_inttofloat($iint)
  4085.     Local $tint = DllStructCreate("int")
  4086.     Local $tfloat = DllStructCreate("float", DllStructGetPtr($tint))
  4087.     DllStructSetData($tint, 1, $iint)
  4088.     Return DllStructGetData($tfloat, 1)
  4089. EndFunc
  4090.  
  4091. Func _winapi_isclassname($hwnd, $sclassname)
  4092.     Local $sseparator = Opt("GUIDataSeparatorChar")
  4093.     Local $aclassname = StringSplit($sclassname, $sseparator)
  4094.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4095.     Local $sclasscheck = _winapi_getclassname($hwnd)
  4096.     For $x = 1 To UBound($aclassname) - 1
  4097.         If StringUpper(StringMid($sclasscheck, 1, StringLen($aclassname[$x]))) = StringUpper($aclassname[$x]) Then Return True
  4098.     Next
  4099.     Return False
  4100. EndFunc
  4101.  
  4102. Func _winapi_iswindow($hwnd)
  4103.     Local $aresult = DllCall("user32.dll", "bool", "IsWindow", "hwnd", $hwnd)
  4104.     If @error Then Return SetError(@error, @extended, 0)
  4105.     Return $aresult[0]
  4106. EndFunc
  4107.  
  4108. Func _winapi_iswindowvisible($hwnd)
  4109.     Local $aresult = DllCall("user32.dll", "bool", "IsWindowVisible", "hwnd", $hwnd)
  4110.     If @error Then Return SetError(@error, @extended, 0)
  4111.     Return $aresult[0]
  4112. EndFunc
  4113.  
  4114. Func _winapi_invalidaterect($hwnd, $trect = 0, $ferase = True)
  4115.     Local $aresult = DllCall("user32.dll", "bool", "InvalidateRect", "hwnd", $hwnd, "struct*", $trect, "bool", $ferase)
  4116.     If @error Then Return SetError(@error, @extended, False)
  4117.     Return $aresult[0]
  4118. EndFunc
  4119.  
  4120. Func _winapi_lineto($hdc, $ix, $iy)
  4121.     Local $aresult = DllCall("gdi32.dll", "bool", "LineTo", "handle", $hdc, "int", $ix, "int", $iy)
  4122.     If @error Then Return SetError(@error, @extended, False)
  4123.     Return $aresult[0]
  4124. EndFunc
  4125.  
  4126. Func _winapi_loadbitmap($hinstance, $sbitmap)
  4127.     Local $sbitmaptype = "int"
  4128.     If IsString($sbitmap) Then $sbitmaptype = "wstr"
  4129.     Local $aresult = DllCall("user32.dll", "handle", "LoadBitmapW", "handle", $hinstance, $sbitmaptype, $sbitmap)
  4130.     If @error Then Return SetError(@error, @extended, 0)
  4131.     Return $aresult[0]
  4132. EndFunc
  4133.  
  4134. Func _winapi_loadimage($hinstance, $simage, $itype, $ixdesired, $iydesired, $iload)
  4135.     Local $aresult, $simagetype = "int"
  4136.     If IsString($simage) Then $simagetype = "wstr"
  4137.     $aresult = DllCall("user32.dll", "handle", "LoadImageW", "handle", $hinstance, $simagetype, $simage, "uint", $itype, "int", $ixdesired, "int", $iydesired, "uint", $iload)
  4138.     If @error Then Return SetError(@error, @extended, 0)
  4139.     Return $aresult[0]
  4140. EndFunc
  4141.  
  4142. Func _winapi_loadlibrary($sfilename)
  4143.     Local $aresult = DllCall("kernel32.dll", "handle", "LoadLibraryW", "wstr", $sfilename)
  4144.     If @error Then Return SetError(@error, @extended, 0)
  4145.     Return $aresult[0]
  4146. EndFunc
  4147.  
  4148. Func _winapi_loadlibraryex($sfilename, $iflags = 0)
  4149.     Local $aresult = DllCall("kernel32.dll", "handle", "LoadLibraryExW", "wstr", $sfilename, "ptr", 0, "dword", $iflags)
  4150.     If @error Then Return SetError(@error, @extended, 0)
  4151.     Return $aresult[0]
  4152. EndFunc
  4153.  
  4154. Func _winapi_loadshell32icon($iiconid)
  4155.     Local $ticons = DllStructCreate("ptr Data")
  4156.     Local $iicons = _winapi_extracticonex("shell32.dll", $iiconid, 0, $ticons, 1)
  4157.     If @error Then Return SetError(@error, @extended, 0)
  4158.     If $iicons <= 0 Then Return SetError(10, 0, 0)
  4159.     Return DllStructGetData($ticons, "Data")
  4160. EndFunc
  4161.  
  4162. Func _winapi_loadstring($hinstance, $istringid)
  4163.     Local $aresult = DllCall("user32.dll", "int", "LoadStringW", "handle", $hinstance, "uint", $istringid, "wstr", "", "int", 4096)
  4164.     If @error OR NOT $aresult[0] Then Return SetError(@error + 10, @extended, "")
  4165.     Return SetExtended($aresult[0], $aresult[3])
  4166. EndFunc
  4167.  
  4168. Func _winapi_localfree($hmem)
  4169.     Local $aresult = DllCall("kernel32.dll", "handle", "LocalFree", "handle", $hmem)
  4170.     If @error Then Return SetError(@error, @extended, False)
  4171.     Return $aresult[0]
  4172. EndFunc
  4173.  
  4174. Func _winapi_loword($ilong)
  4175.     Return BitAND($ilong, 65535)
  4176. EndFunc
  4177.  
  4178. Func _winapi_makelangid($lgidprimary, $lgidsub)
  4179.     Return BitOR(BitShift($lgidsub, -10), $lgidprimary)
  4180. EndFunc
  4181.  
  4182. Func _winapi_makelcid($lgid, $srtid)
  4183.     Return BitOR(BitShift($srtid, -16), $lgid)
  4184. EndFunc
  4185.  
  4186. Func _winapi_makelong($ilo, $ihi)
  4187.     Return BitOR(BitShift($ihi, -16), BitAND($ilo, 65535))
  4188. EndFunc
  4189.  
  4190. Func _winapi_makeqword($lodword, $hidword)
  4191.     Local $tint64 = DllStructCreate("uint64")
  4192.     Local $tdwords = DllStructCreate("dword;dword", DllStructGetPtr($tint64))
  4193.     DllStructSetData($tdwords, 1, $lodword)
  4194.     DllStructSetData($tdwords, 2, $hidword)
  4195.     Return DllStructGetData($tint64, 1)
  4196. EndFunc
  4197.  
  4198. Func _winapi_messagebeep($itype = 1)
  4199.     Local $isound
  4200.     Switch $itype
  4201.         Case 1
  4202.             $isound = 0
  4203.         Case 2
  4204.             $isound = 16
  4205.         Case 3
  4206.             $isound = 32
  4207.         Case 4
  4208.             $isound = 48
  4209.         Case 5
  4210.             $isound = 64
  4211.         Case Else
  4212.             $isound = -1
  4213.     EndSwitch
  4214.     Local $aresult = DllCall("user32.dll", "bool", "MessageBeep", "uint", $isound)
  4215.     If @error Then Return SetError(@error, @extended, False)
  4216.     Return $aresult[0]
  4217. EndFunc
  4218.  
  4219. Func _winapi_msgbox($iflags, $stitle, $stext)
  4220.     BlockInput(0)
  4221.     MsgBox($iflags, $stitle, $stext & "      ")
  4222. EndFunc
  4223.  
  4224. Func _winapi_mouse_event($iflags, $ix = 0, $iy = 0, $idata = 0, $iextrainfo = 0)
  4225.     DllCall("user32.dll", "none", "mouse_event", "dword", $iflags, "dword", $ix, "dword", $iy, "dword", $idata, "ulong_ptr", $iextrainfo)
  4226.     If @error Then Return SetError(@error, @extended)
  4227. EndFunc
  4228.  
  4229. Func _winapi_moveto($hdc, $ix, $iy)
  4230.     Local $aresult = DllCall("gdi32.dll", "bool", "MoveToEx", "handle", $hdc, "int", $ix, "int", $iy, "ptr", 0)
  4231.     If @error Then Return SetError(@error, @extended, False)
  4232.     Return $aresult[0]
  4233. EndFunc
  4234.  
  4235. Func _winapi_movewindow($hwnd, $ix, $iy, $iwidth, $iheight, $frepaint = True)
  4236.     Local $aresult = DllCall("user32.dll", "bool", "MoveWindow", "hwnd", $hwnd, "int", $ix, "int", $iy, "int", $iwidth, "int", $iheight, "bool", $frepaint)
  4237.     If @error Then Return SetError(@error, @extended, False)
  4238.     Return $aresult[0]
  4239. EndFunc
  4240.  
  4241. Func _winapi_muldiv($inumber, $inumerator, $idenominator)
  4242.     Local $aresult = DllCall("kernel32.dll", "int", "MulDiv", "int", $inumber, "int", $inumerator, "int", $idenominator)
  4243.     If @error Then Return SetError(@error, @extended, -1)
  4244.     Return $aresult[0]
  4245. EndFunc
  4246.  
  4247. Func _winapi_multibytetowidechar($stext, $icodepage = 0, $iflags = 0, $bretstring = False)
  4248.     Local $stexttype = "str"
  4249.     If NOT IsString($stext) Then $stexttype = "struct*"
  4250.     Local $aresult = DllCall("kernel32.dll", "int", "MultiByteToWideChar", "uint", $icodepage, "dword", $iflags, $stexttype, $stext, "int", -1, "ptr", 0, "int", 0)
  4251.     If @error OR NOT $aresult[0] Then Return SetError(@error + 10, @extended, 0)
  4252.     Local $iout = $aresult[0]
  4253.     Local $tout = DllStructCreate("wchar[" & $iout & "]")
  4254.     $aresult = DllCall("kernel32.dll", "int", "MultiByteToWideChar", "uint", $icodepage, "dword", $iflags, $stexttype, $stext, "int", -1, "struct*", $tout, "int", $iout)
  4255.     If @error OR NOT $aresult[0] Then Return SetError(@error + 20, @extended, 0)
  4256.     If $bretstring Then Return DllStructGetData($tout, 1)
  4257.     Return $tout
  4258. EndFunc
  4259.  
  4260. Func _winapi_multibytetowidecharex($stext, $ptext, $icodepage = 0, $iflags = 0)
  4261.     Local $aresult = DllCall("kernel32.dll", "int", "MultiByteToWideChar", "uint", $icodepage, "dword", $iflags, "STR", $stext, "int", -1, "struct*", $ptext, "int", (StringLen($stext) + 1) * 2)
  4262.     If @error Then Return SetError(@error, @extended, False)
  4263.     Return $aresult[0]
  4264. EndFunc
  4265.  
  4266. Func _winapi_openprocess($iaccess, $finherit, $iprocessid, $fdebugpriv = False)
  4267.     Local $aresult = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $iaccess, "bool", $finherit, "dword", $iprocessid)
  4268.     If @error Then Return SetError(@error, @extended, 0)
  4269.     If $aresult[0] Then Return $aresult[0]
  4270.     If NOT $fdebugpriv Then Return SetError(100, 0, 0)
  4271.     Local $htoken = _security__openthreadtokenex(BitOR($token_adjust_privileges, $token_query))
  4272.     If @error Then Return SetError(@error + 10, @extended, 0)
  4273.     _security__setprivilege($htoken, "SeDebugPrivilege", True)
  4274.     Local $ierror = @error
  4275.     Local $iextended = @extended
  4276.     Local $iret = 0
  4277.     If NOT @error Then
  4278.         $aresult = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $iaccess, "bool", $finherit, "dword", $iprocessid)
  4279.         $ierror = @error
  4280.         $iextended = @extended
  4281.         If $aresult[0] Then $iret = $aresult[0]
  4282.         _security__setprivilege($htoken, "SeDebugPrivilege", False)
  4283.         If @error Then
  4284.             $ierror = @error + 20
  4285.             $iextended = @extended
  4286.         EndIf
  4287.     Else
  4288.         $ierror = @error + 30
  4289.     EndIf
  4290.     _winapi_closehandle($htoken)
  4291.     Return SetError($ierror, $iextended, $iret)
  4292. EndFunc
  4293.  
  4294. Func __winapi_parsefiledialogpath($spath)
  4295.     Local $afiles[3]
  4296.     $afiles[0] = 2
  4297.     Local $stemp = StringMid($spath, 1, StringInStr($spath, "\", 0, -1) - 1)
  4298.     $afiles[1] = $stemp
  4299.     $afiles[2] = StringMid($spath, StringInStr($spath, "\", 0, -1) + 1)
  4300.     Return $afiles
  4301. EndFunc
  4302.  
  4303. Func _winapi_pathfindonpath(Const $szfile, $aextrapaths = "", Const $szpathdelimiter = @LF)
  4304.     Local $iextracount = 0
  4305.     If IsString($aextrapaths) Then
  4306.         If StringLen($aextrapaths) Then
  4307.             $aextrapaths = StringSplit($aextrapaths, $szpathdelimiter, 1 + 2)
  4308.             $iextracount = UBound($aextrapaths, 1)
  4309.         EndIf
  4310.     ElseIf IsArray($aextrapaths) Then
  4311.         $iextracount = UBound($aextrapaths)
  4312.     EndIf
  4313.     Local $tpaths, $tpathptrs
  4314.     If $iextracount Then
  4315.         Local $szstruct = ""
  4316.         For $path In $aextrapaths
  4317.             $szstruct &= "wchar[" & StringLen($path) + 1 & "];"
  4318.         Next
  4319.         $tpaths = DllStructCreate($szstruct)
  4320.         $tpathptrs = DllStructCreate("ptr[" & $iextracount + 1 & "]")
  4321.         For $i = 1 To $iextracount
  4322.             DllStructSetData($tpaths, $i, $aextrapaths[$i - 1])
  4323.             DllStructSetData($tpathptrs, 1, DllStructGetPtr($tpaths, $i), $i)
  4324.         Next
  4325.         DllStructSetData($tpathptrs, 1, Ptr(0), $iextracount + 1)
  4326.     EndIf
  4327.     Local $aresult = DllCall("shlwapi.dll", "bool", "PathFindOnPathW", "wstr", $szfile, "struct*", $tpathptrs)
  4328.     If @error OR NOT $aresult[0] Then Return SetError(@error + 10, @extended, $szfile)
  4329.     Return $aresult[1]
  4330. EndFunc
  4331.  
  4332. Func _winapi_pointfromrect(ByRef $trect, $fcenter = True)
  4333.     Local $ix1 = DllStructGetData($trect, "Left")
  4334.     Local $iy1 = DllStructGetData($trect, "Top")
  4335.     Local $ix2 = DllStructGetData($trect, "Right")
  4336.     Local $iy2 = DllStructGetData($trect, "Bottom")
  4337.     If $fcenter Then
  4338.         $ix1 = $ix1 + (($ix2 - $ix1) / 2)
  4339.         $iy1 = $iy1 + (($iy2 - $iy1) / 2)
  4340.     EndIf
  4341.     Local $tpoint = DllStructCreate($tagpoint)
  4342.     DllStructSetData($tpoint, "X", $ix1)
  4343.     DllStructSetData($tpoint, "Y", $iy1)
  4344.     Return $tpoint
  4345. EndFunc
  4346.  
  4347. Func _winapi_postmessage($hwnd, $imsg, $iwparam, $ilparam)
  4348.     Local $aresult = DllCall("user32.dll", "bool", "PostMessage", "hwnd", $hwnd, "uint", $imsg, "wparam", $iwparam, "lparam", $ilparam)
  4349.     If @error Then Return SetError(@error, @extended, False)
  4350.     Return $aresult[0]
  4351. EndFunc
  4352.  
  4353. Func _winapi_primarylangid($lgid)
  4354.     Return BitAND($lgid, 1023)
  4355. EndFunc
  4356.  
  4357. Func _winapi_ptinrect(ByRef $trect, ByRef $tpoint)
  4358.     Local $aresult = DllCall("user32.dll", "bool", "PtInRect", "struct*", $trect, "struct", $tpoint)
  4359.     If @error Then Return SetError(@error, @extended, False)
  4360.     Return $aresult[0]
  4361. EndFunc
  4362.  
  4363. Func _winapi_readfile($hfile, $pbuffer, $itoread, ByRef $iread, $poverlapped = 0)
  4364.     Local $aresult = DllCall("kernel32.dll", "bool", "ReadFile", "handle", $hfile, "ptr", $pbuffer, "dword", $itoread, "dword*", 0, "ptr", $poverlapped)
  4365.     If @error Then Return SetError(@error, @extended, False)
  4366.     $iread = $aresult[4]
  4367.     Return $aresult[0]
  4368. EndFunc
  4369.  
  4370. Func _winapi_readprocessmemory($hprocess, $pbaseaddress, $pbuffer, $isize, ByRef $iread)
  4371.     Local $aresult = DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $hprocess, "ptr", $pbaseaddress, "ptr", $pbuffer, "ulong_ptr", $isize, "ulong_ptr*", 0)
  4372.     If @error Then Return SetError(@error, @extended, False)
  4373.     $iread = $aresult[5]
  4374.     Return $aresult[0]
  4375. EndFunc
  4376.  
  4377. Func _winapi_rectisempty(ByRef $trect)
  4378.     Return (DllStructGetData($trect, "Left") = 0) AND (DllStructGetData($trect, "Top") = 0) AND (DllStructGetData($trect, "Right") = 0) AND (DllStructGetData($trect, "Bottom") = 0)
  4379. EndFunc
  4380.  
  4381. Func _winapi_redrawwindow($hwnd, $trect = 0, $hregion = 0, $iflags = 5)
  4382.     Local $aresult = DllCall("user32.dll", "bool", "RedrawWindow", "hwnd", $hwnd, "struct*", $trect, "handle", $hregion, "uint", $iflags)
  4383.     If @error Then Return SetError(@error, @extended, False)
  4384.     Return $aresult[0]
  4385. EndFunc
  4386.  
  4387. Func _winapi_registerwindowmessage($smessage)
  4388.     Local $aresult = DllCall("user32.dll", "uint", "RegisterWindowMessageW", "wstr", $smessage)
  4389.     If @error Then Return SetError(@error, @extended, 0)
  4390.     Return $aresult[0]
  4391. EndFunc
  4392.  
  4393. Func _winapi_releasecapture()
  4394.     Local $aresult = DllCall("user32.dll", "bool", "ReleaseCapture")
  4395.     If @error Then Return SetError(@error, @extended, False)
  4396.     Return $aresult[0]
  4397. EndFunc
  4398.  
  4399. Func _winapi_releasedc($hwnd, $hdc)
  4400.     Local $aresult = DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $hwnd, "handle", $hdc)
  4401.     If @error Then Return SetError(@error, @extended, False)
  4402.     Return $aresult[0]
  4403. EndFunc
  4404.  
  4405. Func _winapi_screentoclient($hwnd, ByRef $tpoint)
  4406.     Local $aresult = DllCall("user32.dll", "bool", "ScreenToClient", "hwnd", $hwnd, "struct*", $tpoint)
  4407.     If @error Then Return SetError(@error, @extended, False)
  4408.     Return $aresult[0]
  4409. EndFunc
  4410.  
  4411. Func _winapi_selectobject($hdc, $hgdiobj)
  4412.     Local $aresult = DllCall("gdi32.dll", "handle", "SelectObject", "handle", $hdc, "handle", $hgdiobj)
  4413.     If @error Then Return SetError(@error, @extended, False)
  4414.     Return $aresult[0]
  4415. EndFunc
  4416.  
  4417. Func _winapi_setbkcolor($hdc, $icolor)
  4418.     Local $aresult = DllCall("gdi32.dll", "INT", "SetBkColor", "handle", $hdc, "INT", $icolor)
  4419.     If @error Then Return SetError(@error, @extended, -1)
  4420.     Return $aresult[0]
  4421. EndFunc
  4422.  
  4423. Func _winapi_setbkmode($hdc, $ibkmode)
  4424.     Local $aresult = DllCall("gdi32.dll", "int", "SetBkMode", "handle", $hdc, "int", $ibkmode)
  4425.     If @error Then Return SetError(@error, @extended, 0)
  4426.     Return $aresult[0]
  4427. EndFunc
  4428.  
  4429. Func _winapi_setcapture($hwnd)
  4430.     Local $aresult = DllCall("user32.dll", "hwnd", "SetCapture", "hwnd", $hwnd)
  4431.     If @error Then Return SetError(@error, @extended, 0)
  4432.     Return $aresult[0]
  4433. EndFunc
  4434.  
  4435. Func _winapi_setcursor($hcursor)
  4436.     Local $aresult = DllCall("user32.dll", "handle", "SetCursor", "handle", $hcursor)
  4437.     If @error Then Return SetError(@error, @extended, 0)
  4438.     Return $aresult[0]
  4439. EndFunc
  4440.  
  4441. Func _winapi_setdefaultprinter($sprinter)
  4442.     Local $aresult = DllCall("winspool.drv", "bool", "SetDefaultPrinterW", "wstr", $sprinter)
  4443.     If @error Then Return SetError(@error, @extended, False)
  4444.     Return $aresult[0]
  4445. EndFunc
  4446.  
  4447. Func _winapi_setdibits($hdc, $hbmp, $istartscan, $iscanlines, $pbits, $pbmi, $icoloruse = 0)
  4448.     Local $aresult = DllCall("gdi32.dll", "int", "SetDIBits", "handle", $hdc, "handle", $hbmp, "uint", $istartscan, "uint", $iscanlines, "ptr", $pbits, "ptr", $pbmi, "INT", $icoloruse)
  4449.     If @error Then Return SetError(@error, @extended, False)
  4450.     Return $aresult[0]
  4451. EndFunc
  4452.  
  4453. Func _winapi_setendoffile($hfile)
  4454.     Local $aresult = DllCall("kernel32.dll", "bool", "SetEndOfFile", "handle", $hfile)
  4455.     If @error Then Return SetError(@error, @extended, False)
  4456.     Return $aresult[0]
  4457. EndFunc
  4458.  
  4459. Func _winapi_setevent($hevent)
  4460.     Local $aresult = DllCall("kernel32.dll", "bool", "SetEvent", "handle", $hevent)
  4461.     If @error Then Return SetError(@error, @extended, False)
  4462.     Return $aresult[0]
  4463. EndFunc
  4464.  
  4465. Func _winapi_setfilepointer($hfile, $ipos, $imethod = 0)
  4466.     Local $aresult = DllCall("kernel32.dll", "INT", "SetFilePointer", "handle", $hfile, "long", $ipos, "ptr", 0, "long", $imethod)
  4467.     If @error Then Return SetError(@error, @extended, -1)
  4468.     Return $aresult[0]
  4469. EndFunc
  4470.  
  4471. Func _winapi_setfocus($hwnd)
  4472.     Local $aresult = DllCall("user32.dll", "hwnd", "SetFocus", "hwnd", $hwnd)
  4473.     If @error Then Return SetError(@error, @extended, 0)
  4474.     Return $aresult[0]
  4475. EndFunc
  4476.  
  4477. Func _winapi_setfont($hwnd, $hfont, $fredraw = True)
  4478.     _sendmessage($hwnd, $__winapiconstant_wm_setfont, $hfont, $fredraw, 0, "hwnd")
  4479. EndFunc
  4480.  
  4481. Func _winapi_sethandleinformation($hobject, $imask, $iflags)
  4482.     Local $aresult = DllCall("kernel32.dll", "bool", "SetHandleInformation", "handle", $hobject, "dword", $imask, "dword", $iflags)
  4483.     If @error Then Return SetError(@error, @extended, False)
  4484.     Return $aresult[0]
  4485. EndFunc
  4486.  
  4487. Func _winapi_setlayeredwindowattributes($hwnd, $i_transcolor, $transparency = 255, $dwflags = 3, $iscolorref = False)
  4488.     If $dwflags = Default OR $dwflags = "" OR $dwflags < 0 Then $dwflags = 3
  4489.     If NOT $iscolorref Then
  4490.         $i_transcolor = Int(BinaryMid($i_transcolor, 3, 1) & BinaryMid($i_transcolor, 2, 1) & BinaryMid($i_transcolor, 1, 1))
  4491.     EndIf
  4492.     Local $aresult = DllCall("user32.dll", "bool", "SetLayeredWindowAttributes", "hwnd", $hwnd, "INT", $i_transcolor, "byte", $transparency, "dword", $dwflags)
  4493.     If @error Then Return SetError(@error, @extended, False)
  4494.     Return $aresult[0]
  4495. EndFunc
  4496.  
  4497. Func _winapi_setparent($hwndchild, $hwndparent)
  4498.     Local $aresult = DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $hwndchild, "hwnd", $hwndparent)
  4499.     If @error Then Return SetError(@error, @extended, 0)
  4500.     Return $aresult[0]
  4501. EndFunc
  4502.  
  4503. Func _winapi_setprocessaffinitymask($hprocess, $imask)
  4504.     Local $aresult = DllCall("kernel32.dll", "bool", "SetProcessAffinityMask", "handle", $hprocess, "ulong_ptr", $imask)
  4505.     If @error Then Return SetError(@error, @extended, False)
  4506.     Return $aresult[0]
  4507. EndFunc
  4508.  
  4509. Func _winapi_setsyscolors($velements, $vcolors)
  4510.     Local $isearray = IsArray($velements), $iscarray = IsArray($vcolors)
  4511.     Local $ielementnum
  4512.     If NOT $iscarray AND NOT $isearray Then
  4513.         $ielementnum = 1
  4514.     ElseIf $iscarray OR $isearray Then
  4515.         If NOT $iscarray OR NOT $isearray Then Return SetError(-1, -1, False)
  4516.         If UBound($velements) <> UBound($vcolors) Then Return SetError(-1, -1, False)
  4517.         $ielementnum = UBound($velements)
  4518.     EndIf
  4519.     Local $telements = DllStructCreate("int Element[" & $ielementnum & "]")
  4520.     Local $tcolors = DllStructCreate("INT NewColor[" & $ielementnum & "]")
  4521.     If NOT $isearray Then
  4522.         DllStructSetData($telements, "Element", $velements, 1)
  4523.     Else
  4524.         For $x = 0 To $ielementnum - 1
  4525.             DllStructSetData($telements, "Element", $velements[$x], $x + 1)
  4526.         Next
  4527.     EndIf
  4528.     If NOT $iscarray Then
  4529.         DllStructSetData($tcolors, "NewColor", $vcolors, 1)
  4530.     Else
  4531.         For $x = 0 To $ielementnum - 1
  4532.             DllStructSetData($tcolors, "NewColor", $vcolors[$x], $x + 1)
  4533.         Next
  4534.     EndIf
  4535.     Local $aresult = DllCall("user32.dll", "bool", "SetSysColors", "int", $ielementnum, "struct*", $telements, "struct*", $tcolors)
  4536.     If @error Then Return SetError(@error, @extended, False)
  4537.     Return $aresult[0]
  4538. EndFunc
  4539.  
  4540. Func _winapi_settextcolor($hdc, $icolor)
  4541.     Local $aresult = DllCall("gdi32.dll", "INT", "SetTextColor", "handle", $hdc, "INT", $icolor)
  4542.     If @error Then Return SetError(@error, @extended, -1)
  4543.     Return $aresult[0]
  4544. EndFunc
  4545.  
  4546. Func _winapi_setwindowlong($hwnd, $iindex, $ivalue)
  4547.     _winapi_setlasterror(0)
  4548.     Local $sfuncname = "SetWindowLongW"
  4549.     If @AutoItX64 Then $sfuncname = "SetWindowLongPtrW"
  4550.     Local $aresult = DllCall("user32.dll", "long_ptr", $sfuncname, "hwnd", $hwnd, "int", $iindex, "long_ptr", $ivalue)
  4551.     If @error Then Return SetError(@error, @extended, 0)
  4552.     Return $aresult[0]
  4553. EndFunc
  4554.  
  4555. Func _winapi_setwindowplacement($hwnd, $pwindowplacement)
  4556.     Local $aresult = DllCall("user32.dll", "bool", "SetWindowPlacement", "hwnd", $hwnd, "ptr", $pwindowplacement)
  4557.     If @error Then Return SetError(@error, @extended, False)
  4558.     Return $aresult[0]
  4559. EndFunc
  4560.  
  4561. Func _winapi_setwindowpos($hwnd, $hafter, $ix, $iy, $icx, $icy, $iflags)
  4562.     Local $aresult = DllCall("user32.dll", "bool", "SetWindowPos", "hwnd", $hwnd, "hwnd", $hafter, "int", $ix, "int", $iy, "int", $icx, "int", $icy, "uint", $iflags)
  4563.     If @error Then Return SetError(@error, @extended, False)
  4564.     Return $aresult[0]
  4565. EndFunc
  4566.  
  4567. Func _winapi_setwindowrgn($hwnd, $hrgn, $bredraw = True)
  4568.     Local $aresult = DllCall("user32.dll", "int", "SetWindowRgn", "hwnd", $hwnd, "handle", $hrgn, "bool", $bredraw)
  4569.     If @error Then Return SetError(@error, @extended, False)
  4570.     Return $aresult[0]
  4571. EndFunc
  4572.  
  4573. Func _winapi_setwindowshookex($idhook, $lpfn, $hmod, $dwthreadid = 0)
  4574.     Local $aresult = DllCall("user32.dll", "handle", "SetWindowsHookEx", "int", $idhook, "ptr", $lpfn, "handle", $hmod, "dword", $dwthreadid)
  4575.     If @error Then Return SetError(@error, @extended, 0)
  4576.     Return $aresult[0]
  4577. EndFunc
  4578.  
  4579. Func _winapi_setwindowtext($hwnd, $stext)
  4580.     Local $aresult = DllCall("user32.dll", "bool", "SetWindowTextW", "hwnd", $hwnd, "wstr", $stext)
  4581.     If @error Then Return SetError(@error, @extended, False)
  4582.     Return $aresult[0]
  4583. EndFunc
  4584.  
  4585. Func _winapi_showcursor($fshow)
  4586.     Local $aresult = DllCall("user32.dll", "int", "ShowCursor", "bool", $fshow)
  4587.     If @error Then Return SetError(@error, @extended, 0)
  4588.     Return $aresult[0]
  4589. EndFunc
  4590.  
  4591. Func _winapi_showerror($stext, $fexit = True)
  4592.     _winapi_msgbox(266256, "Error", $stext)
  4593.     If $fexit Then Exit
  4594. EndFunc
  4595.  
  4596. Func _winapi_showmsg($stext)
  4597.     _winapi_msgbox(64 + 4096, "Information", $stext)
  4598. EndFunc
  4599.  
  4600. Func _winapi_showwindow($hwnd, $icmdshow = 5)
  4601.     Local $aresult = DllCall("user32.dll", "bool", "ShowWindow", "hwnd", $hwnd, "int", $icmdshow)
  4602.     If @error Then Return SetError(@error, @extended, False)
  4603.     Return $aresult[0]
  4604. EndFunc
  4605.  
  4606. Func _winapi_stringfromguid($pguid)
  4607.     Local $aresult = DllCall("ole32.dll", "int", "StringFromGUID2", "struct*", $pguid, "wstr", "", "int", 40)
  4608.     If @error OR NOT $aresult[0] Then Return SetError(@error, @extended, "")
  4609.     Return SetExtended($aresult[0], $aresult[2])
  4610. EndFunc
  4611.  
  4612. Func _winapi_stringlena($tstring)
  4613.     Local $aresult = DllCall("kernel32.dll", "int", "lstrlenA", "struct*", $tstring)
  4614.     If @error Then Return SetError(@error, @extended, 0)
  4615.     Return $aresult[0]
  4616. EndFunc
  4617.  
  4618. Func _winapi_stringlenw(Const ByRef $tstring)
  4619.     Local $aresult = DllCall("kernel32.dll", "int", "lstrlenW", "struct*", $tstring)
  4620.     If @error Then Return SetError(@error, @extended, 0)
  4621.     Return $aresult[0]
  4622. EndFunc
  4623.  
  4624. Func _winapi_sublangid($lgid)
  4625.     Return BitShift($lgid, 10)
  4626. EndFunc
  4627.  
  4628. Func _winapi_systemparametersinfo($iaction, $iparam = 0, $vparam = 0, $iwinini = 0)
  4629.     Local $aresult = DllCall("user32.dll", "bool", "SystemParametersInfoW", "uint", $iaction, "uint", $iparam, "ptr", $vparam, "uint", $iwinini)
  4630.     If @error Then Return SetError(@error, @extended, False)
  4631.     Return $aresult[0]
  4632. EndFunc
  4633.  
  4634. Func _winapi_twipsperpixelx()
  4635.     Local $lngdc, $twipsperpixelx
  4636.     $lngdc = _winapi_getdc(0)
  4637.     $twipsperpixelx = 1440 / _winapi_getdevicecaps($lngdc, $__winapiconstant_logpixelsx)
  4638.     _winapi_releasedc(0, $lngdc)
  4639.     Return $twipsperpixelx
  4640. EndFunc
  4641.  
  4642. Func _winapi_twipsperpixely()
  4643.     Local $lngdc, $twipsperpixely
  4644.     $lngdc = _winapi_getdc(0)
  4645.     $twipsperpixely = 1440 / _winapi_getdevicecaps($lngdc, $__winapiconstant_logpixelsy)
  4646.     _winapi_releasedc(0, $lngdc)
  4647.     Return $twipsperpixely
  4648. EndFunc
  4649.  
  4650. Func _winapi_unhookwindowshookex($hhk)
  4651.     Local $aresult = DllCall("user32.dll", "bool", "UnhookWindowsHookEx", "handle", $hhk)
  4652.     If @error Then Return SetError(@error, @extended, False)
  4653.     Return $aresult[0]
  4654. EndFunc
  4655.  
  4656. Func _winapi_updatelayeredwindow($hwnd, $hdcdest, $pptdest, $psize, $hdcsrce, $pptsrce, $irgb, $pblend, $iflags)
  4657.     Local $aresult = DllCall("user32.dll", "bool", "UpdateLayeredWindow", "hwnd", $hwnd, "handle", $hdcdest, "ptr", $pptdest, "ptr", $psize, "handle", $hdcsrce, "ptr", $pptsrce, "dword", $irgb, "ptr", $pblend, "dword", $iflags)
  4658.     If @error Then Return SetError(@error, @extended, False)
  4659.     Return $aresult[0]
  4660. EndFunc
  4661.  
  4662. Func _winapi_updatewindow($hwnd)
  4663.     Local $aresult = DllCall("user32.dll", "bool", "UpdateWindow", "hwnd", $hwnd)
  4664.     If @error Then Return SetError(@error, @extended, False)
  4665.     Return $aresult[0]
  4666. EndFunc
  4667.  
  4668. Func _winapi_waitforinputidle($hprocess, $itimeout = -1)
  4669.     Local $aresult = DllCall("user32.dll", "dword", "WaitForInputIdle", "handle", $hprocess, "dword", $itimeout)
  4670.     If @error Then Return SetError(@error, @extended, False)
  4671.     Return $aresult[0]
  4672. EndFunc
  4673.  
  4674. Func _winapi_waitformultipleobjects($icount, $phandles, $fwaitall = False, $itimeout = -1)
  4675.     Local $aresult = DllCall("kernel32.dll", "INT", "WaitForMultipleObjects", "dword", $icount, "ptr", $phandles, "bool", $fwaitall, "dword", $itimeout)
  4676.     If @error Then Return SetError(@error, @extended, -1)
  4677.     Return $aresult[0]
  4678. EndFunc
  4679.  
  4680. Func _winapi_waitforsingleobject($hhandle, $itimeout = -1)
  4681.     Local $aresult = DllCall("kernel32.dll", "INT", "WaitForSingleObject", "handle", $hhandle, "dword", $itimeout)
  4682.     If @error Then Return SetError(@error, @extended, -1)
  4683.     Return $aresult[0]
  4684. EndFunc
  4685.  
  4686. Func _winapi_widechartomultibyte($punicode, $icodepage = 0, $bretstring = True)
  4687.     Local $sunicodetype = "wstr"
  4688.     If NOT IsString($punicode) Then $sunicodetype = "struct*"
  4689.     Local $aresult = DllCall("kernel32.dll", "int", "WideCharToMultiByte", "uint", $icodepage, "dword", 0, $sunicodetype, $punicode, "int", -1, "ptr", 0, "int", 0, "ptr", 0, "ptr", 0)
  4690.     If @error OR NOT $aresult[0] Then Return SetError(@error + 20, @extended, "")
  4691.     Local $tmultibyte = DllStructCreate("char[" & $aresult[0] & "]")
  4692.     $aresult = DllCall("kernel32.dll", "int", "WideCharToMultiByte", "uint", $icodepage, "dword", 0, $sunicodetype, $punicode, "int", -1, "struct*", $tmultibyte, "int", $aresult[0], "ptr", 0, "ptr", 0)
  4693.     If @error OR NOT $aresult[0] Then Return SetError(@error + 10, @extended, "")
  4694.     If $bretstring Then Return DllStructGetData($tmultibyte, 1)
  4695.     Return $tmultibyte
  4696. EndFunc
  4697.  
  4698. Func _winapi_windowfrompoint(ByRef $tpoint)
  4699.     Local $aresult = DllCall("user32.dll", "hwnd", "WindowFromPoint", "struct", $tpoint)
  4700.     If @error Then Return SetError(@error, @extended, 0)
  4701.     Return $aresult[0]
  4702. EndFunc
  4703.  
  4704. Func _winapi_writeconsole($hconsole, $stext)
  4705.     Local $aresult = DllCall("kernel32.dll", "bool", "WriteConsoleW", "handle", $hconsole, "wstr", $stext, "dword", StringLen($stext), "dword*", 0, "ptr", 0)
  4706.     If @error Then Return SetError(@error, @extended, False)
  4707.     Return $aresult[0]
  4708. EndFunc
  4709.  
  4710. Func _winapi_writefile($hfile, $pbuffer, $itowrite, ByRef $iwritten, $poverlapped = 0)
  4711.     Local $aresult = DllCall("kernel32.dll", "bool", "WriteFile", "handle", $hfile, "ptr", $pbuffer, "dword", $itowrite, "dword*", 0, "ptr", $poverlapped)
  4712.     If @error Then Return SetError(@error, @extended, False)
  4713.     $iwritten = $aresult[4]
  4714.     Return $aresult[0]
  4715. EndFunc
  4716.  
  4717. Func _winapi_writeprocessmemory($hprocess, $pbaseaddress, $pbuffer, $isize, ByRef $iwritten, $sbuffer = "ptr")
  4718.     Local $aresult = DllCall("kernel32.dll", "bool", "WriteProcessMemory", "handle", $hprocess, "ptr", $pbaseaddress, $sbuffer, $pbuffer, "ulong_ptr", $isize, "ulong_ptr*", 0)
  4719.     If @error Then Return SetError(@error, @extended, False)
  4720.     $iwritten = $aresult[5]
  4721.     Return $aresult[0]
  4722. EndFunc
  4723.  
  4724. Global Const $_udf_globalids_offset = 2
  4725. Global Const $_udf_globalid_max_win = 16
  4726. Global Const $_udf_startid = 10000
  4727. Global Const $_udf_globalid_max_ids = 55535
  4728. Global Const $__udfguiconstant_ws_tabstop = 65536
  4729. Global Const $__udfguiconstant_ws_visible = 268435456
  4730. Global Const $__udfguiconstant_ws_child = 1073741824
  4731. Global $_udf_globalids_used[$_udf_globalid_max_win][$_udf_globalid_max_ids + $_udf_globalids_offset + 1]
  4732.  
  4733. Func __udf_getnextglobalid($hwnd)
  4734.     Local $nctrlid, $iusedindex = -1, $fallused = True
  4735.     If NOT WinExists($hwnd) Then Return SetError(-1, -1, 0)
  4736.     For $iindex = 0 To $_udf_globalid_max_win - 1
  4737.         If $_udf_globalids_used[$iindex][0] <> 0 Then
  4738.             If NOT WinExists($_udf_globalids_used[$iindex][0]) Then
  4739.                 For $x = 0 To UBound($_udf_globalids_used, 2) - 1
  4740.                     $_udf_globalids_used[$iindex][$x] = 0
  4741.                 Next
  4742.                 $_udf_globalids_used[$iindex][1] = $_udf_startid
  4743.                 $fallused = False
  4744.             EndIf
  4745.         EndIf
  4746.     Next
  4747.     For $iindex = 0 To $_udf_globalid_max_win - 1
  4748.         If $_udf_globalids_used[$iindex][0] = $hwnd Then
  4749.             $iusedindex = $iindex
  4750.             ExitLoop
  4751.         EndIf
  4752.     Next
  4753.     If $iusedindex = -1 Then
  4754.         For $iindex = 0 To $_udf_globalid_max_win - 1
  4755.             If $_udf_globalids_used[$iindex][0] = 0 Then
  4756.                 $_udf_globalids_used[$iindex][0] = $hwnd
  4757.                 $_udf_globalids_used[$iindex][1] = $_udf_startid
  4758.                 $fallused = False
  4759.                 $iusedindex = $iindex
  4760.                 ExitLoop
  4761.             EndIf
  4762.         Next
  4763.     EndIf
  4764.     If $iusedindex = -1 AND $fallused Then Return SetError(16, 0, 0)
  4765.     If $_udf_globalids_used[$iusedindex][1] = $_udf_startid + $_udf_globalid_max_ids Then
  4766.         For $iidindex = $_udf_globalids_offset To UBound($_udf_globalids_used, 2) - 1
  4767.             If $_udf_globalids_used[$iusedindex][$iidindex] = 0 Then
  4768.                 $nctrlid = ($iidindex - $_udf_globalids_offset) + 10000
  4769.                 $_udf_globalids_used[$iusedindex][$iidindex] = $nctrlid
  4770.                 Return $nctrlid
  4771.             EndIf
  4772.         Next
  4773.         Return SetError(-1, $_udf_globalid_max_ids, 0)
  4774.     EndIf
  4775.     $nctrlid = $_udf_globalids_used[$iusedindex][1]
  4776.     $_udf_globalids_used[$iusedindex][1] += 1
  4777.     $_udf_globalids_used[$iusedindex][($nctrlid - 10000) + $_udf_globalids_offset] = $nctrlid
  4778.     Return $nctrlid
  4779. EndFunc
  4780.  
  4781. Func __udf_freeglobalid($hwnd, $iglobalid)
  4782.     If $iglobalid - $_udf_startid < 0 OR $iglobalid - $_udf_startid > $_udf_globalid_max_ids Then Return SetError(-1, 0, False)
  4783.     For $iindex = 0 To $_udf_globalid_max_win - 1
  4784.         If $_udf_globalids_used[$iindex][0] = $hwnd Then
  4785.             For $x = $_udf_globalids_offset To UBound($_udf_globalids_used, 2) - 1
  4786.                 If $_udf_globalids_used[$iindex][$x] = $iglobalid Then
  4787.                     $_udf_globalids_used[$iindex][$x] = 0
  4788.                     Return True
  4789.                 EndIf
  4790.             Next
  4791.             Return SetError(-3, 0, False)
  4792.         EndIf
  4793.     Next
  4794.     Return SetError(-2, 0, False)
  4795. EndFunc
  4796.  
  4797. Func __udf_debugprint($stext, $iline = @ScriptLineNumber, $err = @error, $ext = @extended)
  4798.     ConsoleWrite("!===========================================================" & @CRLF & "+======================================================" & @CRLF & "-->Line(" & StringFormat("%04d", $iline) & "):" & @TAB & $stext & @CRLF & "+======================================================" & @CRLF)
  4799.     Return SetError($err, $ext, 1)
  4800. EndFunc
  4801.  
  4802. Func __udf_validateclassname($hwnd, $sclassnames)
  4803.     __udf_debugprint("This is for debugging only, set the debug variable to false before submitting")
  4804.     If _winapi_isclassname($hwnd, $sclassnames) Then Return True
  4805.     Local $sseparator = Opt("GUIDataSeparatorChar")
  4806.     $sclassnames = StringReplace($sclassnames, $sseparator, ",")
  4807.     __udf_debugprint("Invalid Class Type(s):" & @LF & @TAB & "Expecting Type(s): " & $sclassnames & @LF & @TAB & "Received Type : " & _winapi_getclassname($hwnd))
  4808.     Exit
  4809. EndFunc
  4810.  
  4811. Global $_ghbuttonlastwnd
  4812. Global Const $tagbutton_imagelist = "ptr ImageList;" & $tagrect & ";uint Align"
  4813. Global Const $tagbutton_splitinfo = "uint mask;handle himlGlyph;uint uSplitStyle;" & $tagsize
  4814. Global Const $__buttonconstant_classname = "Button"
  4815. Global Const $__buttonconstant_gwl_style = -16
  4816. Global Const $__buttonconstant_wm_setfont = 48
  4817. Global Const $__buttonconstant_default_gui_font = 17
  4818.  
  4819. Func _guictrlbutton_click($hwnd)
  4820.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4821.     _sendmessage($hwnd, $bm_click)
  4822. EndFunc
  4823.  
  4824. Func _guictrlbutton_create($hwnd, $stext, $ix, $iy, $iwidth, $iheight, $istyle = -1, $iexstyle = -1)
  4825.     If NOT IsHWnd($hwnd) Then
  4826.         Return SetError(1, 0, 0)
  4827.     EndIf
  4828.     If NOT IsString($stext) Then
  4829.         Return SetError(2, 0, 0)
  4830.     EndIf
  4831.     Local $iforcedstyle = BitOR($__udfguiconstant_ws_tabstop, $__udfguiconstant_ws_visible, $__udfguiconstant_ws_child, $bs_notify)
  4832.     If $istyle = -1 Then
  4833.         $istyle = $iforcedstyle
  4834.     Else
  4835.         $istyle = BitOR($istyle, $iforcedstyle)
  4836.     EndIf
  4837.     If $iexstyle = -1 Then $iexstyle = 0
  4838.     Local $nctrlid = __udf_getnextglobalid($hwnd)
  4839.     If @error Then Return SetError(@error, @extended, 0)
  4840.     Local $hbutton = _winapi_createwindowex($iexstyle, $__buttonconstant_classname, $stext, $istyle, $ix, $iy, $iwidth, $iheight, $hwnd, $nctrlid)
  4841.     _sendmessage($hbutton, $__buttonconstant_wm_setfont, _winapi_getstockobject($__buttonconstant_default_gui_font), True)
  4842.     Return $hbutton
  4843. EndFunc
  4844.  
  4845. Func _guictrlbutton_destroy(ByRef $hwnd)
  4846.     If NOT _winapi_isclassname($hwnd, $__buttonconstant_classname) Then Return SetError(2, 2, False)
  4847.     Local $destroyed = 0
  4848.     If IsHWnd($hwnd) Then
  4849.         If _winapi_inprocess($hwnd, $_ghbuttonlastwnd) Then
  4850.             Local $nctrlid = _winapi_getdlgctrlid($hwnd)
  4851.             Local $hparent = _winapi_getparent($hwnd)
  4852.             $destroyed = _winapi_destroywindow($hwnd)
  4853.             Local $iret = __udf_freeglobalid($hparent, $nctrlid)
  4854.             If NOT $iret Then
  4855.             EndIf
  4856.         Else
  4857.             Return SetError(1, 1, False)
  4858.         EndIf
  4859.     Else
  4860.         $destroyed = GUICtrlDelete($hwnd)
  4861.     EndIf
  4862.     If $destroyed Then $hwnd = 0
  4863.     Return $destroyed <> 0
  4864. EndFunc
  4865.  
  4866. Func _guictrlbutton_enable($hwnd, $fenable = True)
  4867.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4868.     If _winapi_isclassname($hwnd, $__buttonconstant_classname) Then Return _winapi_enablewindow($hwnd, $fenable) = $fenable
  4869. EndFunc
  4870.  
  4871. Func _guictrlbutton_getcheck($hwnd)
  4872.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4873.     Return _sendmessage($hwnd, $bm_getcheck)
  4874. EndFunc
  4875.  
  4876. Func _guictrlbutton_getfocus($hwnd)
  4877.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4878.     If _winapi_isclassname($hwnd, $__buttonconstant_classname) Then Return _winapi_getfocus() = $hwnd
  4879. EndFunc
  4880.  
  4881. Func _guictrlbutton_getidealsize($hwnd)
  4882.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4883.     Local $tsize = DllStructCreate($tagsize), $asize[2]
  4884.     Local $iret = _sendmessage($hwnd, $bcm_getidealsize, 0, $tsize, 0, "wparam", "struct*")
  4885.     If NOT $iret Then Return SetError(-1, -1, $asize)
  4886.     $asize[0] = DllStructGetData($tsize, "X")
  4887.     $asize[1] = DllStructGetData($tsize, "Y")
  4888.     Return $asize
  4889. EndFunc
  4890.  
  4891. Func _guictrlbutton_getimage($hwnd)
  4892.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4893.     Local $iret = _sendmessage($hwnd, $bm_getimage, 0, 0, 0, "wparam", "lparam", "hwnd")
  4894.     If $iret <> 0 Then Return $iret
  4895.     $iret = _sendmessage($hwnd, $bm_getimage, 1, 0, 0, "wparam", "lparam", "hwnd")
  4896.     If $iret = 0 Then Return 0
  4897.     Return $iret
  4898. EndFunc
  4899.  
  4900. Func _guictrlbutton_getimagelist($hwnd)
  4901.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4902.     Local $tbutton_imagelist = DllStructCreate($tagbutton_imagelist), $aimagelist[6]
  4903.     If NOT _sendmessage($hwnd, $bcm_getimagelist, 0, $tbutton_imagelist, 0, "wparam", "struct*") Then Return SetError(-1, -1, $aimagelist)
  4904.     $aimagelist[0] = DllStructGetData($tbutton_imagelist, "ImageList")
  4905.     $aimagelist[1] = DllStructGetData($tbutton_imagelist, "Left")
  4906.     $aimagelist[2] = DllStructGetData($tbutton_imagelist, "Right")
  4907.     $aimagelist[3] = DllStructGetData($tbutton_imagelist, "Top")
  4908.     $aimagelist[4] = DllStructGetData($tbutton_imagelist, "Bottom")
  4909.     $aimagelist[5] = DllStructGetData($tbutton_imagelist, "Align")
  4910.     Return $aimagelist
  4911. EndFunc
  4912.  
  4913. Func _guictrlbutton_getnote($hwnd)
  4914.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4915.     Local $ilen = _guictrlbutton_getnotelength($hwnd) + 1
  4916.     Local $tnote = DllStructCreate("wchar Note[" & $ilen & "]")
  4917.     Local $tlen = DllStructCreate("dword")
  4918.     DllStructSetData($tlen, 1, $ilen)
  4919.     If NOT _sendmessage($hwnd, $bcm_getnote, $tlen, $tnote, 0, "struct*", "struct*") Then Return SetError(-1, 0, "")
  4920.     Return _winapi_widechartomultibyte($tnote)
  4921. EndFunc
  4922.  
  4923. Func _guictrlbutton_getnotelength($hwnd)
  4924.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4925.     Return _sendmessage($hwnd, $bcm_getnotelength)
  4926. EndFunc
  4927.  
  4928. Func _guictrlbutton_getsplitinfo($hwnd)
  4929.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4930.     Local $tsplitinfo = DllStructCreate($tagbutton_splitinfo), $ainfo[4]
  4931.     DllStructSetData($tsplitinfo, "mask", BitOR($bcsif_glyph, $bcsif_image, $bcsif_size, $bcsif_style))
  4932.     If NOT _sendmessage($hwnd, $bcm_getsplitinfo, 0, $tsplitinfo, 0, "wparam", "struct*") Then Return SetError(-1, 0, $ainfo)
  4933.     $ainfo[0] = DllStructGetData($tsplitinfo, "himlGlyph")
  4934.     $ainfo[1] = DllStructGetData($tsplitinfo, "uSplitStyle")
  4935.     $ainfo[2] = DllStructGetData($tsplitinfo, "X")
  4936.     $ainfo[3] = DllStructGetData($tsplitinfo, "Y")
  4937.     Return $ainfo
  4938. EndFunc
  4939.  
  4940. Func _guictrlbutton_getstate($hwnd)
  4941.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4942.     Return _sendmessage($hwnd, $bm_getstate)
  4943. EndFunc
  4944.  
  4945. Func _guictrlbutton_gettext($hwnd)
  4946.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4947.     If _winapi_isclassname($hwnd, $__buttonconstant_classname) Then Return _winapi_getwindowtext($hwnd)
  4948.     Return ""
  4949. EndFunc
  4950.  
  4951. Func _guictrlbutton_gettextmargin($hwnd)
  4952.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4953.     Local $trect = DllStructCreate($tagrect), $arect[4]
  4954.     If NOT _sendmessage($hwnd, $bcm_gettextmargin, 0, $trect, 0, "wparam", "struct*") Then Return SetError(-1, -1, $arect)
  4955.     $arect[0] = DllStructGetData($trect, "Left")
  4956.     $arect[1] = DllStructGetData($trect, "Top")
  4957.     $arect[2] = DllStructGetData($trect, "Right")
  4958.     $arect[3] = DllStructGetData($trect, "Bottom")
  4959.     Return $arect
  4960. EndFunc
  4961.  
  4962. Func _guictrlbutton_setcheck($hwnd, $istate = $bst_checked)
  4963.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4964.     _sendmessage($hwnd, $bm_setcheck, $istate)
  4965. EndFunc
  4966.  
  4967. Func _guictrlbutton_setdontclick($hwnd, $fstate = True)
  4968.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4969.     _sendmessage($hwnd, $bm_setdontclick, $fstate)
  4970. EndFunc
  4971.  
  4972. Func _guictrlbutton_setdropdownstate($hwnd, $fstate = True)
  4973.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4974.     Return _sendmessage($hwnd, $bcm_setdropdownstate, $fstate) <> 0
  4975. EndFunc
  4976.  
  4977. Func _guictrlbutton_setfocus($hwnd, $ffocus = True)
  4978.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4979.     If _winapi_isclassname($hwnd, $__buttonconstant_classname) Then
  4980.         If $ffocus Then
  4981.             Return _winapi_setfocus($hwnd) <> 0
  4982.         Else
  4983.             Return _winapi_setfocus(_winapi_getparent($hwnd)) <> 0
  4984.         EndIf
  4985.     EndIf
  4986. EndFunc
  4987.  
  4988. Func _guictrlbutton_setimage($hwnd, $simagefile, $niconid = -1, $flarge = False)
  4989.     Local $himage, $hprevimage
  4990.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4991.     If StringUpper(StringMid($simagefile, StringLen($simagefile) - 2)) = "BMP" Then
  4992.         If BitAND(_winapi_getwindowlong($hwnd, $__buttonconstant_gwl_style), $bs_bitmap) = $bs_bitmap Then
  4993.             $himage = _winapi_loadimage(0, $simagefile, 0, 0, 0, BitOR($lr_loadfromfile, $lr_createdibsection))
  4994.             If NOT $himage Then Return SetError(-1, -1, False)
  4995.             $hprevimage = _sendmessage($hwnd, $bm_setimage, 0, $himage)
  4996.             If $hprevimage Then
  4997.                 If NOT _winapi_deleteobject($hprevimage) Then _winapi_destroyicon($hprevimage)
  4998.             EndIf
  4999.             _winapi_updatewindow($hwnd)
  5000.             Return True
  5001.         EndIf
  5002.     Else
  5003.         If $niconid = -1 Then
  5004.             $himage = _winapi_loadimage(0, $simagefile, 1, 0, 0, BitOR($lr_loadfromfile, $lr_createdibsection))
  5005.             If NOT $himage Then Return SetError(-1, -1, False)
  5006.             $hprevimage = _sendmessage($hwnd, $bm_setimage, 1, $himage)
  5007.             If $hprevimage Then
  5008.                 If NOT _winapi_deleteobject($hprevimage) Then _winapi_destroyicon($hprevimage)
  5009.             EndIf
  5010.             _winapi_updatewindow($hwnd)
  5011.             Return True
  5012.         Else
  5013.             Local $ticon = DllStructCreate("handle Handle")
  5014.             Local $iret
  5015.             If $flarge Then
  5016.                 $iret = _winapi_extracticonex($simagefile, $niconid, $ticon, 0, 1)
  5017.             Else
  5018.                 $iret = _winapi_extracticonex($simagefile, $niconid, 0, $ticon, 1)
  5019.             EndIf
  5020.             If NOT $iret Then Return SetError(-1, -1, False)
  5021.             $hprevimage = _sendmessage($hwnd, $bm_setimage, 1, DllStructGetData($ticon, "Handle"))
  5022.             If $hprevimage Then
  5023.                 If NOT _winapi_deleteobject($hprevimage) Then _winapi_destroyicon($hprevimage)
  5024.             EndIf
  5025.             _winapi_updatewindow($hwnd)
  5026.             Return True
  5027.         EndIf
  5028.     EndIf
  5029.     Return False
  5030. EndFunc
  5031.  
  5032. Func _guictrlbutton_setimagelist($hwnd, $himage, $nalign = 0, $ileft = 1, $itop = 1, $iright = 1, $ibottom = 1)
  5033.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5034.     If $nalign < 0 OR $nalign > 4 Then $nalign = 0
  5035.     Local $tbutton_imagelist = DllStructCreate($tagbutton_imagelist)
  5036.     DllStructSetData($tbutton_imagelist, "ImageList", $himage)
  5037.     DllStructSetData($tbutton_imagelist, "Left", $ileft)
  5038.     DllStructSetData($tbutton_imagelist, "Top", $itop)
  5039.     DllStructSetData($tbutton_imagelist, "Right", $iright)
  5040.     DllStructSetData($tbutton_imagelist, "Bottom", $ibottom)
  5041.     DllStructSetData($tbutton_imagelist, "Align", $nalign)
  5042.     Local $fenabled = _guictrlbutton_enable($hwnd, False)
  5043.     Local $iret = _sendmessage($hwnd, $bcm_setimagelist, 0, $tbutton_imagelist, 0, "wparam", "struct*") <> 0
  5044.     _guictrlbutton_enable($hwnd)
  5045.     If NOT $fenabled Then _guictrlbutton_enable($hwnd, False)
  5046.     Return $iret
  5047. EndFunc
  5048.  
  5049. Func _guictrlbutton_setnote($hwnd, $snote)
  5050.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5051.     Local $tnote = _winapi_multibytetowidechar($snote)
  5052.     Return _sendmessage($hwnd, $bcm_setnote, 0, $tnote, 0, "wparam", "struct*") <> 0
  5053. EndFunc
  5054.  
  5055. Func _guictrlbutton_setshield($hwnd, $frequired = True)
  5056.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5057.     Return _sendmessage($hwnd, $bcm_setshield, 0, $frequired) = 1
  5058. EndFunc
  5059.  
  5060. Func _guictrlbutton_setsize($hwnd, $iwidth, $iheight)
  5061.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5062.     If NOT _winapi_isclassname($hwnd, $__buttonconstant_classname) Then Return SetError(-1, -1, False)
  5063.     Local $hparent = _winapi_getparent($hwnd)
  5064.     If NOT $hparent Then Return SetError(-1, -1, False)
  5065.     Local $apos = WinGetPos($hwnd)
  5066.     If NOT IsArray($apos) Then Return SetError(-1, -1, False)
  5067.     Local $tpoint = DllStructCreate($tagpoint)
  5068.     DllStructSetData($tpoint, "X", $apos[0])
  5069.     DllStructSetData($tpoint, "Y", $apos[1])
  5070.     If NOT _winapi_screentoclient($hparent, $tpoint) Then Return SetError(-1, -1, False)
  5071.     Local $iret = WinMove($hwnd, "", DllStructGetData($tpoint, "X"), DllStructGetData($tpoint, "Y"), $iwidth, $iheight)
  5072.     Return SetError($iret - 1, $iret - 1, $iret <> 0)
  5073. EndFunc
  5074.  
  5075. Func _guictrlbutton_setsplitinfo($hwnd, $himlglyph = -1, $isplitstyle = $bcss_alignleft, $iwidth = 0, $iheight = 0)
  5076.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5077.     Local $tsplitinfo = DllStructCreate($tagbutton_splitinfo), $imask = 0
  5078.     If $himlglyph <> -1 Then
  5079.         $imask = BitOR($imask, $bcsif_glyph)
  5080.         DllStructSetData($tsplitinfo, "himlGlyph", $himlglyph)
  5081.     EndIf
  5082.     $imask = BitOR($imask, $bcsif_style)
  5083.     If BitAND($isplitstyle, $bcss_image) = $bcss_image Then $imask = BitOR($imask, $bcsif_image)
  5084.     DllStructSetData($tsplitinfo, "uSplitStyle", $isplitstyle)
  5085.     If $iwidth > 0 OR $iheight > 0 Then
  5086.         $imask = BitOR($imask, $bcsif_size)
  5087.         DllStructSetData($tsplitinfo, "X", $iwidth)
  5088.         DllStructSetData($tsplitinfo, "Y", $iheight)
  5089.     EndIf
  5090.     DllStructSetData($tsplitinfo, "mask", $imask)
  5091.     Return _sendmessage($hwnd, $bcm_setsplitinfo, 0, $tsplitinfo, 0, "wparam", "struct*") <> 0
  5092. EndFunc
  5093.  
  5094. Func _guictrlbutton_setstate($hwnd, $fhighlighted = True)
  5095.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5096.     _sendmessage($hwnd, $bm_setstate, $fhighlighted)
  5097. EndFunc
  5098.  
  5099. Func _guictrlbutton_setstyle($hwnd, $istyle)
  5100.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5101.     _sendmessage($hwnd, $bm_setstyle, $istyle, True)
  5102.     _winapi_updatewindow($hwnd)
  5103. EndFunc
  5104.  
  5105. Func _guictrlbutton_settext($hwnd, $stext)
  5106.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5107.     If _winapi_isclassname($hwnd, $__buttonconstant_classname) Then Return _winapi_setwindowtext($hwnd, $stext)
  5108. EndFunc
  5109.  
  5110. Func _guictrlbutton_settextmargin($hwnd, $ileft = 1, $itop = 1, $iright = 1, $ibottom = 1)
  5111.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5112.     Local $trect = DllStructCreate($tagrect)
  5113.     DllStructSetData($trect, "Left", $ileft)
  5114.     DllStructSetData($trect, "Top", $itop)
  5115.     DllStructSetData($trect, "Right", $iright)
  5116.     DllStructSetData($trect, "Bottom", $ibottom)
  5117.     Return _sendmessage($hwnd, $bcm_settextmargin, 0, $trect, 0, "wparam", "struct*") <> 0
  5118. EndFunc
  5119.  
  5120. Func _guictrlbutton_show($hwnd, $fshow = True)
  5121.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5122.     If _winapi_isclassname($hwnd, $__buttonconstant_classname) Then
  5123.         If $fshow Then
  5124.             Return _winapi_showwindow($hwnd, @SW_SHOW)
  5125.         Else
  5126.             Return _winapi_showwindow($hwnd, @SW_HIDE)
  5127.         EndIf
  5128.     EndIf
  5129. EndFunc
  5130.  
  5131. Global $pauseunpause
  5132. Global $unpaused
  5133. Global $delay
  5134. Global $res
  5135. $delay = 0
  5136. Opt("GUIOnEventMode", 1)
  5137. Opt("TrayMenuMode", 1)
  5138. Opt("MouseCoordMode", 2)
  5139. Opt("PixelCoordMode", 2)
  5140. Opt("SendCapslockMode", 0)
  5141. HotKeySet("{F5}", "Start")
  5142. HotKeySet("{F6}", "Pause")
  5143. HotKeySet("{F7}", "ExitScript")
  5144. HotKeySet("{NUMPAD1}", "delayplus")
  5145. HotKeySet("{NUMPAD2}", "delayminus")
  5146. #Region ### START Koda GUI section ### Form=C:\Users\BLACKFENCER\Downloads\BotStuff\CovBot\Exploit-o-bot-GUI.kxf
  5147.     $form1 = GUICreate("Exploit-o-Bot", 349, 35, 196, 131)
  5148.     $button1 = GUICtrlCreateButton("Start", 16, 5, 75, 25)
  5149.     $button2 = GUICtrlCreateButton("Exit/Stop", 96, 5, 75, 25)
  5150.     $button3 = GUICtrlCreateButton("Delay +1sec", 176, 5, 75, 25)
  5151.     $button4 = GUICtrlCreateButton("Delay -1sec", 256, 5, 75, 25)
  5152.     GUICtrlSetOnEvent($button1, "Start")
  5153.     GUICtrlSetOnEvent($button2, "ExitScript")
  5154.     GUICtrlSetOnEvent($button3, "delayplus")
  5155.     GUICtrlSetOnEvent($button4, "delayminus")
  5156.     GUISetState(@SW_SHOW)
  5157. #EndRegion ### END Koda GUI section ###
  5158.  
  5159. Func delayplus()
  5160.     $delay = $delay + 1000
  5161.     MsgBox(0, "Delay Value", "DELAY = " & $delay)
  5162. EndFunc
  5163.  
  5164. Func delayminus()
  5165.     If $delay = 0 Then
  5166.         MsgBox(0, "", "Delay can't be less than 0!")
  5167.     Else
  5168.         $delay = $delay - 1000
  5169.         MsgBox(0, "Delay Value", "DELAY = " & $delay)
  5170.     EndIf
  5171. EndFunc
  5172.  
  5173. Func pauseunpause()
  5174.     $pauseunpause = $pauseunpause * -1 + 1
  5175. EndFunc
  5176.  
  5177. Func start()
  5178.     WinActivate("Diablo III")
  5179.     MsgBox(0, "HOTKEYS INFO", "F5 = Start" & Chr(10) & "F6 = Pause" & Chr(10) & "F7 = Exit" & Chr(10) & "NUMPAD 1 = DELAY +1" & Chr(10) & "NUMPAD 2 = DELAY -1")
  5180.     $unpaused = NOT $unpaused
  5181.     routinesiege()
  5182. EndFunc
  5183.  
  5184. Global $res = WinGetClientSize("Diablo III")
  5185. $coefw = $res[0] / 1680
  5186. $coefh = $res[1] / 1050
  5187.  
  5188. Func pause()
  5189.     While 1
  5190.         Sleep(10)
  5191.     WEnd
  5192. EndFunc
  5193.  
  5194. Func exitscript()
  5195.     Exit
  5196. EndFunc
  5197.  
  5198. While 1
  5199.     Sleep(10)
  5200. WEnd
  5201.  
  5202. Func routinesiege()
  5203.     While $unpaused
  5204.         Sleep($delay)
  5205.         resumegame()
  5206.         healthbar()
  5207.         waypoint()
  5208.         healthbar()
  5209.         checkchest()
  5210.     WEnd
  5211. EndFunc
  5212.  
  5213. Func loot()
  5214.     $legcolor = PixelSearch(500 * $coefw, 300 * $coefh, 1400 * $coefw, 900 * $coefh, 16744448, 5, 3)
  5215.     If NOT @error Then
  5216.         MouseClick("left", $legcolor[0], $legcolor[1], 1, 1)
  5217.         Sleep(Random(1800, 2000, 1))
  5218.     EndIf
  5219.     $setcolor = PixelSearch(500 * $coefw, 300 * $coefh, 1400 * $coefw, 900 * $coefh, 65280, 5, 3)
  5220.     If NOT @error Then
  5221.         MouseClick("left", $setcolor[0], $setcolor[1], 1, 1)
  5222.         Sleep(Random(1800, 2000, 1))
  5223.     EndIf
  5224. EndFunc
  5225.  
  5226. Func resumegame()
  5227.     Sleep(1000)
  5228.     While 1
  5229.         PixelSearch(70 * $coefw, 470 * $coefh, 380 * $coefw, 530 * $coefh, 15968853, 2)
  5230.         If NOT @error Then
  5231.             ExitLoop
  5232.         EndIf
  5233.         Sleep(500)
  5234.     WEnd
  5235.     MouseClick("left", 250 * $coefw, 500 * $coefh, 1)
  5236. EndFunc
  5237.  
  5238. Func healthbar()
  5239.     While 1
  5240.         PixelSearch(0, 0, 100 * $coefw, 150 * $coefh, 7798784, 2)
  5241.         If NOT @error Then
  5242.             ExitLoop
  5243.         EndIf
  5244.         Sleep(500)
  5245.     WEnd
  5246. EndFunc
  5247.  
  5248. Func waypoint()
  5249.     Sleep(1000)
  5250.     Send("{M Down}")
  5251.     Sleep(100)
  5252.     Send("{M Up}")
  5253.     Sleep(1000)
  5254.     MouseClick("left", 390 * $coefw, 280 * $coefh, 1)
  5255.     Sleep(3000)
  5256. EndFunc
  5257.  
  5258. Func returnleave()
  5259.     Sleep(1000)
  5260.     Send("{T Down}")
  5261.     Sleep(100)
  5262.     Send("{T Up}")
  5263.     Sleep(6000)
  5264.     healthbar()
  5265.     Sleep(500)
  5266.     Send("{ESC Down}")
  5267.     Sleep(100)
  5268.     Send("{ESC Up}")
  5269.     Sleep(100)
  5270.     MouseClick("left", 230 * $coefw, 470 * $coefh, 1, 0)
  5271.     Sleep(2000)
  5272. EndFunc
  5273.  
  5274. Func checkchest()
  5275.     Sleep(500)
  5276.     MouseClick("left", 100 * $coefw, 450 * $coefh, 1, 0)
  5277.     Sleep(2000)
  5278.     MouseMove(640 * $coefw, 560 * $coefh, 0)
  5279.     Sleep(1000)
  5280.     $chest1 = PixelSearch(500 * $coefw, 450 * $coefh, 750 * $coefw, 700 * $coefh, 5797795, 5)
  5281.     If NOT @error Then
  5282.         MouseClick("left", $chest1[0], $chest1[1], 1)
  5283.         Sleep(2000)
  5284.         loot()
  5285.         Sleep(500)
  5286.         loot()
  5287.         returnleave()
  5288.     Else
  5289.         MouseClick("left", 740 * $coefw, 900 * $coefh, 1, 0)
  5290.         Sleep(1500)
  5291.         MouseClick("left", 740 * $coefw, 900 * $coefh, 1, 0)
  5292.         Sleep(1000)
  5293.         MouseClick("left", 680 * $coefw, 760 * $coefh, 2, 0)
  5294.         Sleep(2000)
  5295.         loot()
  5296.         Sleep(500)
  5297.         loot()
  5298.         returnleave()
  5299.     EndIf
  5300. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement