DllProcLoaderFile is used to load specific procedures from a DLL (shared library) by their name.
typedef void (*MYPROC)(const char *); foo(const uima::util::Filename & crclFilename) { uima::util::DllProcLoaderFile clDll(crclFilename); if(clDll.isValid()) { MYPROC utProc = (MYPROC) clDll.getProcedure("myFunction"); if(utProc) (utProc)("My message"); // call my procedure in DLL else // error handling } }
DllProcLoaderFile has unloaded the DLL will cause unexpected results. (An application crash is very likely to happen.)NOTE: dropped the Cos Special Requirements for AIX 4.2 and below
Public Member Functions | |
| ~DllProcLoaderFile (void) | |
Constructors | |
| DllProcLoaderFile (const Filename &crclFilename) | |
| instantiate a DLL object and load the specified DLL | |
Properties | |
| bool | isValid (void) const |
| return TRUE if the DLL was loaded successfully | |
| TyProcedure | getProcedure (const char *cpszProcName) |
| return a pointer to the specified DLL function or NULL if the specified function cannot be found in this DLL | |
| TyErrorId | getErrorId (void) const |
| map APR error code (status) of last call to a UIMACPP error code. | |
| TyMessageId | getErrorMsgId (void) const |
| map APR error code to a UIMACPP message id | |
| const char * | getErrorMsg (void) const |
| return a pointer to the error msg (if any) | |
| const Filename & | getFilename (void) const |
| return the file's filename | |
| bool | isExistent (void) const |
| determine whether a file exists for filename on file system | |
|
|
instantiate a DLL object and load the specified DLL
|
|
|
|
|
|
return TRUE if the DLL was loaded successfully
|
|
|
return a pointer to the specified DLL function or NULL if the specified function cannot be found in this DLL
|
|
|
map APR error code (status) of last call to a UIMACPP error code.
|
|
|
map APR error code to a UIMACPP message id
|
|
|
return a pointer to the error msg (if any)
|
|
|
return the file's filename
|
|
|
determine whether a file exists for filename on file system
|
1.3.9.1