torcs - 1.2.2

Dynamic Modules


Detailed Description

This is the interface to load/unload the shared libraries (or DLLs).


Two modes are allowed, the access by filename, of the access by entire directory.
When the directory mode is used, the filenames are not known by advance, this
allow more flexibility at runtime.

The generic information can be retrieved, without keeping the DLL loaded.

The gfid parameter is use to differentiate the modules using different includes.
This functionality is not used yet.

This API is not used for shared libraries linked staticaly at compilation time.


Files

file  module.cpp
 Dynamic module management.


Functions

int GfModLoad (unsigned int gfid, char *dllname, tModList **modlist)
 Load the specified DLLs.

int GfModLoadDir (unsigned int gfid, char *dir, tModList **modlist)
 Load the DLLs in the specified directory.

int GfModUnloadList (tModList **modlist)
 Unload the DLLs of a list.

int GfModInfo (unsigned int gfid, char *dllname, tModList **modlist)
 Get the generic information of the specified DLL.

int GfModInfoDir (unsigned int gfid, char *dir, int level, tModList **modlist)
 Get the generic module information of the DLLs of the specified directory.

int GfModFreeInfoList (tModList **modlist)
 Free the info contained in the specified list.


Function Documentation

int GfModFreeInfoList tModList **  modlist  ) 
 

Free the info contained in the specified list.

Parameters:
modlist List of info to free
Returns:
0 Ok
-1 Error

int GfModInfo unsigned int  gfid,
char *  dllname,
tModList **  modlist
 

Get the generic information of the specified DLL.

Parameters:
gfid Mask for version control
dllname File name of the DLL
modlist The information are stored here.
Returns:
>=0 Number of modules infoed
-1 Error
Warning:
The modlist contains only one element

int GfModInfoDir unsigned int  gfid,
char *  dir,
int  level,
tModList **  modlist
 

Get the generic module information of the DLLs of the specified directory.

Parameters:
gfid Mask for version checking
dir Directory name where to find the DLLs
level Indicates the sub dir level (0 or 1)
modlist List of module description structure
Returns:
>=0 Number of modules infoed
-1 Error

int GfModLoad unsigned int  gfid,
char *  dllname,
tModList **  modlist
 

Load the specified DLLs.

Parameters:
gfid Mask for version checking
dllname File name of the DLL
modlist List of module description structure
Returns:
>=0 Number of modules loaded
-1 Error
Warning:
The modlist contains only one element
See also:
tModList

int GfModLoadDir unsigned int  gfid,
char *  dir,
tModList **  modlist
 

Load the DLLs in the specified directory.

Parameters:
gfid Mask for version checking
dir Directory name where to find the DLLs
modlist List of module description structure
Returns:
>=0 Number of modules loaded
-1 Error

int GfModUnloadList tModList **  modlist  ) 
 

Unload the DLLs of a list.

Parameters:
modlist List of DLLs to unload
Returns:
0 Ok
-1 Error


Generated at Thu Feb 26 21:54:19 2004 for torcs by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-1999
TORCS © Eric Espié 1999, 2002.