Browse Prior Art Database

Loading DLLs by ID Rather Than by Name

IP.com Disclosure Number: IPCOM000121610D
Original Publication Date: 1991-Sep-01
Included in the Prior Art Database: 2005-Apr-03
Document File: 1 page(s) / 37K

Publishing Venue

IBM

Related People

Cox, D: AUTHOR [+3]

Abstract

This article describes a method for OS/2* Office to load Dynalink files (DLLs) in OS/2 without hard coding the name of the Dynalink within OS/2 programs. In this way, DLLs can be repackaged or renamed without having to change all of the code which loads the DLLs via OS/2 system API calls.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 85% of the total text.

Loading DLLs by ID Rather Than by Name

      This article describes a method for OS/2* Office to load
Dynalink files (DLLs) in OS/2 without hard coding the name of the
Dynalink within OS/2 programs.  In this way, DLLs can be repackaged
or renamed without having to change all of the code which loads the
DLLs via OS/2 system API calls.

      The OS/2 DosLoadModule API requires an input string specifying
the DLL name to load.  This requires a program to be recompiled if
the name of that DLL changes.  In a shipped product, this would
require the reinstallation of the entire system in order to repackage
or rename the DLLs.

      OS/2 office got around this problem by building a program which
loads DLLs based on an ID in a table.  This program is called the
Product Loader. Applications programs call the Product Loader program
with an ID indicating the code segment or resource segment they need
loaded.  The Product Loader uses the ID to perform a table look-up to
determine the actual DLL name which that code or data resides in, and
then calls the DosLoadModule API with the name of that DLL.

      If code or data in a DLL needs to be repackaged into another
DLL, or if a DLL needs to be renamed, the Product Loader Table entry
for that ID is simply changed to reflect the new DLL name.

      This solution provides tremendous flexibility for a product.
Repackaging or renaming of DLLs can occur at any time, even after a
product has shipped.  This occurs by ...