Collaboration diagram for CDllList:
Public Member Functions | |
CDllList () | |
The CDllList constructor sets the name to NULL as well as the dll handle and next pointer. | |
~CDllList () | |
The CDllList destructor releases the name pointer and calls delete on the next object in the list if it is non-NULL. | |
CDllList * | GetWithName (const char *n) |
The GetWithName function finds the CDllList object that has the given name. | |
HMODULE | GetHandle () const |
The GetHandle function allows the dll handle to be accessed. | |
Static Public Member Functions | |
static CDllList * | NewDll (const char *n, CDllList *head) |
The NewDll function returns a new CDllList object using the name you provide to load the dll. | |
Private Attributes | |
CDllList * | next |
The next node in the linked list. | |
char * | name |
The name of the dll in this object. | |
HMODULE | dllhandle |
The handle to the dll in this object. |
Each CDllList object stores a handle to the dll as well as its name.
|
The GetHandle function allows the dll handle to be accessed.
|
|
The GetWithName function finds the CDllList object that has the given name. This function recursively checks the list, if the current object has the same name it is returned, otherwise GetWithName is called on the next object. If the end of the list is reached and it still has not been found NULL is returned.
|
|
The NewDll function returns a new CDllList object using the name you provide to load the dll. This function does not search to see if the dll already exists, that is up to you. Also the new CDllList object has its next member set to the head parameter, presumedly the first node in a CDllList list. Thus the head should be set to the return value upon execution so that the new object remains accessable. This function also attempts to load the dll with the name you provided, first from CentumRootpah+"Dlls\" and then from the current directory. If neither results in a successful load operation a message box is created to notify you of this fact. Even upon failure a new CDllList object is returned.
|