//--------------------------------------------------------------------- void StrToWstr(const char* str, wstring& dstr) { CryStackStringT<wchar_t, 64> tmp; tmp.resize(strlen(str)); tmp.clear(); while (const wchar_t c=(wchar_t)(*str++)) { tmp.append(1, c); } dstr.assign(tmp.data(), tmp.length()); }