docs.intersystems.com
Home / ObjectScript Reference / ObjectScript Functions / $ZF(-6)

ObjectScript Reference
$ZF(-6)
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Executes a DLL function indexed using $ZF(-4).
Synopsis
$ZF(-6,dll_index,func_ID,args)
Parameters
dll_index A user-specified index to a DLL filename in the DLL index tables, from $ZF(-4).
func_ID Optional — The ID value of the function within the DLL as supplied by $ZF(-4). If omitted, call verifies the validity of DLL_index, loads the image, and returns the image location.
args Optional — The argument(s) to pass to the function, if any, specified as a comma-separated list.
Description
$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 Gateway.
Loading a DLL Dependent on Another DLL
On Windows, some IRIS 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), 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. The IRIS system 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, IRIS issues a <DYNAMIC LIBRARY LOAD> error.
See Also


Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-07-19 06:48:23