The IDynamicLinkLibrary class supports the loading of resources from a dynamic link library (DLL).
You can construct, copy, assign, and destruct objects of this class. You can construct objects of this class using either a dynamic link library name, module handle, or a reference to an existing object of this class.
![]() |
public:
virtual ~IDynamicLinkLibrary()
The dynamic link library is unloaded from memory (closed) if it is no longer being referenced.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDynamicLinkLibrary( const char* fileName, ESearchLocation searchLocation = 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 used to build the DLL does not match the DLL name. You also may receive this error if you used the rename system command to rename the dynamic link library rather than the utility program DLLRNAME. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IDynamicLinkLibrary(const IDynamicLinkLibrary& 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:
IDynamicLinkLibrary(const IModuleHandle& moduleHandle)
Use this version of the constructor if you have an IModuleHandle obtained by loading the dynamic link library (DLL) explicitly.
IAccessError | The dynamic link library object was not created. The module handle may be invalid. |
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IDynamicLinkLibrary& operator =( const IDynamicLinkLibrary& 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 for diagnostic purposes. They return an IString representation of an object of this class.
![]() |
public:
virtual IString asDebugInfo() const
Provides textual information about the class object. It returns a string that contains the file name of the dynamic link library.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString asString() const
Provides textual information about the class object. It returns a string that contains the file name of the dynamic link library.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to query general dynamic link library information.
![]() |
public:
virtual 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. Check to ensure that the dynamic link library has been properly opened. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IModuleHandle handle() const
Returns the module handle of the dynamic link library. If the dynamic link library is not open, the module handle is 0.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool isOpen() const
Returns true if the dynamic link library is open.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual void* resourceAddress() const
This is an internal use only function used to load resources on Motif.
Windows | OS/2 | AIX |
No | No | Yes |
Use these members to open (load) or close (unload) a dynamic link library (DLL).
Note:
![]() |
public:
virtual IDynamicLinkLibrary& close()
Decrements the reference count of the dynamic link library. If the reference count reaches 0, this function also closes the library.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IDynamicLinkLibrary& open()
Opens (loads) 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. You also may receive this error if you used the rename system command to rename the dynamic link library rather than the utility program DLLRNAME. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to get a procedure address from a dynamic link library or to test the memory model of an entry point.
![]() |
If the entry point is a 32-bit function, true is returned.
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 or the dynamic link library may not be open. |
Windows | OS/2 | AIX |
Yes | Yes | No |
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 or the dynamic link library may not be open. |
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
Returns the address of the specified procedure address from a dynamic link library.
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 or the dynamic link library may not be open. |
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 or the dynamic link library may not be open. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
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 |
virtual ~IResourceLibrary()
IResourceLibrary()
IResourceLibrary(const IResourceLibrary& resLibrary)
virtual IAccelTblHandle loadAccelTable( unsigned long accelTableId ) const
virtual IBitmapHandle loadBitmap( unsigned long bitmapId, bool cached = true ) const
virtual IBitmapHandle loadBitmap( unsigned long bitmapId, const ISize& bitmapSize, bool cached = true ) const
virtual IWindowHandle loadDialog( unsigned long dialogId, IWindow* dialogParent, IWindow* dialogOwner, IWinProc* dialogProcedure, void* dialogCreateParameters ) const
virtual IResourceLibrary& loadHelpTable( IWindow* helpInstance, unsigned long helpTableId ) const
virtual IPointerHandle loadIcon( unsigned long iconId, bool cached = true ) const
virtual IMenuHandle loadMenu( unsigned long menuId, IWindow* menuOwner ) const
virtual void loadMenu( unsigned long menuId, const IWindowHandle& menuHandle, IMenu* parentMenu ) const
virtual IString loadMessage(unsigned long messageId) const
virtual IPointerHandle loadPointer( unsigned long iconId, bool cached = true ) const
virtual IString loadString(unsigned long stringId) const
IResourceLibrary& operator =( const IResourceLibrary& resLibrary )
virtual IBitmapHandle tryToLoadBitmap( unsigned long bitmapId, bool cached = true ) const
virtual IBitmapHandle tryToLoadBitmap( unsigned long bitmapId, const ISize& bitmapSize, bool cached = true ) const
virtual IPointerHandle tryToLoadIcon( unsigned long iconId, bool cached = true ) const
virtual IString tryToLoadMessage( unsigned long messageId ) const
virtual IPointerHandle tryToLoadPointer( unsigned long iconId, bool cached = true ) const
virtual IString tryToLoadString( unsigned long stringId ) const