如何将 _bstr_t 转换为 CString
我有一个 _bstr_t 变量 bstrErr 并且我有一个 CString 变量 csError.如何将 bstrErr 中的值设置为 csError?
I have a _bstr_t variable bstrErr and I am having a CString variable csError. How do I set the value which come in bstrErr to csError?
推荐答案
是不是只能投了:
_bstr_t b("Steve");
CString cs;
cs = (LPCTSTR) b;
我认为当项目是 Unicode 时这应该可以工作.
I think this should work when the project is Unicode.
相关文章