xbmc
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
DllLoader Class Reference
Inheritance diagram for DllLoader:
Inheritance graph
[legend]
Collaboration diagram for DllLoader:
Collaboration graph
[legend]

Public Member Functions

 DllLoader (const char *dll, bool track=false, bool bSystemDll=false, bool bLoadSymbols=false, Export *exports=NULL)
 
bool Load () override
 
void Unload () override
 
int ResolveExport (const char *, void **ptr, bool logging=true) override
 
int ResolveOrdinal (unsigned long ordinal, void **ptr) override
 
bool HasSymbols () override
 
bool IsSystemDll () override
 
HMODULE GetHModule () override
 
ExportGetExportByFunctionName (const char *sFunctionName)
 
ExportGetExportByOrdinal (unsigned long ordinal)
 
- Public Member Functions inherited from CoffLoader
int ParseCoff (FILE *fp)
 
int ParseHeaders (void *hModule)
 
- Public Member Functions inherited from LibraryLoader
 LibraryLoader (const std::string &libraryFile)
 
const char * GetName () const
 
const char * GetFileName () const
 
const char * GetPath () const
 
int IncrRef ()
 
int DecrRef ()
 
int GetRef ()
 

Protected Member Functions

int Parse ()
 
int ResolveImports ()
 
void AddExport (unsigned long ordinal, void *function, void *track_function=NULL)
 
void AddExport (char *sFunctionName, unsigned long ordinal, void *function, void *track_function=NULL)
 
void AddExport (char *sFunctionName, void *function, void *track_function=NULL)
 
void SetExports (Export *exports)
 
void PrintImportLookupTable (unsigned long ImportLookupTable_RVA)
 
void PrintImportTable (ImportDirTable_t *ImportDirTable)
 
void PrintExportTable (ExportDirTable_t *ExportDirTable)
 
int ResolveOrdinal (const char *, unsigned long, void **)
 
int ResolveName (const char *, char *, void **)
 
const char * ResolveReferencedDll (const char *dll)
 
int LoadExports ()
 
void LoadSymbols ()
 
- Protected Member Functions inherited from CoffLoader
void PrintStringTable (void)
 
void PrintSymbolTable (void)
 
int LoadCoffHModule (FILE *fp)
 
int LoadSymTable (FILE *fp)
 
int LoadStringTable (FILE *fp)
 
int LoadSections (FILE *fp)
 
int RVA2Section (unsigned long RVA)
 
void * RVA2Data (unsigned long RVA)
 
unsigned long Data2RVA (void *address)
 
char * GetStringTblIndex (int index)
 
char * GetStringTblOff (int Offset)
 
char * GetSymbolName (SymbolTable_t *sym)
 
char * GetSymbolName (int index)
 
void PerformFixups (void)
 

Static Protected Member Functions

static void UnloadSymbols ()
 
- Static Protected Member Functions inherited from CoffLoader
static void PrintFileHeader (COFF_FileHeader_t *FileHeader)
 
static void PrintWindowsHeader (WindowsHeader_t *WinHdr)
 
static void PrintOptionHeader (OptionHeader_t *OptHdr)
 
static void PrintSection (SectionHeader_t *ScnHdr, const char *data)
 

Protected Attributes

ImportDirTable_tImportDirTable
 
ExportDirTable_tExportDirTable
 
bool m_bTrack
 
bool m_bSystemDll
 
bool m_bLoadSymbols
 
bool m_bUnloadSymbols
 
ExportEntrym_pExportHead
 
Exportm_pStaticExports
 
LoadedListm_pDlls
 
- Protected Attributes inherited from CoffLoader
SymbolTable_tSymTable
 
char * StringTable
 
char ** SectionData
 
unsigned long EntryAddress
 
int NumberOfSymbols
 
int SizeOfStringTable
 
int NumOfDirectories
 
int NumOfSections
 
int FileHeaderOffset
 

Additional Inherited Members

- Public Attributes inherited from CoffLoader
void * hModule
 
COFF_FileHeader_tCoffFileHeader
 
OptionHeader_tOptionHeader
 
WindowsHeader_tWindowsHeader
 
Image_Data_Directory_tDirectory
 
SectionHeader_tSectionHeader
 

Member Function Documentation

◆ LoadExports()

int DllLoader::LoadExports ( )
protected
Todo:
Validate all pointers are valid. Is a zero RVA valid or not? I'd guess not as it would point to the coff file header, thus not right.

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