This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

How To Create a DLL from a LabWindows™/CVI™ Instrument Driver

Updated Sep 13, 2021

Environment

Software

  • LabVIEW Full
  • LabWindows/CVI Full

I have a LabWindows/CVI instrument driver including a function panel file (.fp), a source file (.c) and the associated header file (.h). How would I convert these files to a Win32 dynamic link library (DLL)?

A LabWindows/CVI instrument driver typically includes the following files:


1. Launch LabWindows/CVI and open an .fp file. 

From the File menu, select Open»Function Tree (*.fp)... When prompted, navigate to the location of your installed instrument driver and load the function tree (*.fp) file.

Figure 1. Loading a Function Tree File
2. Create DLL project from instrument driver. 
From the Options menu, select Create DLL Project to generate a project (.prj) file that can be used by LabWindows/CVI to create a DLL. Specify a pathname for the project and when prompted, load the project into LabWindows/CVI. 

Your project window should now show the project ready for compilation into a DLL, as shown below:

Figure 2. LabWindows/CVI Project Window
 
  1. Create DLL from files generated in previous step.

    From the Build menu, ensure that the Target Type is set to Dynamic Link Library and Configuration is set to Release.  Then build the library by following the steps for your version of LabWindows/CVI:
     
  • LabWindows/CVI 2012 or earlier: Select Build»Create Release Dynamic Link Library.

Figure 3a. Building a Release Dynamic Link Library in LabWindows/CVI 2012 or earlier
 
  • LabWindows/CVI 2013 or later: Select Build»Build.

Figure 3b. Building a Release Dynamic Link Library in LabWindows/CVI 2013 or later

Once the DLL has been successfully created, you should get the following message:
  • LabWindows/CVI 2012 or earlier

Figure 4a. Successful DLL Creation Dialog in LabWindows/CVI 2012 or earlier
  • LabWindows/CVI 2013 or later: The build confirmation appears in the Build Output window instead of in a message pop-up.


Figure 4b. Successful DLL Creation Message in LabWindows/CVI 2013 or later

Note: In addition to the DLL, an import library (.lib) is also generated.