Reputation: 8941
How to convert OLECHAR*
to CString
in VC++ ?
Upvotes: 1
Views: 2577
Reputation: 54158
OLECHAR*
is the same as BSTR
. You can convert to CString
like this (sorry about formatting, I have lost the code
icon for now).
OLECHAR* value;
BSTR (bstrValue(value));
_bstr_t tmp(bstr, FALSE); //wrap the BSTR
CString cs(static_cast<const char*>(tmp)); //convert it
Upvotes: 2