Conversion between 'CString' and 'BSTR'
A BSTR (Basic string or binary string) is a string data type that is used by COM, Automation, and Interop functions. A BSTR is a composite data type that consists of a length prefix, a data string, and a terminator.
Use the AllocSysString member function of the CString to convert from CString to BSTR:
BSTR bstr = cs.AllocSysString();