Jump to content
Sign in to follow this  
typhoon

Little endian conversion

Recommended Posts

typhoon

Is there an easy way to read a word/dword value from a file (after opening in binary mode)? It is stored in little-endian so Dec() won't work correctly.

Share this post


Link to post
Share on other sites
ptrex

@typhoon

Maybe this can get you started.

; little endian decoder
Func LEDec($hexstring)
    Local $output = ""
    For $i = 1 To StringLen($hexstring) Step 2
        $output = StringMid($hexstring,$i,2) & $output
    Next
    Return $output
EndFunc

regards

ptrex

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×