08-11-2009 08:37 AM
From the .NET pallette, i use a constructor node to connect to my device dll. This connects ok but when i use a invoke noke to access its methods, i get a message "LabVIEW 8.5 Development System has encountered a problem and needs to close. We are sorry for the inconvenience." and Labview closes.
I have deleted and saved and then redone the constructor to make sure i am pointing to the correct dll. I am using LabVIEW professional 8.5 with .NET framework 3.5 SP1.
Any ideas?
Regards,
Grant
08-11-2009 08:57 AM
08-11-2009 09:20 AM
Have spoken with the dll creator and found out that the dll is using .NET 3.5 framework. I have that installed on machine. The dll was created in C# 2008 and a windows application also created in C#. These work together ok so i believe the problem lies between LabVIEW and the dll. I am only using the dll methods.
08-19-2009 10:29 AM
Hi Grant_Cargill,
Thank you for contacting National Instruments. I have been doing some thinking about your error and it is difficult to judge what the problem is without seeing either the DLL or the VI. Could you possibly attach an example of a VI using this DLL so that we can try and replicate the issue here? Also would it be possible for you to provide a C# project that we could use as a reference for getting this DLL working with LabVIEW.
In order to try and help you out, I have attached some additional resources that may help identify this problem and resolve it.
How Can I Stop LabVIEW From Crashing When I Run A VI With .NET or ActiveX Controls?
Requirements for Running a LabVIEW Executable that Uses .NET Assemblies
If you can have a look at both of these articles and let me know your findings, that will be much appreciated.
Many thanks,
08-20-2009 01:26 AM
Hi Andrew, i eventually found the problem. It was because LabVIEW caused an exeption in the dll. The dll did not handle this particular operation and therefore caused the exeption. I am still currently testing this to confirm but so far, this looks like the most probable cause.
Regards,
08-20-2009 10:41 AM
Grant:
Download and then run debugview while you run your vi, it may give you more specific information as to what is going awry.
http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
-AK2DM