1、CString转BSTR
BSTR bstr;
CString str = "hello world";
bstr.AllocSysString();
2、BSTR转CString
BSTR bstr = SysAllocString(L"hello world");
CString str;
str = bstr;
3、CString转char*
CString str( "hello wrold" );
LPTSTR lpt =(LPTSTR)(LPCTSTR)str;
4、char*转CString
CString str("hello wrold");
char *p = str;