$ZF(-6) provides a fast Dynamic Link Library (DLL) function interface using a user-defined index for a DLL filename. You establish this user-defined index in $ZF(-4) by assigning an integer (dll_index) to uniquely associate with a dll_name. You can place this entry in either a process DLL index table, or a system DLL index table.
Both $ZF(-5) and $ZF(-6) can be used to execute a function from a DLL. which has been located by $ZF(-4).
For a detailed description of how to use $ZF(-6), refer to “Using $ZF(-6) to Access Libraries by User Index” in Using the Callout SDK.
Loading a DLL Dependent on Another DLL
On Windows, some system DLLs that are installed in the bin directory are dependent on other DLLs in the bin directory. Windows search rules do not find the dependencies in the bin directory unless bin is added to the process's PATH. However, if one of these DLLs is invoked using $ZF(-4) or $ZF(-6), InterSystems IRIS first searches the directory from which the DLL is being loaded for dependent DLLs; if the dependent DLLs are not found there, the default search PATH is used. InterSystems IRIS does this by using a Windows load operation that temporarily adds the originating directory to the PATH while the DLL is loaded. This temporary PATH addition is used when the DLL is loaded by $ZF(-4) or $ZF(-6). This temporary PATH addition is not used when the DLL is loaded by $ZF(-3).
If a DLL dependency cannot be resolved, InterSystems IRIS issues a <DYNAMIC LIBRARY LOAD> error.