int Ansi_To_Unicode(string strSrc, wstring& strRet)
{
wchar_t wBuff[102400] = { 0 };
CHAR sBuff[102400] = { 0 };
int iRet = MultiByteToWideChar(CP_ACP, 0, strSrc.c_str(), -1, wBuff, 102400);
if (iRet > 0) {
strRet = wBuff;
return TRUE;
}
return FALSE;
}
int Unicode_To_Ansi(wstring strValue, string& strRet)
{
CHAR sBuff[102400] = { 0 };
int iRet = WideCharToMultiByte(CP_ACP, 0, strValue.c_str(), -1, sBuff, 102400, NULL, NULL);
if (iRet > 0) {
strRet = sBuff;
return TRUE;
}
return FALSE;
}