X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c9f00f2fce9cacd46ae25417d6c3a5add7640320..aa8cbe0b64fb84cadf0fbf7da1690a922085ca5f:/include/wx/msw/ole/oleutils.h diff --git a/include/wx/msw/ole/oleutils.h b/include/wx/msw/ole/oleutils.h index 413155dd24..7766d6b9c5 100644 --- a/include/wx/msw/ole/oleutils.h +++ b/include/wx/msw/ole/oleutils.h @@ -12,17 +12,16 @@ #ifndef _WX_OLEUTILS_H #define _WX_OLEUTILS_H -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "oleutils.h" -#endif - #include "wx/defs.h" #if wxUSE_OLE +// ole2.h includes windows.h, so include wrapwin.h first +#include "wx/msw/wrapwin.h" // get IUnknown, REFIID &c #include #include "wx/intl.h" +#include "wx/log.h" // ============================================================================ // General purpose functions and macros @@ -205,41 +204,40 @@ void wxLogRelease(const wxChar *szInterface, ULONG cRef); // wrapper around BSTR type (by Vadim Zeitlin) -class WXDLLEXPORT wxBasicString +class WXDLLIMPEXP_CORE wxBasicString { public: // ctors & dtor - wxBasicString(const char *sz); wxBasicString(const wxString& str); + wxBasicString(const wxBasicString& bstr); ~wxBasicString(); - void Init(const char* sz); + wxBasicString& operator=(const wxBasicString& bstr); // accessors - // just get the string - operator BSTR() const { return m_wzBuf; } - // retrieve a copy of our string - caller must SysFreeString() it later! - BSTR Get() const { return SysAllocString(m_wzBuf); } + // just get the string + operator BSTR() const { return m_bstrBuf; } + // retrieve a copy of our string - caller must SysFreeString() it later! + BSTR Get() const { return SysAllocString(m_bstrBuf); } private: - // @@@ not implemented (but should be) - wxBasicString(const wxBasicString&); - wxBasicString& operator=(const wxBasicString&); - - OLECHAR *m_wzBuf; // actual string + // actual string + BSTR m_bstrBuf; }; +#if wxUSE_VARIANT // Convert variants -class WXDLLIMPEXP_BASE wxVariant; +class WXDLLIMPEXP_FWD_BASE wxVariant; -bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) ; -bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) ; +WXDLLIMPEXP_CORE bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant); +WXDLLIMPEXP_CORE bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant); +#endif // wxUSE_VARIANT // Convert string to Unicode -BSTR wxConvertStringToOle(const wxString& str); +WXDLLIMPEXP_CORE BSTR wxConvertStringToOle(const wxString& str); // Convert string from BSTR to wxString -wxString wxConvertStringFromOle(BSTR bStr); +WXDLLIMPEXP_CORE wxString wxConvertStringFromOle(BSTR bStr); #else // !wxUSE_OLE @@ -253,4 +251,3 @@ inline void wxOleUninitialize() { } #endif // wxUSE_OLE/!wxUSE_OLE #endif //_WX_OLEUTILS_H -