The IDLLModule supports the loading, unloading, and addressing of entry points in a dynamic link library (DLL). Dynamic link libraryies are known as shared libraries on some platforms. IDLLModule makes it easier and safer to track loaded DLLs. It provides access to module information for those loaded DLLs, such as entry point addresses and the file name of the module.
You can construct, destruct, copy, and assign objects of this class.
![]() |
public:
~IDLLModule()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDLLModule( const char* fileName, ESearchLocation searchOrder = kOSDefaultSearch )
Use this version of the constructor if you know the name of
the dynamic link library (DLL or shared library).
This constructor opens the dynamic link library.
Note:
IAccessError | The dynamic link library object was not created. The system either could not locate the file, or (for OS/2) the LIBRARY statement in the .def file does not match the DLL name. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IDLLModule(const IModuleHandle& moduleHandle)
Use this version of the constructor if you have an IModuleHandle obtained by previously loading the dynamic link library (DLL).
IAccessError | The dynamic link library object was not created. The module handle may be invalid. |
Windows | OS/2 | AIX |
Yes | Yes | No |
public:
IDLLModule(const IDLLModule& dllLibrary)
Creates a dynamic link library object using a reference to an existing dynamic link library object. This is commonly known as a copy constructor.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDLLModule& operator =(const IDLLModule& dllLibrary)
Assigns the member data of an object of this class to another object of this class.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to query information about the loaded dynamic link library.
![]() |
public:
IString fileName() const
Returns the fully qualified file name of the dynamic link library.
IAccessError | The file name was not returned. The module handle may be invalid. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IModuleHandle handle() const
Returns the module handle of the dynamic link library.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isOpen() const
Returns true if the dynamic link library is open.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to open (load) and close (unload) a dynamic link library.
![]() |
public:
IDLLModule& close()
Decrements the reference count of the dynamic link library. If the count reaches 0, this call also closes the library.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDLLModule& open()
Opens a closed dynamic link library and increments the reference count.
IAccessError | The dynamic link library object was not created. The system either could not locate the file, or (for OS/2) the LIBRARY statement in the .def file does not match the DLL name. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to call a function in a dynamic link library. You can identify a function by its name or ordinal number.
![]() |
public:
bool isEntryPoint32Bit(const char* procedureName) const
Use this version of the function if you know the entry point's name.
IAccessError | The entry point was not queried. The procedure name may be invalid. |
Windows | OS/2 | AIX |
Yes | Yes | No |
public:
bool isEntryPoint32Bit( unsigned long procedureOrdinal ) const
Use this version of the function if you know the entry point's ordinal.
IAccessError | The entry point was not queried. The procedure ordinal may be invalid. |
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
void* procAddress(const char* procedureName) const
Use this version of the function if you know the procedure name.
IAccessError | The procedure address was not loaded. The procedure name may be invalid. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
void* procAddress(unsigned long procedureOrdinal) const
Use this version of the function if you know the procedure ordinal.
IAccessError | The procedure address was not loaded. The procedure ordinal may be invalid. |
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
enum ESearchLocation { kOSDefaultSearch, kNLSPathSearch }
Use these enumerators to specify how to search for a dynamic link library (DLL or shared library). Valid values are:
Windows | OS/2 | AIX |
Yes | Yes | Yes |