diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 312dee2977..3870d96263 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -833,13 +833,15 @@ static BSTR ConvertStringToOle(const wxString& str) static wxString ConvertStringFromOle(BSTR bStr) { +#if wxUSE_UNICODE + wxString str(bStr); +#else int len = SysStringLen(bStr) + 1; char *buf = new char[len]; (void)wcstombs( buf, bStr, len); - - // FIXME -- use bStr directly in Unicode mode? - wxString str(buf, wxConvLibc); + wxString str(buf); delete[] buf; +#endif return str; }