In our COM project, we need to choose between best string class implementation so that BSTR (used for COM interfaces) and elegant string class like CString provides many string manipulation APIs.
Are there any better way to handle the strings and string operations so that it can be BSTR complaints as well as we can have naive CString operations?
Unortunately nothing realy elegant here. The best you can do is to use
CString::AllocSysString()and you better use a BSTR wrapper likeCComBSTRor_bstr_tto manage the resulting BSTR lifetime. See this question for how it usually done.