LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading different DLL

I want to do the following.  Not sure what's the best way to go about it.  I have 2 .NET DLL that my LabVIEW program uses.  The program determines which DLL to use by looking at the value of a boolean.  My questions.

 

1. How do I use which DLL to load at run time?

2. Some labview code is only applicable to one DLL and not the other, would there be an error?  

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 2
(2,469 Views)

Personally I'd create two separate LabVIEW classes which mirror the .NET components. At run-time you load the desired class, which then loads the corresponding .NET component. I don't think there's any way you can avoid duplicating code for the two different DLLs, although I haven't tested to see whether LabVIEW can handle .NET class inheritance (assuming that your two .NET components either inherit from the same class or implement the same interface). I also don't know how you could attempt to call a non-existent method on a .NET class in LabVIEW, I think you'll get an error at edit-time.

Message 2 of 2
(2,458 Views)