Compatibility issues between DLL and non-DLL code

This section describes the differences between DLL code and non-DLL code, and discusses the related compatibility issues for linking them to create complex DLLs.

Note: This section does not apply to XPLINK applications. XPLINK code is always DLL code.

Table 1 and Figure 1 illustrate DLL code referencing functions and variables.

Table 1. Referencing functions and external variables
Function or Variable DLL
Imported Functions A function descriptor is created by the binder. The descriptor is in the WSA class and contains the address of the function and the address of the writable static area associated with that function. The function address and the address of the WSA associated with the function is resolved when the DLL is loaded.  1 
Nonimported Functions Also called through the function descriptor but the function address is resolved at link time.  3 
Imported Variables A variable descriptor is created in the WSA by the binder. It contains addressing information for accessing an imported variable. The address is resolved when the DLL is loaded.  2 
Nonimported Variables Direct access  4 
Figure 1. Referencing functions and external variables in DLL code
Graphic referencing functions and external variables in DLL code