diff --git a/src/msw/mediactrl_am.cpp b/src/msw/mediactrl_am.cpp index 6821e423da..eb181093fe 100644 --- a/src/msw/mediactrl_am.cpp +++ b/src/msw/mediactrl_am.cpp @@ -1127,7 +1127,7 @@ bool wxAMMediaBackend::Load(const wxURI& location, const wxURI& proxy) if(pPlay) { pPlay->put_UseHTTPProxy(VARIANT_TRUE); - pPlay->put_HTTPProxyHost(wxBasicString(proxy.GetServer()).Get()); + pPlay->put_HTTPProxyHost(wxBasicString(proxy.GetServer()).Detach()); pPlay->put_HTTPProxyPort(wxAtoi(proxy.GetPort())); pPlay->Release(); } @@ -1150,9 +1150,9 @@ bool wxAMMediaBackend::DoLoad(const wxString& location) // the docs say its async and put_FileName is not - // but in practice they both seem to be async anyway if(GetMP()) - hr = GetMP()->Open( wxBasicString(location).Get() ); + hr = GetMP()->Open( wxBasicString(location).Detach() ); else - hr = GetAM()->put_FileName( wxBasicString(location).Get() ); + hr = GetAM()->put_FileName( wxBasicString(location).Detach() ); if(FAILED(hr)) { diff --git a/src/msw/mediactrl_wmp10.cpp b/src/msw/mediactrl_wmp10.cpp index 533abf3c76..b9d145d4e7 100644 --- a/src/msw/mediactrl_wmp10.cpp +++ b/src/msw/mediactrl_wmp10.cpp @@ -909,17 +909,17 @@ bool wxWMP10MediaBackend::Load(const wxURI& location, ) == 0 && pWMPNetwork->setProxySettings( - wxBasicString(location.GetScheme()).Get(), // protocol + wxBasicString(location.GetScheme()).Detach(), // protocol 2) == 0) // 2 == manually specify { BSTR bsOldName = NULL; long lOldPort = 0; pWMPNetwork->getProxyName( - wxBasicString(location.GetScheme()).Get(), + wxBasicString(location.GetScheme()).Detach(), &bsOldName); pWMPNetwork->getProxyPort( - wxBasicString(location.GetScheme()).Get(), + wxBasicString(location.GetScheme()).Detach(), &lOldPort); long lPort; @@ -936,11 +936,11 @@ bool wxWMP10MediaBackend::Load(const wxURI& location, } if( pWMPNetwork->setProxyName( - wxBasicString(location.GetScheme()).Get(), // proto + wxBasicString(location.GetScheme()).Detach(), // proto wxBasicString(server).Get() ) == 0 && pWMPNetwork->setProxyPort( - wxBasicString(location.GetScheme()).Get(), // proto + wxBasicString(location.GetScheme()).Detach(), // proto lPort ) == 0 ) @@ -948,16 +948,16 @@ bool wxWMP10MediaBackend::Load(const wxURI& location, bOK = DoLoad(location.BuildURI()); pWMPNetwork->setProxySettings( - wxBasicString(location.GetScheme()).Get(), // protocol + wxBasicString(location.GetScheme()).Detach(), // protocol lOldSetting); if(bsOldName) pWMPNetwork->setProxyName( - wxBasicString(location.GetScheme()).Get(), // protocol + wxBasicString(location.GetScheme()).Detach(), // protocol bsOldName); if(lOldPort) pWMPNetwork->setProxyPort( - wxBasicString(location.GetScheme()).Get(), // protocol + wxBasicString(location.GetScheme()).Detach(), // protocol lOldPort); pWMPNetwork->Release(); @@ -1012,7 +1012,7 @@ bool wxWMP10MediaBackend::DoLoad(const wxString& location) #endif { // just load it the "normal" way - hr = m_pWMPPlayer->put_URL( wxBasicString(location).Get() ); + hr = m_pWMPPlayer->put_URL( wxBasicString(location).Detach() ); } if(FAILED(hr)) @@ -1061,12 +1061,12 @@ bool wxWMP10MediaBackend::ShowPlayerControls(wxMediaCtrlPlayerControls flags) if(!flags) { m_pWMPPlayer->put_enabled(VARIANT_FALSE); - m_pWMPPlayer->put_uiMode(wxBasicString(wxT("none")).Get()); + m_pWMPPlayer->put_uiMode(wxBasicString(wxT("none")).Detach()); } else { // TODO: use "custom"? (note that CE only supports none/full) - m_pWMPPlayer->put_uiMode(wxBasicString(wxT("full")).Get()); + m_pWMPPlayer->put_uiMode(wxBasicString(wxT("full")).Detach()); m_pWMPPlayer->put_enabled(VARIANT_TRUE); } @@ -1358,7 +1358,7 @@ wxLongLong wxWMP10MediaBackend::GetDownloadTotal() if(m_pWMPPlayer->get_currentMedia(&pWMPMedia) == 0) { BSTR bsOut; - pWMPMedia->getItemInfo(wxBasicString(wxT("FileSize")).Get(), + pWMPMedia->getItemInfo(wxBasicString(wxT("FileSize")).Detach(), &bsOut); wxString sFileSize = wxConvertStringFromOle(bsOut); diff --git a/src/msw/ole/access.cpp b/src/msw/ole/access.cpp index 7c5d3541d5..6dd3a7baa5 100644 --- a/src/msw/ole/access.cpp +++ b/src/msw/ole/access.cpp @@ -938,8 +938,7 @@ STDMETHODIMP wxIAccessible::get_accDefaultAction ( VARIANT varID, BSTR* pszDefau } else { - wxBasicString basicString(defaultAction); - * pszDefaultAction = basicString.Get(); + * pszDefaultAction = wxBasicString(defaultAction).Detach(); return S_OK; } } @@ -999,8 +998,7 @@ STDMETHODIMP wxIAccessible::get_accDescription ( VARIANT varID, BSTR* pszDescrip } else { - wxBasicString basicString(description); - * pszDescription = basicString.Get(); + * pszDescription = wxBasicString(description).Detach(); return S_OK; } } @@ -1060,8 +1058,7 @@ STDMETHODIMP wxIAccessible::get_accHelp ( VARIANT varID, BSTR* pszHelp) } else { - wxBasicString basicString(helpString); - * pszHelp = basicString.Get(); + * pszHelp = wxBasicString(helpString).Detach(); return S_OK; } } @@ -1171,8 +1168,7 @@ STDMETHODIMP wxIAccessible::get_accKeyboardShortcut ( VARIANT varID, BSTR* pszKe } else { - wxBasicString basicString(keyboardShortcut); - * pszKeyboardShortcut = basicString.Get(); + * pszKeyboardShortcut = wxBasicString(keyboardShortcut).Detach(); return S_OK; } } @@ -1235,8 +1231,7 @@ STDMETHODIMP wxIAccessible::get_accName ( VARIANT varID, BSTR* pszName) } else { - wxBasicString basicString(name); - *pszName = basicString.Get(); + *pszName = wxBasicString(name).Detach(); } return S_OK; } @@ -1416,8 +1411,7 @@ STDMETHODIMP wxIAccessible::get_accValue ( VARIANT varID, BSTR* pszValue) } else { - wxBasicString basicString(strValue); - * pszValue = basicString.Get(); + * pszValue = wxBasicString(strValue).Detach(); return S_OK; } } diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index b56a1bbf07..5a24918fb6 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -38,7 +38,7 @@ WXDLLEXPORT BSTR wxConvertStringToOle(const wxString& str) { - return wxBasicString(str).Get(); + return wxBasicString(str).Detach(); } WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr)