Q:

Advantage of std::wstring over CComBSTR

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? 

A:

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.