LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

hresult 0x8007007e dll error

Solved!
Go to solution

Hi,

I made a DLL with LabWindowsCVI and it works fine.

I'm loading this DLL on a VB.NET program.

The problem is: when I use it on my computer or on a computer with LabWindows, LabVIEW, Visual Studio, etc, it works; But if I use the program on a computer with no NI software I get the error HRESULT 0x8007007E LoadLibrary failed, canot find module...

Why can't I use a NI DLL on a computer with no NI software? Or is it another problem?

I apreciate all the help, because I'm already on this for a few days.

 

Regards,

 

Daniel Coelho

 

Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda
0 Kudos
Message 1 of 7
(7,063 Views)
Solution
Accepted by topic author Daniel Coelho

Because the dll needs the support of the CVI run-time environment. Just create a distribution kit for the dll project and that should ensure that all dependancies are taken care of.

 

JR

Message 2 of 7
(7,059 Views)
Thank you for your reply, but how do I create a distribution kit on labwindows?
Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda
0 Kudos
Message 3 of 7
(7,057 Views)

I managed to do the distribution kit.

It works.

Is there any other way to do it?

Because I'm using Visual Basic 2008 to call this DLL and this program has its own distribution kit...

It gets a bit messy to install the runtime environment and my program and another program I need too...

Since the DLL has only normal C, it doesn't have any NI libraries, can this dll be compiled on LabWindows without needing the runtime environment?

 

Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda
0 Kudos
Message 4 of 7
(7,054 Views)

If your dll does not use any NI facilities then maybe you should generate it using MS Visual Studio (or whatever your favourite compiler is) instead of CVI. Then the dll would be standalone and not need any CVI components. I'm not aware of any way to remove the runtime dependancy from a CVI compiled dll.

 

JR

Message 5 of 7
(7,051 Views)

That's what I'm already doing.

But on LabWindows was a bit simpler.

Thanks for your time.

 

Regards,

 

Daniel Coelho

 

Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda
0 Kudos
Message 6 of 7
(7,049 Views)

Hello Daniel,

 

If VB's distribution mechanism allows you to import merge modules (.msm files) into your distribution, then you could simply include the merge module for the CVI runtime in your VB distribution. You can find it here:

 

      C:\Program Files\Common Files\Merge Modules\cvirte_core.msm

 

Keep in mind that adding this file is sufficient insofar as you are not using NI libraries besides the ANSI C library. If you do start using some other CVI libraries depending on which ones you use, you might have to add some additional files (most libraries do not require additional runtime support).

 

Also, if you change your linkage in CVI (Build>>Target Settings>>Run-time support) from "Full run-time engine" to "Instrument driver only", which you can do since you're using only a limited set of CVI functions, and it will make your distribution smaller, then you will need to replace the file above with:

 

      C:\Program Files\Common Files\Merge Modules\instrsup.msm

 

Luis

0 Kudos
Message 7 of 7
(7,025 Views)