Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
80 ratings:
 3.78 out of 5     Rate this Document

Integrating LabWindows/CVI with Microsoft Visual C++

Primary Software: LabWindows/CVI Development Systems>>Full Development System
Primary Software Version: 8.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
What options do I have for using LabWindows/CVI code in Microsoft Visual C++?

Solution:
LabWindows/CVI provides two add-in wizards in Microsoft Visual C++ which are the LabWindows/CVI Project Wizard and LabWindows/CVI Conversion Wizard. The LabWindows/CVI Project Wizard creates a Visual C++ project that uses the LabWindows/CVI run-time libraries. The LabWindows/CVI Conversion Wizard converts an existing LabWindows/CVI project into a Visual C++ project.

To use the wizards, follow the steps below:

Visual C++ 2005
  1. Select File » New » Project.
  2. Select Visual C++ » LabWindows/CVI in the Project types pane.
  3. Choose either the LabWindows/CVI Project or LabWindows/CVI Conversion template from the Templates pane.
Visual C++ .NET 2003
  1. Select File » New » Project.
  2. Select Measurement Studio Projects » CVI Projects in the Project Types pane.
  3. Choose either the LabWindows/CVI Project or LabWindows/CVI Conversion template from the Templates pane.
Visual C++ 6.0
  1. Select File » New.
  2. Select the NI Measurement Studio AppWizard project in the Projects tab.
  3. After typing in the project name, click the OK button.
  4. In the NI Measurement Studio AppWizard - Step 1 dialog window, select the LabWindows/CVI Application option. This will bring up the LabWindows/CVI Application Wizard.
  5. In the LabWindows/CVI Application Wizard dialog box, choose between creating a Visual C++ project that incorporates LabWindows/CVI run-time libraries or converting an existing LabWindows/CVI project into a new Visual C++ project.
If you do not have the wizards mentioned above, you will need to repair certain software. If you are using:
  • Visual C++ 2005 - Modify the LabWindows/CVI software and make sure that in the Features dialog box, the Tools » Visual Studio 2005 Wizards component is enabled.

  • Visual C++ .NET 2003 - Modify the Measurement Studio for .NET 2003 software and make sure that in the Features dialog box, the NI LabWindows/CVI Integration Tools component is enabled.

  • Visual C++ 6.0 - Repair the NI Measurement Studio 6.0 software since there is no specific component to enable.

Alternative: If you do not wish to use the wizards mentioned above, another method of integrating LabWindows/CVI code into Visual C++ is to build your LabWindows/CVI code into a DLL and call that DLL from Visual C++. Application Note 094 (linked below) walks through this alternative.


Note 1. You can only use the LabWindows/CVI Conversion Wizard to convert projects created in LabWindows/CVI version 6.0 or later.
Note 2. To use the Visual Studio 2005 wizards, you must have Microsoft Visual Studio 2005 Standard Edition or higher and LabWindows/CVI 8.0 and above.
Note 3. Visual Studio 2005 refers to the "LabWindows/CVI Project Wizard" as "LabWindows/CVI Application Wizard".

Related Links:
Application Note 094: How to Integrate 32-Bit LabWindows/CVI 4.0 Libraries into Microsoft Visual C/C++ or Borland C/C++
KnowledgeBase 3WDFQHK7: LabWindows/CVI 8.0.1 Visual Studio Wizards Do Not Work with Visual Studio 2005 Express Editions
Developer Zone Tutorial: FAQ: Using Dynamic Link Libraries with LabWindows/CVI

Attachments:





Report Date: 03/02/2000
Last Updated: 07/24/2007
Document ID: 1V1A1U8M

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit