LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

using multithread dll in CVI 5.0

hello everyone,
we have to use a dll which starts an own thread for receiving data from the rs232.

when using this dll in the CVI-IDE 5.0 the program generates an general protection error.
when running the *.exe outside the IDE it works.

do anyone know something about using this kind of dll's in CVI-IDE 5.0 ?

thanks in advance
thomas - cvifan
0 Kudos
Message 1 of 5
(2,905 Views)
The ability to debug multithreaded applications (i.e. to run them inside the CVI IDE) was only introduced with CVI 5.5. With CVI 5, you could execute multithreaded apps as standalone executables, but you could not debug them in CVI.

Luis Gomes
NI
0 Kudos
Message 2 of 5
(2,905 Views)
Hello Luis,
much thanks for your answer.

so that means we have to update our cvi from 5.0 to 6.0

Since we have some hundred nt-workstations in the production aera [simens-mobile-phones], running with the cvirte 5, its not an easy job for us ,upgrading the compiler.

so, perhaps you can give us some information concercing upgrade from 5.0 => 6.0 :

- are there any open issues known ?
(we have a lot of dlls build with cvi50, rebuild
necessary when running with cvirte6 ?)

- is there a silent install of cvirte6 possible ?
(has cvirte5 uninstalled before ? )

- i think the only way to make a compiler-update for us is to install the cvirt6 on the win-nt-production machines all over the world
=> test if old code is still running
=>
if ok: first developer can use the cvi6-compiler

do you agree with this method, or is there perhaps an easier way ?

much thanks in advance
thomas
0 Kudos
Message 3 of 5
(2,905 Views)
I would think that in order for you to debug the dll, you would need to recompile the dll with the newer cvi to create the debug information.

You can install the CVI-runtine silently, since it is now based on the Microsoft installer technology, check the following link.

Once the problem is fixed though, assuming that the other production machines are just running code and not doing development, you can distribute the dll with a distribution kit that would automatically update the CVI Run-time for you. So this way, you wont be updating the compiler, just the trouble causing component and the run-time. The RTE is fully backwards compatible, so
you can run a CVI 5.0 exe on a machine with the 6.0 run-time. Thats why its always a great idea to break up code into componenets, making fixes always becomes simpler.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 4 of 5
(2,905 Views)
Thomas,

If you're asking me whether you should upgrade your version of CVI, my answer is an emphatic yes, but then again, I'm not an unbiased observer 🙂

I'll try to answer your questions:

- upgrading just the CVI run-time engine will not solve your problem. It won't hurt, since it's backwards compatible, but it won't help either, since version 5.0 of the environment will still not let you debug multithreaded apps. Up until 5.0, when you ran an application in the environment, it would run it in the same process as the environment itself, not using the RTE at all. The RTE was only used for running standalone EXEs and DLLs.

- If you upgrade, you won't have to rebuild your DLLs for them to function properly. However, the .cdb files that CVI builds for the purposes of debugging these DLLs will probably have to be rebuilt if you want to debug them. This will happen automatically when you build their projects in the new environment. There are no obvious issues that I can think of. If you like, you can have both versions installed side-by-side in the same machine, and you can then transition your projects gradually. If you run into any problem, we'll obviously be happy to help you solve them.

- If you're considering upgrading, I would advise you to wait a little bit longer, since we're within a very short time from releasing version 7.0. I'm not entirely positive of this, but I would guess that the upgrade cost is the same (don't quote me on this, though).

- I'm not quite sure what you mean by installing the compiler update all over the world. You would only need to install the new version on the machines that you use for development. If your application needs to run all over the world, I would reccommend that you create an installer for your application using the Create Distribution Kit feature, which will take care of packaging the RTE, as well as any other components that your application might require. You would then only need to distribute this installer, plus any drivers for whatever hardware your app might interact with.

- luis
0 Kudos
Message 5 of 5
(2,905 Views)