Download LabWindows/CVI Programmer Reference Manual
Transcript
Chapter 5 Distributing Libraries and Function Panels After the user installs the library files, the modreg program must be run on the user’s disk using the command file. LabWindows/CVI must not be running when you use the modreg program to modify the Registry. If LabWindows/CVI is running while you use this program, you will lose your changes. Caution Specifying Library Dependencies When one library you distribute is dependent upon another library you distribute, you can specify this dependency in the function panel file for the dependent library. When LabWindows/CVI loads the dependent library, it attempts to load the libraries upon which it depends. Use the Edit».FP Auto-Load List command in the Function Tree Editor window of the dependent library to list the .fp files of the libraries upon which it depends. Refer to Chapter 5, Function Tree Editor, of the LabWindows/CVI Instrument Driver Developers Guide for details on this command. LabWindows/CVI can find the required libraries most easily when they are all in the same directory as the dependent library. When you cannot put them in the same directory, you must add the directories in which the required libraries reside to the user’s Instrument Directories list. The user can manually enter this information using the Options»Instrument Directories command in the Project window. Also, you can add to the Instrument Directories list by editing the Registry. The modreg program is in the LabWindows/CVI bin subdirectory for this purpose. A documentation file called modreg.doc and the source code are in the same directory. Assume that you install two .fp files in the following locations: c:\newlib\liba.fp c:\genlib\libb.fp If liba depends on libb, you must add the following path to the user’s Instrument Directories list: c:\genlib For LabWindows/CVI to be able to find the dependent file, your modreg command file must be: setkey [HKEY_CURRENT_USER\Software\National Instruments] appendkey CVI\@latestVersion add InstrumentDirectories InstrDir "c:\gewlib" LabWindows/CVI Programmer Reference Manual 5-2 www.ni.com