Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

converting cvi program to MS vc++ 6.0

I have a CVI program which I need to run in a browser. The .fp's that I use in it are the programmer's toolkit, TCP/IP, and the .ini control, the animation control, Easy tabs, password control, the internet toolkit. How can I convert this over to MS vc++ 6.0? My ultimate aim is to wrap the resulting program in an ActiveX control and use it in a browser. Will the CVI tools for c++ help me at least convert the .fp calls? Please remember that the result, whatever it is, must run as an ActiveX control.
0 Kudos
Message 1 of 6
(3,564 Views)
There is a Visual C++ wizard that ships with Measurement Studio for Visual C++ that will convert a CVI project to a Visual C++ project. Try this if you have it installed:


  1. Start Visual C++ 6.0.

  2. Go to the File->New ... menu item.

  3. Click on the Projects tab.

  4. Select NI Measurement Studio AppWizard, enter a project name, and click OK

  5. In the first step of the wizard, select the third option that says "LabWindows/CVI Application, then click Next.

  6. Select the second option that says "Convert an existing LabWindows/CVI project into a new Visual C++ project. Browse for the .PRJ file, then finish the wizard.



This won't completely convert your project into an ActiveX control, but it should give y
ou a good start.

- Elton
0 Kudos
Message 2 of 6
(3,564 Views)
Great. That would really help. How about the .fp's? Does it convert those nonstandard function calls too? I suspect that I will need to include some NI libs in the link. Will this preclude me from making an activeX?
0 Kudos
Message 3 of 6
(3,564 Views)
The conversion wizard will not include the function panel in the generated Visual C++ project, but it will determine the associated header, source, library, and/or object files for the function panel and include those files in the project. The conversion wizard should also add any necessary linker dependencies for the CVI runtime and support libraries.

- Elton
0 Kudos
Message 5 of 6
(3,564 Views)
OK. I did all that you advised. Now, I am trying to run the application from the vc++ IDE. I press Execute agentworkstation.exe, which is my project name. It responds that the file agentworkstation.exe does not exist. Do I want to build it? I say yes. It pops up a window "Labwindows/CVI Addin" to accurately manage your uir callback table file, the LW/CVI Addin requires you save the project file before you build the project. I say OK. And it stops. I have tried saving the workspace, but this doesn't make it happy. So I have unchecked the "maintin UIR automatically" in the Addin. So now I am building the .exe file, and it says that it can't find my agentworkstation.rc. Where do I need to add in the path to it? Is there any document on converting a CVI pro
gram to a Component Works program?
0 Kudos
Message 4 of 6
(3,564 Views)
The conversion wizard will generate a file called "UIRCallbackTable.c" that holds .UIR callback data for your .UIR files. When the addin is enabled, it will automatically regenerate this file at build time if you've made changes to a .UIR file in your CVI project. Disabling the addin should be OK as long as you don't make any changes to your .UIR callbacks.

I'm curious about the agentworkstation.rc file because I don't think that the conversion wizard generates an .rc file. Was this a file that was in your original CVI project? If you search the generated VC++ project directory after converting the CVI project for the .rc file, which file is including it? If you look at the file that's including it in a text editor, what is the path to the
.rc file?

There is a topic in the Measurement Studio Reference that discusses converting CVI projects to Visual C++. If you have Measurement Studio 6.0 installed, you can find it at the following location in the table of contents:

Visual C++ Help
Tutorials
Getting Started
Converting LabWindows/CVI Projects to Measurement Studio for
Visual C++ Projects

If you have the Measurement Studio update for Visual C++ .NET, you can find it at the following location in the table of contents:

Visual C++ Help
Tutorials
Measurement Studio 6.0 for Visual C++ .NET
Working with LabWindows/CVI Projects in Visual C++

- Elton
0 Kudos
Message 6 of 6
(3,564 Views)