08-24-2005 04:28 AM
08-24-2005 09:44 PM
There shouldn't be anything too wierd about using variants with COM objects. The ADO functionality in Windows uses them all over the place and I've never had a problem. It sounds like perhaps something isn't quite right in the COM object your company created. Is there a particular reason that you are using variants?
Mike...
08-25-2005 01:07 AM
Hi Mike,
thank you for your reply.
The reason for using variants is, that we like to use the COM Object as an universal object, which is able to share data (vectors, enum, ...) with LabVIEW, Matlab and Excel.
My collegue, who has developed the COM object, told me that the COM object could not handle 2D arrays.
Did any guidelines exists? Guidelines for developing COM Objects which can be used with LabVIEW? What kind of datatypes can be shared with the COMobject and so forth ...?
Best regards
Peter
08-25-2005 08:21 AM
I am not aware of any guidelines as I have never been involved in developing a COM object--just using them. Most variants that I recall interacting with right off hand are scalar values--though there is one place where I pass an ADO method a 1D array of variants. Which might be solution for you, have the input be an array of variants.
The place I would start is on MS's website, therir documentation of these sorts of things can be very complete. For example, the ADO documentation is excellent.
I also seem to remember reading somewhere that MS was going to be phasing-out variants in the future. Sorry, but I don't remember the details, or where I read it.
Mike...
08-25-2005 09:24 AM
08-31-2005 06:38 AM
Hi Mike,
I want to share a 1 D DBL Array (instead of a variant) with a COM Object. But it don´t work. LabVIEW don´t understand that the COM objects uses 1D Array. MS Excel is able to share 1D Arrays with the COMobject, but LabVIEW not. Have you any idea, how to share 1D Arrays between a COM and LabVIEW?
Best regards
Peter
08-31-2005 06:38 AM
Hi Mike,
I want to share a 1 D DBL Array (instead of a variant) with a COM Object. But it don´t work. LabVIEW don´t understand that the COM objects uses 1D Array. MS Excel is able to share 1D Arrays with the COMobject, but LabVIEW not. Have you any idea, how to share 1D Arrays between a COM and LabVIEW?
Best regards
Peter
08-31-2005 07:09 AM
Hello Brian,
You know that COM suppoerts 1-d-arrays. Can i share 1d-arrays between COM and Labview, or must i use variants?
If yes, has NI any example C++ code available? There is an ActiveX Example in the LabView download area, but this example uses also only variants.
Thanks for your help
08-31-2005 11:12 AM