The IProcedureAddress template class is a wrapper for dynamic link library (DLL) entry points. The template argument is as follows:
This Open Class Library uses an operating system function to do a runtime link to the DLL, and it uses another operating system function to acquire the runtime address of a specified function in the DLL. When the link is established and the address is acquired, you can call code that was not accessible to the linker when the executable module was built.
This class provides for the following:
AIX does not support this class.
Constructors & DestructorYou must provide the following two pieces of information to construct objects of this template class:
You can also destruct objects of this class.
![]() |
public:
~IProcedureAddress()
This destructor frees the IDynamicLinkLibrary object that this class creates during construction. If you need to use the dynamic link library after the IDynamicLinkLibrary object is freed, construct an object of this class using an explicitly created IDynamicLinkLibrary object instead of the dynamic link library name.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
![]() |
public:
IProcedureAddress( unsigned long ordinal, IDynamicLinkLibrary& aDLL )
Create an object to dynamically load an entry point using the specified entry point ordinal and a reference to an existing IDynamicLinkLibrary object. If you know the ordinal of the entry point and have already loaded the dynamic link library, use this constructor.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
public:
IProcedureAddress( const char* entryPoint, IDynamicLinkLibrary& aDLL )
Create an object to dynamically load an entry point using the specified entry point name and a reference to an existing IDynamicLinkLibrary object. If you know the name of the entry point and have already loaded the DLL, use this constructor.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
public:
IProcedureAddress( unsigned long ordinal, const char* dllName )
Create an object to dynamically load an entry point using the specified entry point ordinal and DLL name. If you know the ordinal of the entry point and have not already loaded the DLL, use this constructor.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
public:
IProcedureAddress( const char* entryPoint, const char* dllName )
Create an object to dynamically load an entry point using the specified entry point name and DLL name. If you know the name of the entry point and have not already loaded the DLL, use this constructor.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
Memory ModelThese members help you determine if you are using a 32-bit or a 16-bit memory model.
![]() |
public:
bool is32Bit() const
Determines the memory model that the function runs in. If the entry point is 32-bit, this function returns true, and if the entry point is 16-bit, it returns false.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
Pointers to FunctionsThese operators permit objects of this class to be used as regular function names.
![]() |
public:
operator PtrToFnType() const
Permits objects of this template class to be used in the same way as pointers to functions, which are like regular function names.
| Windows | OS/2 | AIX |
| Yes | Yes | No |