use standard functions for BSTR handling instead of doing it ourselves incorrectly (fixed patch 1829152)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-11-13 01:18:06 +00:00
parent 49b3b52cc8
commit a518e5080d
2 changed files with 18 additions and 45 deletions

View File

@@ -208,24 +208,21 @@ class WXDLLEXPORT 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