+ return false;
+}
+
+WXDLLEXPORT BSTR wxConvertStringToOle(const wxString& str)
+{
+ return wxBasicString(str).Get();
+}
+
+WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr)
+{
+ // NULL BSTR is equivalent to an empty string (this is the convention used
+ // by VB and hence we must follow it)
+ if ( !bStr )
+ return wxString();
+
+ const int len = SysStringLen(bStr);
+
+#if wxUSE_UNICODE
+ wxString str(bStr, len);
+#else
+ wxString str;
+ if (len)
+ {
+ wxStringBufferLength buf(str, len); // asserts if len == 0
+ buf.SetLength(WideCharToMultiByte(CP_ACP, 0 /* no flags */,
+ bStr, len /* not necessarily NUL-terminated */,
+ buf, len,
+ NULL, NULL /* no default char */));
+ }
+#endif
+
+ return str;
+}
+
+// ----------------------------------------------------------------------------
+// wxBasicString
+// ----------------------------------------------------------------------------
+
+wxBasicString::wxBasicString(const wxString& str)
+{
+ m_bstrBuf = SysAllocString(str.wc_str(*wxConvCurrent));
+}
+
+wxBasicString::wxBasicString(const wxBasicString& src)
+{
+ m_bstrBuf = src.Get();
+}
+
+wxBasicString& wxBasicString::operator=(const wxBasicString& src)
+{
+ SysReAllocString(&m_bstrBuf, src);
+ return *this;