//CString to stringstring CStringToString(const CString &cstr){ string str=cstr.GetBuffer(0); cstr.ReleaseBuffer(); return str;}void CStringToStringEx(const CString &cstr, string &str){ str=cstr.GetBuffer(0); cstr.ReleaseBuffer();}//string to CStringCString StringToCString(const string &str){ CString cstr=str.c_str(); return cstr;}void StringToCStringEx(const string &str, CString &cstr){ cstr=str.c_str();}//CStringA to stringstring CStringAToString(const CStringA &cstra){ string str=cstra.GetBuffer(0); cstra.ReleaseBuffer(); return str;}void CStringAToStringEx(const CStringA &cstra, string &str){ str=cstra.GetBuffer(0); cstra.ReleaseBuffer();}//CStringW to stringstring CStringWToString(const CStringW &cstrw){ CStringA ctsra(cstrw.GetBuffer(0)); cstrw.ReleaseBuffer(); string str=cstra.GetBuffer(0); cstra.ReleaseBuffer(); return str;}void CStringWToStringEx(const CStringW &cstrw, string &str){ CStringA ctsra(cstrw.GetBuffer(0)); cstrw.ReleaseBuffer(); str=cstra.GetBuffer(0); cstra.ReleaseBuffer();}