LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

distribution kits

I'm using LabWindows 5.5 on a Windows 2000 machine. I've developed an
application wich I want to distrubite via the distrubition kit option
available. The kit builds fine and installs on a different PC without
error. When I run the application I get error messages saying a
particular dll can't be found. I add the dll to the distribution kit,
rebuild it and reinstall it on the other PC. When I run it, I get a
message saying a different dll can't be found. This continues
seemingly indefinately. Why doesn't the kit build include all the
necessary dlls? Or is there a way to determine which dlls are needed
so I can manually add them to the kit? Thanks for any help.
0 Kudos
Message 1 of 4
(3,343 Views)
Hello

Is your application using any non CVI controls or components? If you are using CVI only controls, then you really should not have this problem. If you are using any third party controls and components, you should refer to their documentation for a list of required dlls.
I am curious, what the are the names of some of the dlls that are missing? Are they system dlls or something specific to CVI?

Thanks

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(3,338 Views)
My application includes NI-DMM and NI-DAQ PC cards. The missing Dlls are associated with the DMM card software. I wrote the application so the user could check a box to indicate if the cards were present or not in the PC. If the cards are not present, the application bypasses all references to the cards. In effect, I wanted the GUIs and other parts of the application to work in a PC that did not have the cards installed. I found that I had to install the software drivers for the cards to get the application to run on the 2nd PC.

Even so, it seems that if the DLLs are needed for the application to run and references to their functions are called out in the application, they should be included in the distribution kit. Thanks.

Dan
0 Kudos
Message 3 of 4
(3,308 Views)
Dan,

The CVI Create Distribution Kit feature can only include DLLs for libraries that are installed by default with CVI. Since NI-DMM is installed separately, CVI will not include it automatically in the distribution kit.

The reason your program fails to start with the DLL not found error is because you are "statically linked" to the import library for the NI-DMM DLL. This means that Windows will try to load the NI-DMM DLL immediately when your program starts.

The simplest solution is to install NI-DMM on the target machine, as you have found.

Another possible option is to load and call into the NI-DMM DLL dynamically. One way to do this is manually via calls to the Windows SDK functions LoadLibrary and GetProcAddress using function pointers. Another, much easier way to do this, is by opening the NI-DMM header file in CVI and selecting Options >> Generate DLL Import Library and including this Import Library in your project. You may need to do some fiddling to make sure that CVI uses the import library you create instead of the normal NI-DMM import library, otherwise your program will still be statically linked to the NI-DMM DLL. Note that there are some limitations to this method, such as not being able to call variable argument functions, but otherwise it works pretty well.

Hope that helps.

-Jeff
NI
0 Kudos
Message 4 of 4
(3,284 Views)