LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

distribution kits, missing dll dependencies and function calls

i am using the nivision library in a cvi project. yesterday i tried to build a distribution kit. strangely, the kit never asked to include the nivision runtime files. after sending the installer to the client, the software does not do what it is supposed to do. so i dig a little bit:

why is the vision library dll NOT listed in the dll dependencies of the build executable ? (using dependency viewer from microsoft or any pe explorer)

then i renamed the nivision.dll in my system folder. contrary to any properly build windows application, my cvi application does not complain at all for a missing dll. i know this is normal, since the dll is NOT listed in the dependencies of the software. now this is very problematic, since the software will still launch without complaining, making it hard to spot a misinstalled computer (or simpler, the client installing the application on the wrong computer). the application seems to run fine, but nothing happens when trying to process an image.

so, i debugged step by step into the code, thinking that i might have missed an error code somewhere, and here is what i found: imaqCreateImage calls DO NEVER RETURN ! no error code returned, not even a message displayed allowing to diagnose the problem. how am i supposed to know something goes wrong if the function does not return ?

finally, when building the distribution kit there is an option to include a "merge module" (*.msm) which (i think) might specify the dependencies. i could not find any "merge module" for the vision library. in fact, the only library which has a merge module on my computer is ivi. now how do i specify the dependency on the vision and acquisition library when building the kit ? is there a way to automatically include the parts ? also how can i upgrade the vision library to a newer version automatically if necessary from my distribution kit, including license installation, without the user having to enter or confirm anything ? (the client do not have to think when installing an upgrade on an industrial machine, everything has to be automatic)

(side question: it seems the problem came from a version mismatched of the vision library between my computer, used to build the executable, and the target computer. i supposed that a vision 8.1 license would also be valid for a vision 8.2 library... where do i know the scope of a license, without going to the client site ?)


0 Kudos
Message 1 of 2
(3,103 Views)
Hello dummy_decoy,
 
Let me preface by saying that you'll probably get better answers if you cross-post this to the vision forum, since you're more likely to find people there who have experience with deploying vision apps. Even if they use LabVIEW instead of CVI, the issues (I think) are the same.
 
Here's what I've found so far:
 
When you install Vision 8.2 or older, apparently that does not install the deployable Vision run-time by default. I think you have to install the Vision Run-Time Engine separately. Starting with Vision 8.5, I think the deployable run-time is installed by default. As far as the licensing is concerned, I understand that you are entitled to one deployment license (which comes with the Vision Development Module purchase).
 
Unlike the case with the NI-IMAQ library, CVI does not automatically select the deployable Vision component when you build the installer. You have to manually select it, if it's there. You shouldn't look for it as a merge module (typically, the merge module option is intended for non-NI components that your particular application might depend on).
 
I also found out that that Vision 8.2 is supposed to be a free upgrade over 8.0 (there was no Vision 8.1). So the same license should work for both. It's also the case that the Vision run-time is backwards compatible, which means that an application that was built with 8.0 should work just fine with the 8.2 or 8.5 run-times, without your end user having to be concerned with that.
 
As far as the module dependency is concerned, that isn't very surprising. Most CVI libraries are implemented as thin static libraries which, on first use, dynamically load their corresponding dll. Therefore, the dll would not show up as a dependency in Microsoft's dependency viewer. Having said that, it's very strange that imaqCreateImage (or any other function) does not return an error if the dll isn't installed. I would expect it to return some error code, and it's even more odd that it hangs indefinitely. This is something that you should bring up in the Vision forum and see if someone has any idea why this is happening.
 
Luis
 
Ah, I almost forgot. There's a knowledge base article here, which discusses the specifics of how to deploy the Vision run-time. It's oriented towards LabVIEW instead of CVI, but it should work the same way in CVI.


Message Edited by LuisG on 01-24-2008 02:50 PM
0 Kudos
Message 2 of 2
(3,064 Views)