LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Include dll in built application distribution

I am building an application that uses a DAQ card. Ideally, I would like to create an installer that does not depend on NI-DAQ being installed on the target machine (i.e. just install the distribution, insertthe pcmcia card, and it works). For that purpose, I include nidaq32.dll and other dlls in the distribution using the "Files..." option on the Installer tab. I have included the files one by one from the error messages on the target machine, but now I am stuck with the error message "A dynamic link library (DLL) initialization routine failed".

This thread suggests checking the dependencies using Dependency Walker, which I have done, but it did not reveal new dlls. I have administrator privileges on the target computer, so the last post of that thread does not help either. I guess my program uses dynamically loaded dlls? Can anyone give me a hint on how to identify these dll calls?

Martin
0 Kudos
Message 1 of 14
(4,283 Views)
MartinManscher wrote:
> I am building an application that uses a DAQ card. Ideally,
> I would like to create an installer that does not depend on
> NI-DAQ being installed on the target machine (i.e. just install
> the distribution, insert the pcmcia card, and it works).

This is a big NO-NO! NI-DAQ not only consists of a number of DLLs but
also quite some device drivers which run in kernel space. The newest
NI-DAQ actually has separate low level kernel drivers for almost every
series of DAQ boards it supports and a number of NI specific support
kernel drivers for DMA, Interrupt, memory, and many more support services.

A kernel driver can't simply be copied to a machine but must be properly
registered with the operating system. I doubt that NI will give you all
the details of which registry keys and setupapi calls need to be set to
get your particular hardware installed properly. And that is not so much
because they think this top secret as much more because those settings
will inevitably change with every new NI-DAQ version and supporting this
in such a way would only make sense for large OEM volume customers.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
Message 2 of 14
(4,269 Views)
Thanks for your very clear answer. This will save me a lot of futile attempts at making this work. I guess I'll just run the ni-daq installation automatically after installation of my program.

Martin
0 Kudos
Message 3 of 14
(4,267 Views)

Hi Martin,

I need to build an application. For that I have all my VIs inside one LabVIEW Library file (.llb file) including one top-level VI. I also have a set of DLLs used by the VIs in the same directory where my .llb file is located. Now I need to build an application (without creating an installer) for my program. Should I need to include the DLLs while building my application? If yes, how to do it?

Kindly clarify me regarding this.

Thanks,

Ramkumar. D

QuEST, INDIA.

 


 

Thanks,
Ramkumar.D
QuEST, INDIA.
0 Kudos
Message 4 of 14
(4,161 Views)
No, including dlls should not be necessary (LabView dlls are included automatically). If you are using DAQ, NI-DAQ(mx) needs to be installed on the target machine.
 
Martin
0 Kudos
Message 5 of 14
(4,153 Views)

Hi. I see that copying the dll´s it´s not enough for an application to work properly. But, then, how can i develop an application (nothing to do with LabView or others, just C code) that allows the use of a DAQ card but does not force the final user to plug a NI card? (sorry for my english, i hope the question it´s understandable).

I mean, do I have to pay a runtime license for each NIDaq installation (that probably won´t be used), just to assure my application has no problems with the dependencies of the dll´s? Or do i have to make another version of my software that won´t include DAQ functionallity? Is there any installer, appart form NIDaq and free of runtime license, that provides the needed files?

Thaks. Carlos
0 Kudos
Message 6 of 14
(4,078 Views)
I think NI-DAQ can be downloaded for free on the NI website, but you need to check yourself.

Martin
0 Kudos
Message 7 of 14
(4,074 Views)
Hi Carlos
 
You do not need any license to install our drivers for the DAQ devices. As Martin mentions you can download the drivers for free from the following site... Download DAQ drivers depending on the driver version you would like to use. When you install the drivers you would be able to tell the installer which application development environment you want to support.
 
Regards
Mohadjer
NI-DK
Message 8 of 14
(4,066 Views)

We also have a problem with including a DLL (based on C-code) in ab installer.

The .exe File still needs the installed Microsoft C++ Development Suite to run after the installation.

Is there a way to solve this Problem that we don't need to install the full Suite on the target system?

If there is no way to solve it like this is it possible to include the installation of the suite in the LabView installer?

 

Message 9 of 14
(3,693 Views)

Steimers,

 

I just want to quickly clarify, you are building a LabVIEW project into an installer and you are including external DLLs that the LabVIEW VIs call. Is this correct? If so, how do you call into the DLL in LabVIEW (or how are you using the DLL)? What version of LabVIEW are you using?

 

Thanks!

 

Cheers,

 

Jonah

Applications Engineer

National Instruments

Jonah Paul
Marketing Manager, NI Software
Message 10 of 14
(3,666 Views)