ASCII strings to Unicode in C++
also since _bstr_t's have operator (char *) and operator (wchar_t *) if you have included comutil.h, you can use it to do your conversion.char * source = "this is my source" ;_bstr_t converter_temp(source) ;wstring target ;target = wstring(converter_temp) ;... and the other way...
also since _bstr_t's have operator (char *) and operator (wchar_t *) if you have included comutil.h, you can use it to do your conversion.
char * source = "this is my source" ; _bstr_t converter_temp(source) ; wstring target ; target = wstring(converter_temp) ;... and the other way ...
std:string back_To_Mbcs = (char *) _bstr_t(target.c_str()) ;I just wouldn't do it in a loop because we don't know if the _bstr_t implementation uses A2W() behing the scenes.