LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can call a dll made in c# 2008 in CVI

Hi

 

To all

 

I have a questions for you, I have a dll made in C# 2008 Express and I want to know if is possible to use  this dll in a program developed in CVI 6.0, I only have the file .dll, I do not have the header file .h and the file .lib because C# only generate the .dll file in the build.

 

I do not know if is possible to do this.

 

Can someone help me with this doubt??

 

Thanks in advanced for your support.

0 Kudos
Message 1 of 5
(3,538 Views)

did you check here?

0 Kudos
Message 2 of 5
(3,525 Views)

Hello

 

Wolfgang

 

Thanks for your responce but I have read the document before and I only see one conditions when the dll was made in visual C++ , The compilator C# has diferents things and in this document I do not see some instruccions when the dll was created in C#.

 

Do you have other idea or other link in where I can see something about this??

 

 

Thanks a lot. 

0 Kudos
Message 3 of 5
(3,511 Views)

Well, I am not familiar with C# but I assume that you will need to declare the exported functions as extern C. In CVI then use the Windows SDK functions LoadLibrary and GetProcAddress as explained here.

 

 

0 Kudos
Message 4 of 5
(3,508 Views)

Hello

 

wolfgang.

 

I have try of do this that you mentioned below , but not work , because when I try to declare how .C the function declare in C# the compilador send me a error, In fact this is not valid in C#.

 

I thing that the CVI compilator can not to call a dll development in C# . I only need to confirm this.

 

 

Regards.

 

 

0 Kudos
Message 5 of 5
(3,452 Views)