gtpc2m1n | C/C++ Language Support User's Guide |
This function loads the dynamic link library (DLL) into memory (if it has not been loaded previously) and connects the DLL to the application program. The function that called the DLL receives a handle that uniquely identifies the requested DLL for subsequent explicit requests for that DLL.
A different handle is returned for each successful call to the dllload. A DLL is physically loaded only once even though there may be many calls to the dllload function.
Format
#include <dll.h> dllhandle* dllload(char * dllName);
Normal Return
The dllload function returns a unique handle that identifies the DLL when the call is successful.
Error Return
When the call is not successful, the dllload function returns NULL and sets errno.
Programming Considerations
None.
Examples
The following example shows how to call C dllload functions from a simple C application.
#include <stdio.h> #include <dll.h> int DLLA(void) { dllhandle *handle; char *name="DLLB"; handle = dllload(name); if (handle == NULL) { printf("failed on dllload of DLLB DLL\n"); exit (-1); } }
Related Information