01-25-2007 07:33 PM
01-26-2007 11:03 AM
Calling the CVI .NET Library functions directly is not recommended as it is quite difficult. This is why CVI creates a wrapper for the .NET assembly - basically, the wrapper uses the .NET library functions to interact with the assembly. Some simple CVI .NET examples are installed in the samples\dotnet folder under CVI.
The particular error you are getting indicates that the target object in the .NET object was called but it threw an exception - this is most probably due to passing some invalid parameter. If the assembly you are calling is a commonly available assembly, you can post the code snippet that is returning the error and others on the forum could try checking it.
01-26-2007 02:27 PM - edited 01-26-2007 02:27 PM
Thanks for you response. I'm actually trying to follow the example getinfobyzip since that seems to be exactly what I want to do.
I'm getting that error when calling the very first create function which seems more like a cvi generated function for any assembly rather than a method for the object. (Although maybe it has somethign to do with the constructor for the object in the assembly?)
I assume this is the proper example to follow.
In labview it seems very straight forward:
I use the constructor node to identify the object in the assembly I want.
Then use the invoke node to call the methods.
Its a 3rd party .dll for their spectrometer. They mentioned to me that they moved from .net1.1 to .net2.0 and in doing so labview 7 was no long compatible. I dont' know if that has anything to do with me but it seemed that cvi might possibly be a release behind labview in terms of .net tools.
I'm not really sure how to proceed.
Everytime I talk with the company they want me to create an activexserver to interface with a com object they say is installed. This seems very different than what labview or labwindows would be doing.
Brian
Message Edited by hillb on 01-26-2007 02:28 PM
01-30-2007 09:46 AM
01-30-2007 11:15 AM
01-30-2007 11:52 AM
01-30-2007 12:11 PM
Hi Gavin,
I get through the "create .net controller" wizard without any problems.
I get a 0 back from the initialize method. I was confused by this though because i don't remember seeing it in the getinfobyzip.
I'll have to try the other create method, although I guess I'm having problems just loading the assembly?
Brian
01-30-2007 12:44 PM
01-31-2007 08:51 PM
Hi Gavin,
I was able to test everything out in 8.1 today. One thing odd was that I wasn't able to create the .net controller from the same assembly, I was getting an error for some reason. I was able to use a newer version of the assembly however to create the wrapper code and instrument driver.
During the init call I now get an error however, code -6579 which I believe just means it could not load assembly.
Do you know reason I would be getting this error?
Thanks very much for your help, I am very grateful.
Brian
02-01-2007 09:21 AM