FileReadAsHex
function FileReadAsHex(FileName: string; Offset: int64; Count: integer): string;
This function reads a portion of a file and returns its hexadecimal contents as string. All chars in the result string are CAPITAL.
Parameters
FileName |
The fully qualified file name of the file to be read. Ex: 'C:\Documents\MyPhoto.jpg' |
Offset |
The position in the file where you want to start reading from |
Count |
The number of bytes you want to read starting from Offset position |
Return value
String |
The portion of the file that has been read, in hex format. Ex: reading the first 2 bytes of a JPG image will return 'FFD8' |