X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/521bf4ff3ef47059265beff5d53c9e1162beb122..129b8b1a215fc1fcc1b9f06daa0aeaf22bbce614:/src/msw/ole/oleutils.cpp?ds=sidebyside diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 8493a938ef..ca0289188a 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -21,13 +21,15 @@ #include "wx/wxprec.h" #if defined(__BORLANDC__) -#pragma hdrstop + #pragma hdrstop #endif -#include "wx/log.h" - #if wxUSE_OLE +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif + #ifndef __CYGWIN10__ #include "wx/msw/private.h" @@ -66,21 +68,12 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount) return false; } -BSTR wxConvertStringToOle(const wxString& str) +WXDLLEXPORT BSTR wxConvertStringToOle(const wxString& str) { -/* - unsigned int len = strlen((const char*) str); - unsigned short* s = new unsigned short[len*2+2]; - unsigned int i; - memset(s, 0, len*2+2); - for (i=0; i < len; i++) - s[i*2] = str[i]; -*/ - wxBasicString bstr(str.mb_str()); - return bstr.Get(); + return wxBasicString(str).Get(); } -wxString wxConvertStringFromOle(BSTR bStr) +WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr) { #if wxUSE_UNICODE wxString str(bStr);