Member of the libraries class.
[out2, out3, ...] = calllib(libname, funcname, in1, in2, ...)
[out1, out2, out3, ...] = calllib(libname, funcname, in1, in2, ...)
Calls a function in a shared library. Make sure the shared library uses supported data types.
| Name | Description |
| libname | Specifies the name of the shared library that contains the function you want to call. If you assigned an alias when you loaded the shared library, use the alias for libname. libname is a string. |
| funcname | Specifies the function you want to call. funcname is a string. |
| in1, in2, ... | Specify inputs for the function you want to call. |
| Name | Description |
| out1 | Returns the value of the function. If the function does not return a value, LabVIEW returns out2 as the first output. |
| out2, out3, ... | Return the pointer inputs. |
Refer to the MathScript Shared Libraries.lvproj in the labview\examples\MathScript\MathScript Shared Libraries directory for examples of calling shared libraries from MathScript.
r = [labviewroot '\examples\MathScript\MathScript Shared Libraries']
loadlibrary('myDemo', 'demo', 'includepath', r)
N = 50;
A = peaks(N);
mesh(A)
B = calllib('myDemo', 'DrawStar', A, N, 8);
figure(2)
mesh(B)
unloadlibrary('myDemo')
labviewroot
libfunctionsview
libisloaded
loadlibrary
unloadlibrary