Hello
I am trying to convert the following???
The Code
std::string* ChkName;
GlobalInterfacePtr->MethodA(position, bstr, ChkName);
error C2664: 'MethodA' : cannot convert parameter 3 from 'class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > ** ' to 'unsigned short ** '
Could anyone give me suggestions?
Thanks!
Karthik
David Lowndes - 08 Jul 2005 09:14 GMT
>I am trying to convert the following???
>
[quoted text clipped - 7 lines]
>std::basic_string<char,struct std::char_traits<char>,class
>std::allocator<char> > ** ' to 'unsigned short ** '
Karthik,
MethodA probably requires a BSTR * parameter for ChkName. Try using
CComBSTR or _bstr_t instead:
CComBSTR ChkName;
GlobalInterfacePtr->MethodA(position, bstr, &ChkName);
Dave
Karthik - 08 Jul 2005 16:01 GMT
Hey Dave!
Yeah U R correct.. I made the change and it did work! :-)
Karthik - 08 Jul 2005 16:02 GMT
Hey Dave!
Yeah U R correct.. I made the change and it did work! :-)