LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Call a dll made in cvi by C# compilator

Hi

 

To all

 

I needed to help with this, I have a dll development in CVI and want to call this dll in C# , I run the aplication development in C# in my laptop and this work very well, but  if I am want to run the same aplication in other PC, I am having problems because the aplication made in C# can not load the dll made in CVI.

 

Is possible that I needed some run time of CVI for does this??

 

In my computer I have The full Packet CVI 7.1 and CVI 8.1 but I am using a dll made in  CVI 8.1.

 

what do you think about this??

 

Thanks for your help. 

 

0 Kudos
Message 1 of 6
(3,898 Views)

A dll built with CVI will require the support of the CVI runtime engine, which is best provided by building a distribution kit for the dll project. Then you should have no problems installing it on other PCs.

 

JR

0 Kudos
Message 2 of 6
(3,859 Views)

Hi

 

JR

 

Thanks a lot for your help, Is correct I only Install the run time of CVI 8.1 and the dll run well in the Other PC. Now The aplication is working.

 

 

Thanks again.

0 Kudos
Message 3 of 6
(3,845 Views)

Hi Mario,

 

Are you willing to share some thoughts on this?

I am trying to do the same (use a CVI created DLL in C#), but I found it to be quiet hard to find examples or hints.

 

Kind regards,

- Rob

0 Kudos
Message 4 of 6
(3,648 Views)

Hi RobKijger

 

Yes , if you have a dll created in CVI and want to call this dll in C# , you will need to have the runtime engine of the version in the which was created that dll in your PC, also you need to define the dll and the function that was going to call in the header of your program C# for exemplo.

[DllImport("C://Test_Programs_BE/relayController/relayController.dll")]

public static extern int turnOnrelay1();

 

Other thing that you will need to verify is the convention of call in the dll made in CVI you can use this

 

__declspec(dllexport) int turnOnrelay1(void);

 

I hope that this can help you.

 

 

Regards

 

Mario Ku.

0 Kudos
Message 5 of 6
(3,636 Views)

I am also faceing problem if some body give me solution than its ok...

0 Kudos
Message 6 of 6
(3,188 Views)