//将unicode下的wstring转化成ansi下的string
inline std::string UnicodeToASCII(LPCTSTR lpszText)
{
int length=_tcslen(lpszText);
TCHAR* pWideCharStr=new TCHAR[length+1];
char* data=new char[2*length+2];
_tcscpy(pWideCharStr, lpszText);
WideCharToMultiByte(CP_ACP, 0, pWideCharStr, -1, data, 2*length + 2, NULL, NULL);
std::string strText = data;
delete []data;
delete []pWideCharStr;
return strText;
}