LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::PE::Export Class Reference

Class which represents a PE Export. More...

#include <Export.hpp>

Inheritance diagram for LIEF::PE::Export:
Collaboration diagram for LIEF::PE::Export:

Public Types

using entries_t = std::vector<std::unique_ptr<ExportEntry>>
using it_entries = ref_iterator<entries_t&, ExportEntry*>
using it_const_entries = const_ref_iterator<const entries_t&, const ExportEntry*>
Public Types inherited from LIEF::Object
template<class T>
using output_t = add_pointer_t<decay_t<T>>
template<class T>
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>

Public Member Functions

 Export ()=default
 Export (std::string name, const std::vector< ExportEntry > &entries)
 Export (std::string name)
 Export (const details::pe_export_directory_table &header)
 Export (const Export &)
Exportoperator= (const Export &)
 Export (Export &&)=default
Exportoperator= (Export &&)=default
 ~Export () override=default
uint32_t export_flags () const
 According to the PE specifications this value is reserved and should be set to 0.
uint32_t timestamp () const
 The time and date that the export data was created.
uint16_t major_version () const
 The major version number (can be user-defined).
uint16_t minor_version () const
 The minor version number (can be user-defined).
uint32_t ordinal_base () const
 The starting number for the exports. Usually this value is set to 1.
const std::string & name () const
 The name of the library exported (e.g. KERNEL32.dll).
it_entries entries ()
 Iterator over the ExportEntry.
it_const_entries entries () const
uint32_t name_rva () const
 Address of the ASCII DLL's name (RVA).
uint32_t export_addr_table_rva () const
 RVA of the export address table.
uint32_t export_addr_table_cnt () const
 Number of entries in the export address table.
uint32_t names_addr_table_rva () const
 RVA to the list of exported names.
uint32_t names_addr_table_cnt () const
 Number of exports by name.
uint32_t ord_addr_table_rva () const
 RVA to the list of exported ordinals.
void export_flags (uint32_t flags)
void timestamp (uint32_t timestamp)
void major_version (uint16_t major_version)
void minor_version (uint16_t minor_version)
void ordinal_base (uint32_t ordinal_base)
void name (std::string name)
const ExportEntryfind_entry (const std::string &name) const
 Find the export entry with the given name.
ExportEntryfind_entry (const std::string &name)
const ExportEntryfind_entry (uint32_t ordinal) const
 Find the export entry with the given ordinal number.
ExportEntryfind_entry (uint32_t ordinal)
const ExportEntryfind_entry_at (uint32_t rva) const
 Find the export entry at the provided RVA.
ExportEntryfind_entry_at (uint32_t rva)
ExportEntryadd_entry (const ExportEntry &exp)
 Add the given export and return the newly created and added export.
ExportEntryadd_entry (std::string name, uint32_t rva)
bool remove_entry (const ExportEntry &exp)
 Remove the given export entry.
bool remove_entry (const std::string &name)
 Remove the export entry with the given name.
bool remove_entry (uint32_t rva)
 Remove the export entry with the given RVA.
void accept (Visitor &visitor) const override
Public Member Functions inherited from LIEF::Object
 Object ()
 Object (const Object &other)
Objectoperator= (const Object &other)
 Object (Object &&other) noexcept=default
Objectoperator= (Object &&other) noexcept=default
template<class T>
output_t< T > as ()
template<class T>
output_const_t< T > as () const
virtual bool operator== (const Object &other) const
virtual bool operator!= (const Object &other) const
virtual ~Object ()

Detailed Description

Class which represents a PE Export.

Member Typedef Documentation

◆ entries_t

using LIEF::PE::Export::entries_t = std::vector<std::unique_ptr<ExportEntry>>

◆ it_const_entries

◆ it_entries

Constructor & Destructor Documentation

◆ Export() [1/6]

LIEF::PE::Export::Export ( )
default

◆ Export() [2/6]

LIEF::PE::Export::Export ( std::string name,
const std::vector< ExportEntry > & entries )
inline

◆ Export() [3/6]

LIEF::PE::Export::Export ( std::string name)
inline

References Export(), and name().

◆ Export() [4/6]

LIEF::PE::Export::Export ( const details::pe_export_directory_table & header)

◆ Export() [5/6]

LIEF::PE::Export::Export ( const Export & )

References Export().

◆ Export() [6/6]

LIEF::PE::Export::Export ( Export && )
default

References Export().

◆ ~Export()

LIEF::PE::Export::~Export ( )
overridedefault

Member Function Documentation

◆ accept()

void LIEF::PE::Export::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ add_entry() [1/2]

ExportEntry & LIEF::PE::Export::add_entry ( const ExportEntry & exp)

Add the given export and return the newly created and added export.

Referenced by add_entry(), and Export().

◆ add_entry() [2/2]

ExportEntry & LIEF::PE::Export::add_entry ( std::string name,
uint32_t rva )
inline

