10-28-2008 12:43 AM
I am trying to use a .NET dll from Labview. Attached is a screenshot of a stripped down version of the vi.
The vi first creates an instance of SystemClass. It then calls the Create method of this, to make an instance of a particular module. It then closes both references. This works finewhen the vi is run the first time, but if the vi is run again I get the following error on the first create:
"Error 1172 occurred at Error creating instance of SystemClass (System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {ADAE87A2-08FF-5AB6-9142-28549CDA1121} failed due to the following error: 800700b7.
) in Test2.vi"
The SystemClass is a singleton, so only one instance can be created. As far as I can work out this means that Labview has never closed the reference to the original SystemClass, so when vi runs again, it attempts to create another instance of SystemClass, giving an error.
If anyone has a solutions or workarounds to this problem would be appreciated.
Charlie
10-28-2008 12:55 AM
I think you forget the attachment. Also search the forum and if this didn't helped you, kindly post back.
Thanks,
Mathan
10-28-2008 09:24 AM
10-29-2008 01:45 AM
If you are interested in .Net and LabVIEW, read the posts on Lycangeeks blog on programming. A lot of info to the why and how of .net in LabVIEW.
Ton