Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Having an issue getting Interop Assembly to work with VB.net

Hello,

 I'm making a VB.net class library that will be a plugin to SureCAL, a calibration test manager. The main dll (Class Name PXIe5652) makes use of .NET 4.0, NIRfsg.Fx40, and a LabVIEW built interop assembly. The IDE's being used are VS2017 and LabVIEW2017. 

The problem I'm running into is the LabVIEW interop assembly is causing PXIe5652 to crash when the sub in which is called is called. Any other sub not using the interop assembly works as intended.

IN VB.net I have refences to both the LV interop assembly and NationalInstruments.LabVIEW.Interop.

Intellisense successfully guides the interop function, I get no errors when compiling the VB code but at runtime it crashes.

Due to company policies, I can't upload source code. I can show snipits.

Here is the VB.net references (LVNI5652 is the interop):

jcward1_0-1667413682572.png

Because of the issue I'm having, I stripped down LVNI5652 to have one function. That takes in two doubles and returns on double. Even with this simplified method it crashes.

Here is the VB code to call the interop function:

jcward1_1-1667413997102.png

Neither message box calls are executed, it crashes as soon as the VB sub that has the call to the interop function is called. If the interop line is commented out it successfully calls the message boxes.

 

In LabVIEW:

jcward1_2-1667414351214.pngjcward1_3-1667414434000.png

 

jcward1_4-1667414617824.png

 

Pre thanks for anyone able to give me some insight in what I'm doing wrong.

 

0 Kudos
Message 1 of 1
(752 Views)