General Info | |
Interface: RLibModFile Files: rlibmodfile.h Last change: 29/07/2002 Author: Luiz Henrique Shigunov |
Description
Structures Library module file format |
Functions | |
0x00 - Close - Close a module file 0x01 - GetFuncsInfo - Get informations about functions 0x02 - GetImpInfo - Get informations about implementations 0x03 - GetInterInfo - Get informations about interfaces 0x04 - GetModuleInfo - Get informations about a module 0x05 - GetUsedFunc - Get informations about a used function |
0x06 - GetUsedFuncReloc - Get informations about a used function relocation 0x07 - LoadCode - Load module's code 0x08 - LoadData - Load module's data 0x09 - LoadROData - Load module's read only data 0x0a - Open - Open a module file |
This page describes the RLibModFile interface which provides access to library module files.
The library module file reader provides informations about library module files, including module data, code, read only data, data, functions, used functions, relocations, etc.
typedef struct { unsigned int codeStart; unsigned int prop; } RLibModFile_FunctionInfo;
typedef struct { const char *name; } RLibModFile_ImpInfo;
typedef struct { const char *name; unsigned int nFunctions; } RLibModFile_InterInfo;
typedef struct { char md5[16]; const char *comment; void *start; void *shutdown; unsigned int codeSize; unsigned int roDataSize; unsigned int dataSize; unsigned int version; unsigned int prop; } RLibModFile_ModuleInfo;
typedef struct { const char *interface; const char *imp; unsigned int function; unsigned int prop; } RLibModFile_UsedFuncInfo;
typedef struct { UsedFuncInfo function; unsigned int offset; unsigned int prop; } RLibModFile_UsedFuncRelocInfo;
All names can't be changed because they are the original name, not a copy.
int RLibModFile_Close(RLibModFile_File *file);
This function closes file.
int RLibModFile_GetFuncsInfo(RLibModFile_File *file, unsigned int interface, unsigned int imp, RLibModFile_FunctionInfo *info);
This function gets informations about all functions from implementation imp from interface from file.
info must be an array with at least the same number of positions as the number of functions from interface.
If all goes ok, info will be filled with the informations.
int RLibModFile_GetImpInfo(RLibModFile_File *file, unsigned int interface, unsigned int imp, RLibModFile_ImpInfo *info);
This function gets informations about implementation imp from interface from file.
interface is the same number used on GetInterInfo.
If all goes ok, info will be filled with the informations.
int RLibModFile_GetInterInfo(RLibModFile_File *file, unsigned int interface, RLibModFile_InterInfo *info);
This function gets informations about interface from file.
interface is the same number used on GetFuncInfo.
If all goes ok, info will be filled with the informations.
int RLibModFile_GetModuleInfo(RLibModFile_File *file, RLibModFile_ModuleInfo *info);
This function gets informations about module file.
If all goes ok, info will be filled with the informations.
int RLibModFile_GetUsedFunc(RLibModFile_File *file, unsigned int n, RLibModFile_UsedFuncInfo *info);
This function gets informations about the n function used by file.
n starts with 0.
If all goes ok, info will be filled with the informations.
int RLibModFile_GetUsedFuncReloc(RLibModFile_File *file, unsigned int n, RLibModFile_UsedFuncRelocInfo *info);
This function gets informations about the n used function relocation used by file.
n starts with 0.
If all goes ok, info will be filled with the informations.
int RLibModFile_LoadCode(RLibModFile_File *file, unsigned int start, unsigned int size, void *where, void *codeStart, void *roDataStart, void *dataStart);
This function loads code from file.
roDataStart is a pointer to the start of module's read only data, dataStart is a pointer to the start of module's data, codeStart is a pointer to the start of module's code and where is where code is going to be loaded.
roDataStart, dataStart and codeStart are used to make relocations on code.
size bytes of code starting at start are going to be loaded.
start is relative to the start of code and 0 is the first byte of code.
int RLibModFile_LoadData(RLibModFile_File *file, unsigned int start, unsigned int size, void *where, void *codeStart, void *roDataStart, void *dataStart);
This function loads data from file.
roDataStart is a pointer to the start of module's read only data, dataStart is a pointer to the start of module's data, codeStart is a pointer to the start of module's code and where is where data is going to be loaded.
roDataStart, dataStart and codeStart are used to make relocations on data.
size bytes of data starting at start are going to be loaded.
start is relative to the start of data and 0 is the first byte of data.
Uninitialized data are initialized with zero.
int RLibModFile_LoadROData(RLibModFile_File *file, unsigned int start, unsigned int size, void *where, void *codeStart, void *roDataStart, void *dataStart);
This function loads read only data from file.
roDataStart is a pointer to the start of module's read only data, dataStart is a pointer to the start of module's data, codeStart is a pointer to the start of module's code and where is where read only data is going to be loaded.
roDataStart, dataStart and codeStart are used to make relocations on read only data.
size bytes of read only data starting at start are going to be loaded.
start is relative to the start of read only data and 0 is the first byte of read only data.
int RLibModFile_Open(const char *pathname, RLibModFile_File **file);
This function opens module file pathname.
If all goes ok, file will contain file ID.