Introduces wxBSTR, an RAII wrapper for MSW BSTR type. wxBSTR also supersedes wxBasicString.

This commit is contained in:
pbfordev
2017-06-16 21:07:50 +02:00
parent 084009bff5
commit db22c91d44
7 changed files with 122 additions and 82 deletions

View File

@@ -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(wxBSTR(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( wxBSTR(location).Detach() );
else
hr = GetAM()->put_FileName( wxBasicString(location).Get() );
hr = GetAM()->put_FileName( wxBSTR(location).Detach() );
if(FAILED(hr))
{