Jump to content
Sign in to follow this  
krimo

lire fichier binaire hexadecimal en delphi

Recommended Posts

in fact, you can use "RAD Studio by Embarcadero" IDE:  - Edit-> Compare -> Launch Beyound Compare!!!

or you can do it yourself:

  • TFileStream (or any other) class to open 2 files
    • read bytes from files in the same offset
    • compare it
  • the idea is:
Quote

LSourceHandle  : NativeUInt; // for each file
LBuffer        : TBytes;  // for each file
//
LSourceHandle := FileOpen(MyFilename, fmOpenRead or fmShareExclusive); // open a file for reading... then you need open "2" in your case!
LBufferReaded := FileRead(LSourceHandle, LBuffer[0], LBufferSize); // read bytes from file and go...

 

// needs compare it... you use a "looping" to compare each item (byte) in each array: "LBuffer-1" and "LBuffer-2"
// read a buffer (bytes) from each file, do the looping using "buffer size", compare item (bytes) each other

 

if (LSourceHandle <> INVALID_HANDLE_VALUE) then
  FileClose(LSourceHandle); // close a file (if opened)

 

Edited by programmerdelphi2k

Share this post


Link to post

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  

×