CComBSTR to string
-
Hi, I'm having a terrible time just trying to convert a CComBSTR to a string not char *, but string from . Can anyone help? Or how about VARIANT to string - but I think its the same problem because it seems that I have to use the bstrval property of a VARIANT.
-
Hi, I'm having a terrible time just trying to convert a CComBSTR to a string not char *, but string from . Can anyone help? Or how about VARIANT to string - but I think its the same problem because it seems that I have to use the bstrval property of a VARIANT.
You can use OLE2A macro, for example, USES_CONVERSION; CComBSTR bstrSource = "Text to convert"; std::string sTarget = OLE2A(bstrSource); Jaime
-
You can use OLE2A macro, for example, USES_CONVERSION; CComBSTR bstrSource = "Text to convert"; std::string sTarget = OLE2A(bstrSource); Jaime
Thank you very much - that has made the next 2 crappy days 4 me better:)