Distributing a DLL

When you have developed an ATEasy application that uses DLLs, you need to distribute these DLLs with the application. Install the DLL into the directory specified by the DLL vendor.

The way in which you specified the filename in the DLL Properties Window relative to its location on disk controls how ATEasy looks for the DLL at run time. If you specified an absolute pathname (for example, c:\Windows\System\user32.dll), ATEasy searches only in that path at run time.

If you specify a file by name only (that is, base.ext), without specifying a directory location, ATEasy searches for loaded modules whose base name matches the base name of the module to be loaded. If the name matches, the load succeeds. Otherwise, ATEasy searches for the file in the following sequence:

For more information on specifying the DLL filename and path, see Setting DLL Properties.

You should note that some DLLs require the presence of other DLLs in order to function. These DLLs are said to import the DLLs that they require. When you distribute a DLL to your users, you must also make sure to distribute any DLLs that it imports. You can find out which DLLs a DLL imports by viewing its contents using Microsoft Quick View, a Windows accessory that is installed by default with Windows.

To determine which DLLs a DLL imports:

  1. Use Windows Explorer to locate the DLL.

  2. Select the DLL and right-click.

  3. Select Quick View.

  4. Scroll through the Quick View display until you find the Import Table. This table lists the DLLs that are imported by the DLL that you are viewing. All DLLs listed here must be distributed to users of your application.

Some DLLs contain multiple layers of imported DLLs. For example, GTSW32.dll imports Kernel32.dll, User32.dll, and Gdi32.dll. Each of these DLLs, in turn, imports other DLLs. When distributing an application that uses GTSW32.dll, you would need to distribute GTSW32.dll, all of the DLLs that it imports, all of the DLLs that these DLLs import, and so on.