Sign in to follow this  
Followers 0
Jon

FileOpen Raw Mode

7 posts in this topic




Coming from the man himself.

Share this post


Link to post
Share on other sites

So is it likely to be used by anyone in normal scripting circles for anything other than going "huh" when they see it in the help file? It don't see why it's there tbh (apart from bugging me when debugging the file code :shocked: )

Share this post


Link to post
Share on other sites

I was playing around with this question, and found that the output from this script, when using RAW mode is much longer.. How is that?

$Filename = FileOpenDialog("Try this on image files such as JPG","", "All Files (*.*)")
If @error Then Exit

;Read mode
$Filehandle = FileOpen($Filename,0)
$Read = FileRead($Filehandle,512)
FileClose($Filehandle)

$Split = StringSplit($Read,'')

Dim $Return
For $x = 1 to $Split[0]
    $Return &= Hex($Split[$x],2) & " "
Next

MsgBox(0, "Normal Read Mode", $Return)


; Raw read mode
$Filehandle = FileOpen($Filename,4)
$Read = FileRead($Filehandle,512)
FileClose($Filehandle)

$Split = StringSplit($Read,'')

Dim $Return
For $x = 1 to $Split[0]
    $Return &= Hex($Split[$x],2) & " "
Next

MsgBox(0, "RAW Mode", $Return)

Share this post


Link to post
Share on other sites

As Larry posted. You cannot read the eltoro boot image unless you read it raw by it's position on the disk. Other uses would be formating or forensic.

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  
Followers 0