passing variants from C# client to MFC Automation enabled app
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.
Code:
void Funct1(VARIANT *pVar) //is the MFC app function
from C# side we invoke this as follows
Code:
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
Intellectuals solve problems; geniuses prevent them.--Albert Einstein.
Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute.THAT'S Relativity --Albert Einstein