Class ThunkTableBuffer
- Namespace
- AsmResolver.PE.Imports.Builder
- Assembly
- AsmResolver.PE.dll
Provides a mechanism for building up a thunk table for an import directory.
public class ThunkTableBuffer : SegmentBase, ISegment, IOffsetProvider, IWritable
- Inheritance
-
ThunkTableBuffer
- Implements
- Inherited Members
Constructors
ThunkTableBuffer(HintNameTableBuffer, bool, bool)
Creates a new thunk table buffer, that uses the provided hint-name table to reference names.
public ThunkTableBuffer(HintNameTableBuffer hintNameTable, bool is32Bit, bool isIat)
Parameters
hintNameTable
HintNameTableBufferThe hint-name table containing the names of each imported member
is32Bit
boolIndicates whether the thunk-table should use 32-bit addresses or 64-bit addresses.
isIat
boolIndicates the buffer contains the import address table or lookup table.
Properties
Is32Bit
Gets a value indicating whether the thunk-table should use 32-bit addresses or 64-bit addresses.
public bool Is32Bit { get; }
Property Value
ThunkSize
Gets the size of a single entry in the thunk table.
public uint ThunkSize { get; }
Property Value
Methods
AddMember(ImportedSymbol)
Creates a thunk for the specified member, and adds it to the table.
public void AddMember(ImportedSymbol entry)
Parameters
entry
ImportedSymbolThe member to add.
GetMemberThunkRva(ImportedSymbol)
Obtains the relative virtual address of the thunk associated to an imported member in the thunk table.
public uint GetMemberThunkRva(ImportedSymbol member)
Parameters
member
ImportedSymbolThe member to get the thunk entry RVA for.
Returns
- uint
The virtual address
Remarks
This method should only be used after the thunk table has been relocated to the right location in the PE file.
GetPhysicalSize()
Computes the number of bytes that the structure contains.
public override uint GetPhysicalSize()
Returns
- uint
The number of bytes.
Write(BinaryStreamWriter)
Serializes the structure to an output stream.
public override void Write(BinaryStreamWriter writer)
Parameters
writer
BinaryStreamWriterThe output stream to write the data to.