References add_entry(), and name().

◆ entries() [1/2]

it_entries LIEF::PE::Export::entries ( )
inline

Iterator over the ExportEntry.

Referenced by Export().

◆ entries() [2/2]

it_const_entries LIEF::PE::Export::entries ( ) const
inline

◆ export_addr_table_cnt()

uint32_t LIEF::PE::Export::export_addr_table_cnt ( ) const
inline

Number of entries in the export address table.

◆ export_addr_table_rva()

uint32_t LIEF::PE::Export::export_addr_table_rva ( ) const
inline

RVA of the export address table.

◆ export_flags() [1/2]

uint32_t LIEF::PE::Export::export_flags ( ) const
inline

According to the PE specifications this value is reserved and should be set to 0.

◆ export_flags() [2/2]

void LIEF::PE::Export::export_flags ( uint32_t flags)
inline

◆ find_entry() [1/4]

ExportEntry * LIEF::PE::Export::find_entry ( const std::string & name)
inline

References Export(), and name().

◆ find_entry() [2/4]

const ExportEntry * LIEF::PE::Export::find_entry ( const std::string & name) const

Find the export entry with the given name.

References name().

Referenced by remove_entry().

◆ find_entry() [3/4]

ExportEntry * LIEF::PE::Export::find_entry ( uint32_t ordinal)
inline

References Export().

◆ find_entry() [4/4]

const ExportEntry * LIEF::PE::Export::find_entry ( uint32_t ordinal) const

Find the export entry with the given ordinal number.

◆ find_entry_at() [1/2]

ExportEntry * LIEF::PE::Export::find_entry_at ( uint32_t rva)
inline

References Export().

◆ find_entry_at() [2/2]

const ExportEntry * LIEF::PE::Export::find_entry_at ( uint32_t rva) const

Find the export entry at the provided RVA.

Referenced by remove_entry().

◆ major_version() [1/2]

uint16_t LIEF::PE::Export::major_version ( ) const
inline

The major version number (can be user-defined).

Referenced by major_version().

◆ major_version() [2/2]

void LIEF::PE::Export::major_version ( uint16_t major_version)
inline

References major_version().

◆ minor_version() [1/2]

uint16_t LIEF::PE::Export::minor_version ( ) const
inline

The minor version number (can be user-defined).

Referenced by minor_version().

◆ minor_version() [2/2]

void LIEF::PE::Export::minor_version ( uint16_t minor_version)
inline

References minor_version().

◆ name() [1/2]

const std::string & LIEF::PE::Export::name ( ) const
inline

The name of the library exported (e.g. KERNEL32.dll).

Referenced by add_entry(), Export(), Export(), find_entry(), find_entry(), name(), and remove_entry().

◆ name() [2/2]

void LIEF::PE::Export::name ( std::string name)
inline

References name().

◆ name_rva()

uint32_t LIEF::PE::Export::name_rva ( ) const
inline

Address of the ASCII DLL's name (RVA).

◆ names_addr_table_cnt()

uint32_t LIEF::PE::Export::names_addr_table_cnt ( ) const
inline

Number of exports by name.

◆ names_addr_table_rva()

uint32_t LIEF::PE::Export::names_addr_table_rva ( ) const
inline

RVA to the list of exported names.

◆ operator=() [1/2]

Export & LIEF::PE::Export::operator= ( const Export & )

References Export().

◆ operator=() [2/2]

Export & LIEF::PE::Export::operator= ( Export && )
default

References Export().

◆ ord_addr_table_rva()

uint32_t LIEF::PE::Export::ord_addr_table_rva ( ) const
inline

RVA to the list of exported ordinals.

◆ ordinal_base() [1/2]

uint32_t LIEF::PE::Export::ordinal_base ( ) const
inline

The starting number for the exports. Usually this value is set to 1.

Referenced by ordinal_base().

◆ ordinal_base() [2/2]

void LIEF::PE::Export::ordinal_base ( uint32_t ordinal_base)
inline

References ordinal_base().

◆ remove_entry() [1/3]

bool LIEF::PE::Export::remove_entry ( const ExportEntry & exp)

Remove the given export entry.

Referenced by remove_entry(), and remove_entry().

◆ remove_entry() [2/3]

bool LIEF::PE::Export::remove_entry ( const std::string & name)
inline

Remove the export entry with the given name.

References find_entry(), name(), and remove_entry().

◆ remove_entry() [3/3]

bool LIEF::PE::Export::remove_entry ( uint32_t rva)
inline

Remove the export entry with the given RVA.

References find_entry_at(), and remove_entry().

◆ timestamp() [1/2]

uint32_t LIEF::PE::Export::timestamp ( ) const
inline

The time and date that the export data was created.

Referenced by timestamp().

◆ timestamp() [2/2]

void LIEF::PE::Export::timestamp ( uint32_t timestamp)
inline

References timestamp().


The documentation for this class was generated from the following file: