Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

CDllManager Class Reference

The CDllManager class is used to load new dlls and return opened dll handles. More...

Collaboration diagram for CDllManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CDllManager ()
 The CDllManager constructor simply calls the Construct function.
 ~CDllManager ()
 The CDllManager destructor simply calls the Destruct function.
void Construct ()
 The Construct function sets the intial linked list pointer to NULL.
void Destruct ()
 The Destruct function empties the linked list if it contains any items and sets the linked list pointer to NULL.
HMODULE OpenDll (const char *name)
 The OpenDll function returns a handle to the required dll.

Private Attributes

CDllListhead
 The first node of the linked list.

Detailed Description

The CDllManager class is used to load new dlls and return opened dll handles.

This class keeps track of which dlls have been opened by name so that time is not wasted loading the same dll more than once. It also provides a useful layer of abstraction. Internally a linked list of CDllList objects holds the data.

See also:
CDllList


Constructor & Destructor Documentation

CDllManager::CDllManager  ) 
 

The CDllManager constructor simply calls the Construct function.

See also:
CDllManager::Construct()

CDllManager::~CDllManager  ) 
 

The CDllManager destructor simply calls the Destruct function.

See also:
CDllManager::Destruct()


Member Function Documentation

HMODULE CDllManager::OpenDll const char *  name  ) 
 

The OpenDll function returns a handle to the required dll.

This function first seaches the list to see if a dll with the given name has already been opened. If it has the open handle is returned. Otherwise CDllList::NewDll() is called to open the dll and return its handle.

See also:
CDllList::NewDll()
Parameters:
name the name of the dll (for example "DllName.dll")
Returns:
the handle to the opened dll, if the dll cannot be opened NULL is returned.


The documentation for this class was generated from the following files:
Generated on Sat Apr 16 16:31:09 2005 for Centum API by  doxygen 1.4.2