water huang · Nov 24, 2020

how to call a dll file's method use $zf function ?

i have looked for $zf function,it says $zf(-6) will work,but it doesn't work out actually,anybody can give me a dll file which will work with $zf,if you should show me the way making the dll that is best!thanks!

0 273
Discussion (7)1
Log in or sign up to continue

$zf functions (3-6 to be precise) cannot call arbitrary libraries but only InterSystems IRIS callout libraries.

You need to write a C library which is an InterSystems IRIS callout library and which calls the dll you need. Here's documentation on that. And here's a sample callout library.

Another approach would be using the CNA community project to call your library. CNA provides an interface for using native C-compatible shared libraries.

it seems very complex,so far,i would like to use webservice 

If you can grab a Caché distribution you will find in 
%cachedir%\dev\cpp\    several samples and required sources

You can also use the .NET Gateway to call a .NET DLL.  This imports your .NET DLL into Cache and the functions are exposed as Cache Objects.

Look at %Net.Remote.ObjectGateway

thank  you,i know this way,but  it is not a good choice