Helllo all,
I have a COM server that exposes an explicit interface that has a method
that accepts a VARIANT datatype. I want to use this to pass arrays of
integers/doubles/BSTR from my C++ app to a separate C# application.
I can move individual int, double, BSTR without a problem.
But when I try to utilize the VARIANT, I run into problems. The only one
that works is the VARIANT which contains a SAFEARRAY, and I code the Variant
type (vt) to VT_I4 | VT_ARRAY.
If I use VT_R8 | VT_ARRAY or VT_BSTR | VT_ARRAY to send Arrays of doubles or
strings, for some reason the Event that is raised when the method is called
does not get the control (I dont stop at the breakpoint).
Does anyone have any idea qhy this might be happening?
Thanks in advance,
Andrew S Giles
Andrew S. Giles - 31 Mar 2005 17:25 GMT
Just as an update...
I have called the same method from the C# side (explicit call to the COM
server) with an Array of doubles, and it gets Marshalled to a VARIANT for the
COM server just fine. I can look at it there, and all seems correct (VT =
8197 = VT_R8 | VT_ARRAY).
However, double checking the double array int he VARIANT from the C++ side
shows the same vt (8197) but the event raised is not caught.
Has anyone else heard of such a thing, or can anyone point me to a place
where I might get more information to fix this?
> Helllo all,
>
[quoted text clipped - 17 lines]
>
> Andrew S Giles