10-19-2015 02:49 PM
I have a .net dll that I want to use to communicate to a device. The .dll was written in C# and was built using .net Framework v.1.0 and CLR v.1.0. Is it possible that this version .dll is too old to be compatible with LabVIEW 2011? I understand that LabVIEW 2011 supports .net framework v.2.0, 3.0, 3.5 and 4.0 but it defaults to CLR v.2.0. I am asking because I am having issues with handling events in LabVIEW 2011 and in LabVIEW 2015. When an event occurs, before the Register Event Callback vi can run, LabVIEW crashes out. I have a test program from a development kit that uses the same .dll and compiled in C# and built to an executable. The test program handles the events without any problem but in LabVIEW 2011 and LabVIEW 2015, it crashes out immediately every time. Does anyone have any idea why this is? Is it worthwhile to contact the manufacturer to see if they can recompile the .dll using a later version of .net like v.3.5?
Thank you in advance!
10-19-2015 05:24 PM
There could be a compatibility issue. Does the assembly reference any unmanaged dlls?
10-20-2015 10:26 PM
Hi tyk007,
The DLL uses the following:
using Microsoft.Win32.SafeHandles;
using System;
using System.Collections;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
How can I be certain which are managed or unmanaged? If there are some that are unmanaged, is it a matter of recompiling the DLL using a later version of .NET Framework and CLR or would I need to do something more?
Thank you!