<span style="font-size:18px;"> string newMd5str = md5.toString();
1 LPCWSTR result = (LPCTSTR)(_bstr_t)newMd5str.c_str();</span>
<span style="font-size:18px;"><span style="white-space:pre"> </span>2 std::wstring stemp = Str2Wstr(newMd5str);
LPCWSTR result = stemp.c_str(); </span>
<span style="font-size:18px;">std::wstring Str2Wstr(const std::string& s)
{
int len;
int slength = (int)s.length() + 1;
len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0);
wchar_t* buf = new wchar_t[len];
MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len);
std::wstring r(buf);
delete[] buf;
return r;
} </span>