//CStringA to string
string 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 string
string 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();
}