There are some questions talked about conversion between std::wstring
and CComBSTR
, like this one, but what' the advantage of each one over the other if both are available in a project?
Asked
Active
Viewed 129 times
1 Answers
3
std::wstring has more methods for actual string handling, whereas CComBSTR is meant specifically for holding a BSTR string. BSTRs are used mostly by COM methods and have a different memory layout. Generally you should use std::wstring or CString unless you actually need the memory layout of BSTRs.

user1610015
- 6,561
- 2
- 15
- 18