T2stdstring
int T2stdstring(TCHAR* szString,std::string& str)
{
#ifdef _UNICODE
int len=lstrlen(szString)*2;
char * p=new char[len+1];
if(!p)
return -1;
memset(p,0,len+1);
WideCharToMultiByte (CP_ACP, 0, szString, -1, p, len, NULL,NULL);
str=p;
delete p;
#else
str=szString;
#endif
return 0;
}