• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

AutoIT Funcion OLE "Orden Little Endian" [By pink]

Status
Not open for further replies.

Expermicid

Leech
User
Joined
Oct 23, 2011
Messages
285
Reputation
0
Reaction score
255
Points
63
Credits
0
‎13 Years of Service‎
95%
Función que retorna el orden en que los bytes se almacenan en memoria.

Code:
>#cs -------------------------------------------------------
AutoIt Version: 3.3.8.1
Author..........: Pink
Script Function...: OLE
Uso..............: OLE("Valor")
Retorna:El Orden Little Endian de una Serie de bytes
#ce -------------------------------------------------------

;Ejemplo
; En Mi archivo visto en Un Editor Hexadecimal el Valor de l_fanew es "B8000000"
;La Funcion Retorna el Equivalente a la Vista en Memoria

Msgbox(0,"","B8000000"); Simplemente Revierte los Bytes


Func OLE($Var)
Local $len=stringlen($Var)/2
local $Array[$len+1]
local $Char
local $A=1
local $Result
for $i= 1 to $len
$Char=stringmid($Var,$A,2)
$A+=2
$Array[$i]=$Char
next
for $x = $len to 1 Step -1
$Result&=$Array[$x]
Next
Return $Result
EndFunc
Autor: Pink

 
Status
Not open for further replies.
Back
Top