Hi !
I'm getting trubles using a com component with c#. I try calling a
method that take one VARIANT * parameter. In the documentation it is
said that this parameter points to a SAFEARRAY of strings.
I found ont the NET that the corresponding type to VARIANT is object in C#.
I tryed something like this :
string[] tsString = new string[2]
tsString[0] = "foo";
tsString[1] = "foo2";
object objMyTable = (object)tsString;
objMyCOMObject.MyFunc(ref(objMyTable));
There I get a COM exception : Exception de HRESULT : 0x80020005
(DISP_E_TYPEMISMATCH)
Someone told me to look at
http://msdn.microsoft.com/library/de...gforarrays.asp
.... but I dont anderstand what I have to do with it.
Can someone help me ?
Thanx for advance
Bob