Hi
Can any body help me in converting Interface Pointer to list variable in vc++ since i am getting the error while typeconversion
error 2440 "type cast" :cannot convert from '_bstr_t' to 'std::list<_Ty>'
so any one plz help me....
Thanks in advance.
Reply:
i Hav done liki this
in C# com i have done like
List Disp()
{ List li =new List();
li.Add("Ravi");
li.Add("Raj");
Return li;
}
in c++ Main
void main() {
HRESULT Hr=CoInitilize(NULL);
ITestPtr p(__uuid("DemoClass");
std::list l=(std::list)p->Disp();
}
} But strangely some times it shows that Disp is not a member of ITest and sometimes that type conversion error. I have verified this is only because of when the return type is List
any help will Greately Appreciated