DESC Overview

The DESC mechanism enables you to construct objects representing external routines determined at execution time through their name and libraries, and call these routines with the appropriate arguments.

Two classes, DLL_32 and DLL_32_ROUTINE , supported by an auxiliary class SHARED_LIBRARY_CONSTANTS provide the basis for DESC under Windows:

The basic sequence of instructions to use the DESC mechanism is the following:

  1. Create a library object (an instance of DLL_32, providing the library's name as argument to the creation procedure.
  2. Create a routine object (an instance of DLL_32_ROUTINE ), providing the library object, the routine's name or index in the library, and the routine's signature - number of arguments, types of arguments, type of result if any - as arguments to the creation procedure.
  3. Apply procedure call to the routine object, passing an array that contains the actual arguments required by the external routine.

Each of these steps may be repeated as often as necessary to use multiple libraries, multiple routines in a library, or multiple calls to a given routine.