#include <DLL.h>
Collaboration diagram for ACE_DLL:
Public Member Functions | |
ACE_DLL (int close_handle_on_destruction=1) | |
ACE_DLL (const ACE_TCHAR *dll_name, int open_mode=ACE_DEFAULT_SHLIB_MODE, int close_handle_on_destruction=1) | |
ACE_DLL (const ACE_DLL &) | |
Copy constructor. | |
int | open (const ACE_TCHAR *dll_name, int open_mode=ACE_DEFAULT_SHLIB_MODE, int close_handle_on_destruction=1) |
int | close (void) |
Call to close the DLL object. | |
~ACE_DLL (void) | |
void * | symbol (const ACE_TCHAR *symbol_name, int ignore_errors=0) |
ACE_TCHAR * | error (void) const |
ACE_SHLIB_HANDLE | get_handle (int become_owner=0) const |
int | set_handle (ACE_SHLIB_HANDLE handle, int close_handle_on_destruction=1) |
Set the handle for the DLL object. By default, the close(). | |
Private Member Functions | |
int | open_i (const ACE_TCHAR *dll_name, int open_mode=ACE_DEFAULT_SHLIB_MODE, int close_handle_on_destruction=1, ACE_SHLIB_HANDLE handle=0) |
void | operator= (const ACE_DLL &) |
Private Attributes | |
int | open_mode_ |
Open mode. | |
ACE_TCHAR * | dll_name_ |
int | close_handle_on_destruction_ |
ACE_DLL_Handle * | dll_handle_ |
int | error_ |
Flag to record if the last operation had an error. |
This class is a wrapper over the various methods for utilizing a dynamically linked library (DLL), which is called a shared library on some platforms. Operations open(), close(), and symbol() have been implemented to help opening/closing and extracting symbol information from a DLL, respectively.
|
Default constructor. By default, the close() operation on the object will be invoked before it is destroyed.
|
|
This constructor performs the actions of open() during construction.
|
|
Copy constructor.
|
|
Called when the DLL object is destroyed -- invokes close() if the close_handle_on_destruction flag was set to non-zero in the constructor or open() method. |
|
Call to close the DLL object.
|
|
Returns a pointer to a string explaining that an error occured. You will need to consult the error log for the actual error string returned by the OS. |
|
Return the handle to the caller. If become_owner is non-0 then caller assumes ownership of the handle and the ACE_DLL object won't call close() when it goes out of scope, even if <close_handle_on_destruction> is set. |
|
This method opens and dynamically links a specified DLL.
|
|
|
|
|
|
Set the handle for the DLL object. By default, the close().
|
|
Look up a named symbol in the DLL. DLL must be successfully opened before calling symbol().
|
|
This flag keeps track of whether we should close the handle automatically when the object is destroyed. |
|
|
|
Keep track of the name of the loaded dll, so it can be used to remove framework components, singletons that live in the dll, prior to unloading the dll in the close() method. |
|
Flag to record if the last operation had an error.
|
|
Open mode.
|