### IProcedureAddress

  The IProcedureAddress template class is a wrapper for dynamic link library (DLL) entry points. The template argument is as follows:

  PtrToFnType
    Type of the entry point to load or call; this must be a pointer-to-function type.

  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:

  - Constructing objects from entry point names (or ordinal entry point numbers) and DLL objects (or DLL names)
  - Calling the entry point without having to cast the generic function type supported by the operating system function that is used to acquire the runtime address
  - Managing, along with IDynamicLinkLibrary, the loading and freeing of the associated DLL module

#### AIX Considerations

  AIX does not support this class.

### IProcedureAddress - Member Functions and Data by Group

### Constructors & Destructor

You must provide the following two pieces of information to construct objects of this template class:

- The entry point. You can specify either an entry point name (const char *) or entry point ordinal (unsigned).
- The dynamic link library (DLL) from which to load the entry point. You can specify the DLL either as a reference to an existing IDynamicLinkLibrary object or by the DLL name.

You can also destruct objects of this class.

~IProcedureAddress

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

IProcedureAddress

  Overload 1

      public:
      IProcedureAddress( unsigned long ordinal,
                         IDynamicLinkLibrary& aDLL )

  ordinal
    Unsigned long value that represents the entry point within the DLL.
  aDLL
    Reference to a dynamic link library object that wrappers the DLL.

  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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 2

      public:
      IProcedureAddress( const char* entryPoint,
                         IDynamicLinkLibrary& aDLL )

  entryPoint
    Pointer that identifies the name of the entry point within the DLL.
  aDLL
    Reference to a dynamic link library object that wrappers the DLL.

  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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 3

      public:
      IProcedureAddress( unsigned long ordinal,
                         const char* dllName )

  ordinal
    Unsigned long value that represents the entry point within the DLL.
  dllName
    Pointer that identifies the DLL name.

  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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 4

      public:
      IProcedureAddress( const char* entryPoint,
                         const char* dllName )

  entryPoint
    Pointer that identifies the name of the entry point within the DLL.
  dllName
    Pointer that identifies the DLL name.

  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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Memory Model

These members help you determine if you are using a 32-bit or a 16-bit memory model.

is32Bit

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Pointers to Functions

These operators permit objects of this class to be used as regular function names.

operator PtrToFnType

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### IProcedureAddress - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None