V
VitAl2013
Гость
Выполнение данной функции:
прерывается закрытием процесса auto3.exe
с криком таким:
Полный лог привести не могу так как сообщение получится длинее 25000 символов.
Код:
#include <GUIListView.au3>
Dim $result[3][3]
$result[2][2] = _normalize_double("2F4000")
_ArrayDisplay($result)
Func _normalize_double($hex)
$f_00 = False
$fhex = ""
$plus = stringleft ($hex, 2)
if $plus <= "23" then
$cplus = "3E"
ElseIf $plus >= "28" and $plus <= "2C" then
$cplus = "3F"
ElseIf $plus >= "2D" and $plus <= "3F" then
$cplus = "40"
if $plus = "2F" then
$f_00 = True
EndIf
ElseIf $plus >= "4A" and $plus <= "4C" then
$cplus = BinaryToString(Hex(Dec($cplus)+101, 2))&"3F"
ElseIf $plus = "4D" then
$cplus = BinaryToString(Hex(Dec($cplus)+104, 2))&"3F"
ElseIf $plus >= "4E" and $plus <= "53" then
$cplus = BinaryToString(Hex(Dec($cplus)+114, 2))&"3F"
ElseIf $plus >= "54" and $plus <= "57" then
$cplus = BinaryToString(Hex(Dec($cplus)+115, 2))&"3F"
ElseIf $plus >= "58" and $plus <= "59" then
$cplus = BinaryToString(Hex(Dec($cplus)+116, 2))&"3F"
ElseIf $plus >= "5A" and $plus <= "8A" then
$cplus = BinaryToString(Hex(Dec($cplus)+117, 2))&"3F"
ElseIf $plus >= "8B" and $plus <= "9F" then
$cplus = BinaryToString(Hex(Dec($cplus)-139, 2))&"40"
ElseIf $plus = "A0" then
$cplus = "1540"
ElseIf $plus = "A1" then
$cplus = "1640"
ElseIf $plus = "A2" then
$cplus = "1740"
ElseIf $plus >= "A3" and $plus <= "AF" then
$cplus = "1840"
EndIf
ConsoleWrite("1) "&$cplus&@CRLF)
if StringLen($hex)>14 then
ConsoleWrite("2) "&$hex&@CRLF)
$hex = StringRight($hex, 14)
ConsoleWrite("3) "&$hex&@CRLF)
EndIf
For $i = StringLen($hex) - 1 To 3 Step -2
$fhex &= StringMid($hex, $i, 2)
Next
ConsoleWrite("4) "&$fhex&@CRLF)
$fhex &= $cplus
ConsoleWrite("5) "&$fhex&@CRLF)
if StringLen($fhex)<=16 then
if $f_00 then
for $a = 16-StringLen($fhex) to 2 step -2
$fhex = Stringleft($fhex, 2)&$fhex
ConsoleWrite("5.1) "&$fhex &" Length:"&stringlen($fhex)& @CR); проверить тут
next
else
for $a = 16-StringLen($fhex) to 1 step -1
$fhex = "0"&$fhex
next
EndIf
$fhex = "0x"&$fhex
else
ConsoleWrite("It's bigger than 16 digits" & @CR)
$fhex = ""
endif
ConsoleWrite("6) "&$fhex&@CRLF)
$result = _Decode($fhex)
ConsoleWrite("7) "&$result&@CRLF)
if $hex = "07" then
$result = 0.001
ElseIf $hex = "09" then
$result = 0.005
ElseIf $hex = "0A" then
$result = 0.01
ElseIf $hex = "0D" then
$result = 0.25
ElseIf $hex = "0E" then
$result = 0.5
ElseIf $hex = "0F" then
$result = 1
ElseIf $hex = "18" then
$result = "0"
ElseIf $hex = "000C9A" then
$result = "0,1"
EndIf
return $result
EndFunc
Func _Decode($bValue)
$bValue = Binary($bValue)
Local $tStruct1, $tStruct2
ConsoleWrite("8) "&$bValue&@CRLF)
$tStruct1 = DllStructCreate('uint64')
ConsoleWrite("9) "&$tStruct1&@CRLF)
DllStructSetData($tStruct1, 1, $bValue)
$tStruct2 = DllStructCreate('double', DllStructGetPtr($tStruct1))
ConsoleWrite("10) "&$tStruct2&@CRLF)
Return DllStructGetData($tStruct2, 1)
EndFunc
прерывается закрытием процесса auto3.exe
с криком таким:
Код:
AppName: autoit3.exe AppVer: 3.3.6.0 ModName: autoit3.exe
ModVer: 3.3.6.0 Offset: 00008a0a