You can convert the BSTR
object to char *
, then convert it to QString. Here:
QString *getQStringFromBstr(BSTR bstrVal){
char *p= const_cast<char *>(_com_util::ConvertBSTRToString(bstrVal));
return new QString(p);
}
COM was designed to be Language-agnostic binary equalizer. Which means I could use a VB function in C++ and C++ function in, say, C#(with COM interop). This is the reason most of the strings and few functions were changed to language neutral strings IIRC.