Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

loadlibrary (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info

Member of the libraries class.

Syntax

loadlibrary(libname, headername)

loadlibrary(libname, headername, options)

Description

Loads a shared library. After you load the shared library, you can use the calllib function to call a function from the shared library.

Details

Examples

Inputs

Name Description
libname Specifies the name of the shared library you want to load. If you do not specify a file extension, LabVIEW assumes .dll. libname is a string.
headername Specifies the name of the header file. If you do not specify a file extension, LabVIEW assumes .h. headername is a string.
options Specifies additional options. You can list the options in any order, as long as you list the option value immediately after the corresponding option. For example, alias value always must follow 'alias'. options accepts a combination of the following values.

'alias' Specifies that you want to assign another name to the shared library. If you specify an alias, always use the alias to refer to the shared library.
alias value Specifies the alias name you want to assign to the shared library. alias value is a string.
'addheader' Specifies that you want to refer to an additional header file.
addheader value Specifies the name of the additional header file. addheader value is a string.
'includepath' Specifies that you want LabVIEW to search in an additional path. LabVIEW searches the working directory and the MathScript search path by default. Use the MathScript Preferences dialog box to modify the working directory and the MathScript search path.
includepath value Specifies the additional path you want LabVIEW to search. includepath value is a string.

Details

Refer to the MathScript Shared Libraries.lvproj in the labview\examples\MathScript\MathScript Shared Libraries directory for examples of calling shared libraries from MathScript.

Examples

r = [labviewroot '\examples\MathScript\MathScript Shared Libraries']
loadlibrary('myDemo', 'demo', 'alias', 'myD', 'includepath', r)
unloadlibrary('myD')

Related Topics

calllib
labviewroot
libfunctionsview
libisloaded
unloadlibrary


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit