From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET dll with C dll

I ve been facing an issue while compiling a C dll and a .net dll together, is there a way to handle the .net dll in order to compile everything together without errors?, i'll appreciate some help 

0 Kudos
Message 1 of 7
(2,664 Views)

What exactly are you trying to do, what errors are you getting?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(2,658 Views)

the code # 1 is the .net im using

the second vi contains the call by reference node that calls for code # 1, the second code is a dll too, in other words a dll calls for a .net dll

the problem that i have is when i try to run another sequence of code that uses the same .net dll, it wont run, so i want to know if it is possible to call a .net dll with a single dll?

 

Download All
Message 3 of 7
(2,653 Views)

anyone any solutions, or do i have to explain myself a little bit more?

0 Kudos
Message 4 of 7
(2,636 Views)

Good Evening,

 

As I understand what you have posted, you are calling a .NET dll (your attached code1.jpg) as a sub vi inside another dll (your attached code 2.jpg). Is this correct?


When you encounter the behavior that the .NET dll doesn't run properly are you calling the .NET dll at another location inside code 2 or in some higher level VI? You should be able to access the same .NET dll, however maybe not to two locations simultaneously.

 

Nick

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 5 of 7
(2,613 Views)

that's right what you said, in another sequence a run a .vi (system setup) that uses the .net dll and that vi (system setup) hangs because somehow the reference of the .net dll doesn't unload, so i want to know if there's a way to unload the .net dll from memory definitely, so when the system setup lanchues and calls for the .net dll doesnt hang anymore.

0 Kudos
Message 6 of 7
(2,609 Views)

Based on the screenshot you have attached, I think your problem is that your code #1 doesn't have a close reference to the .NET. There is a VI on the .NET palette called "Close Reference". Simply wire this to the end of your last property or invoke node and attach your error out indicator.

 

I think that this is what is causing your .NET reference to hang up. Let me know if this works for you.

 

The information below was found in LabVIEW detailed help for the .NET Close Reference Function.

 

Close Reference Details

When you create a refnum to a VI, LabVIEW loads the VI into memory. The VI stays in memory until you close the refnum and until the VI meets the following conditions:

  • There are no other open references to the referenced VI.
  • The front panel of the VI is not open.
  • The VI is not a subVI of another VI in memory.
  • The VI is not a member of an open project library.

 

-Nick-

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 7 of 7
(2,590 Views)