Skip to content

FindExeSection

Find a section in the binary image.

Declaration

Source position: exeinfo.pp line 59

function FindExeSection(var e: TExeFile; const secname: shortstring; 
                       var secofs: LongInt; var seclen: LongInt)
                        : Boolean;

Arguments

Name Description
e Record representing the opened executable image.
secname Name of section that must be found.
secofs Offset of the section in the binary image.
seclen Length of the section in bytes.

Function result

True if the section was found, False if not.

Description

FindExeSection examines the binary that was opened with OpenExeFile (represented by e) and searches for the section named secname. If found, the section offset is returned in secofs and the section length (in bytes) is returned in seclen.

The function returns True if the section was found, False if not.

See also

Name Description
OpenExeFile Open an executable file.