11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

$ZF(-3)• Calling Out of <strong>Caché</strong> in Using <strong>Caché</strong> <strong>ObjectScript</strong>$ZF(-3)Loads a Dynamic-Link Library (DLL) and executes a library function.$ZF(-3,dll_name,func_name,args)Parametersdll_namefunc_nameargsThe name of the dynamic-link library (DLL) to load, specified as aquoted string. When a DLL is already loaded, dll_name can bespecified as a null string ("").Optional — The name of the function to execute within the DLL,specified as a quoted string.Optional — A comma-separated list of arguments to pass to thefunction.DescriptionUse $ZF(-3) to load a Dynamic-Link Library (DLL) and execute the specified function fromthat DLL. $ZF(-3) returns the function's return value.$ZF(-3) can be invoked in any of the following ways:To just load a DLL:SET x=$ZF(-3,"mydll")To load a DLL and execute a function located in that DLL:SET x=$ZF(-3,"mydll","$$myfunc",1)Loading a DLL using $ZF(-3) makes it the current DLL, and automatically unloads the DLLloaded by a previous invocation of $ZF(-3).To execute a function located in a DLL loaded by a previous $ZF(-3), you can speed executionby specifying the current DLL using the null string, as follows:SET x=$ZF(-3,"","$$myfunc2",1)To explicitly unload the current DLL (loaded by a previous $ZF(-3) call):SET x=$ZF(-3,"")<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 537

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!