template inline void ConvertStrToPtrTChar(__in std::basic_string str, __out LPTSTR &pchar) { pchar = new TCHAR[str.size() + 1]; pchar[str.size()] = 0; std::copy(str.begin(), str.end(), pchar); }