10-01-2010 11:09 AM
I'm trying to call some COM funcationality from a windows library. The function takes a reference to an object as one of it's parameters.
LabVIEW calls this parameter a variant.
In CSharp the call looks like this:
object o = null;
MyComFunction(string a, string b, ref o);
In LabVIEW I'm able to call the constructor for a generic .NET constructor, pass it to the input of ".NET object to variant" and the function call accepts this... but doesn't work right. I think I need to initialize the .NET Object somehow like I've done in CSharp by setting it to null.
Any ideas how to initialize this or if the constructor would be doing this automatically?
10-04-2010 11:46 AM
Matt,
I'm uncertain of exactly the result. Can you post a snippet of what you've got wired up?
10-04-2010 04:41 PM
That's it. A generic Object to variant. The Library I'm passing it to is COM, so I'm not including that piece since it's really irrelevant.
10-04-2010 08:05 PM
I'm curious about passing a null pointer as a parameter in general, what does the function prototype you're calling look like? Is there some documentation about the function that might help put this in additional context?