i want to convert String to LPWSTR.
how can i do that, i tried:
LPWSTR test = (wchar_t*)ext.toStdWString().c_str();
where 'ext' is string. but it returns garbage value in 'test'
please help
i want to convert String to LPWSTR.
how can i do that, i tried:
LPWSTR test = (wchar_t*)ext.toStdWString().c_str();
where 'ext' is string. but it returns garbage value in 'test'
please help
conversion of String to LPWSTR
James Liddell
Olivier Georg
Snadge
What is toStdWString
Is ext realy a std::string
You can usethe ATL conversion fucntions:
USES_CONVERSION;
LPWSTR test = A2W(ext.c_str());
or if you just need the pointer fur a short time you can use CA2W!
Luis Forero
Try it like this:
LPWSTR test = ext.toStdWString();