venkyhyd
October 6th, 2008, 01:47 AM
Hello
When try to send a ref of array string to the variant pointer we get DISP_E_TYPEMISMATCH exception.
Eg:
MFC App is OLE Automation enabled.
void Funct1(VARIANT *pVar) //is the MFC app function
from C# side we invoke this as follows
string [] str = new string[100];
Object obj = (Object) str;
mfcAutoApp.Funct1(ref obj); // this would throw the DISP_E_TYPEMISMATCH exception.
Any suggestions on this...
-thanks
When try to send a ref of array string to the variant pointer we get DISP_E_TYPEMISMATCH exception.
Eg:
MFC App is OLE Automation enabled.
void Funct1(VARIANT *pVar) //is the MFC app function
from C# side we invoke this as follows
string [] str = new string[100];
Object obj = (Object) str;
mfcAutoApp.Funct1(ref obj); // this would throw the DISP_E_TYPEMISMATCH exception.
Any suggestions on this...
-thanks