Lines Matching refs:hr
61 HRESULT hr = CreateStreamOnHGlobal( 0, KEEP_HGLOB_ON_RELEASE, &pStm ); in CAPNDataObject() local
63 OSL_ENSURE( E_INVALIDARG != hr, "invalid args passed to CreateStreamOnHGlobal" ); in CAPNDataObject()
65 if ( SUCCEEDED( hr ) ) in CAPNDataObject()
82 hr = GetHGlobalFromStream(pStm.get(), &m_hGlobal ); in CAPNDataObject()
84 OSL_ENSURE( E_INVALIDARG != hr, "invalid stream passed to GetHGlobalFromStream" ); in CAPNDataObject()
108 HRESULT hr = CreateStreamOnHGlobal(m_hGlobal, FREE_HGLOB_ON_RELEASE, &pStm); in ~CAPNDataObject() local
110 OSL_ENSURE( E_INVALIDARG != hr, "invalid args passed to CreateStreamOnHGlobal" ); in ~CAPNDataObject()
112 if (SUCCEEDED(hr)) in ~CAPNDataObject()
114 hr = CoReleaseMarshalData(pStm.get()); in ~CAPNDataObject()
115 OSL_ENSURE(SUCCEEDED(hr), "CoReleaseMarshalData failed"); in ~CAPNDataObject()
131 HRESULT hr = E_NOINTERFACE; in QueryInterface() local
138 hr = S_OK; in QueryInterface()
141 return hr; in QueryInterface()
175 HRESULT hr = m_rIDataObjectOrg->GetData( pFormatetc, pmedium ); in GetData() local
177 if (RPC_E_WRONG_THREAD == hr) in GetData()
180 hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp); in GetData()
182 if (SUCCEEDED(hr)) in GetData()
183 hr = pIDOTmp->GetData(pFormatetc, pmedium); in GetData()
185 return hr; in GetData()
194 HRESULT hr = m_rIDataObjectOrg->EnumFormatEtc(dwDirection, ppenumFormatetc); in EnumFormatEtc() local
196 if (RPC_E_WRONG_THREAD == hr) in EnumFormatEtc()
199 hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp); in EnumFormatEtc()
201 if (SUCCEEDED(hr)) in EnumFormatEtc()
202 hr = pIDOTmp->EnumFormatEtc(dwDirection, ppenumFormatetc); in EnumFormatEtc()
204 return hr; in EnumFormatEtc()
213 HRESULT hr = m_rIDataObjectOrg->QueryGetData( pFormatetc ); in QueryGetData() local
215 if (RPC_E_WRONG_THREAD == hr) in QueryGetData()
218 hr = MarshalIDataObjectIntoCurrentApartment( &pIDOTmp ); in QueryGetData()
220 if (SUCCEEDED(hr)) in QueryGetData()
221 hr = pIDOTmp->QueryGetData(pFormatetc); in QueryGetData()
223 return hr; in QueryGetData()
232 HRESULT hr = m_rIDataObjectOrg->GetDataHere(pFormatetc, pmedium); in GetDataHere() local
234 if (RPC_E_WRONG_THREAD == hr) in GetDataHere()
237 hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp); in GetDataHere()
239 if (SUCCEEDED(hr)) in GetDataHere()
240 hr = pIDOTmp->GetDataHere(pFormatetc, pmedium); in GetDataHere()
242 return hr; in GetDataHere()
251 HRESULT hr = m_rIDataObjectOrg->GetCanonicalFormatEtc( pFormatectIn, pFormatetcOut ); in GetCanonicalFormatEtc() local
253 if (RPC_E_WRONG_THREAD == hr) in GetCanonicalFormatEtc()
256 hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp); in GetCanonicalFormatEtc()
258 if (SUCCEEDED(hr)) in GetCanonicalFormatEtc()
259 hr = pIDOTmp->GetCanonicalFormatEtc(pFormatectIn, pFormatetcOut); in GetCanonicalFormatEtc()
261 return hr; in GetCanonicalFormatEtc()
270 HRESULT hr = m_rIDataObjectOrg->SetData( pFormatetc, pmedium, fRelease ); in SetData() local
272 if (RPC_E_WRONG_THREAD == hr) in SetData()
275 hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp); in SetData()
277 if (SUCCEEDED(hr)) in SetData()
278 hr = pIDOTmp->SetData(pFormatetc, pmedium, fRelease); in SetData()
280 return hr; in SetData()
289 HRESULT hr = m_rIDataObjectOrg->DAdvise(pFormatetc, advf, pAdvSink, pdwConnection); in DAdvise() local
291 if (RPC_E_WRONG_THREAD == hr) in DAdvise()
294 hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp); in DAdvise()
296 if (SUCCEEDED(hr)) in DAdvise()
297 hr = pIDOTmp->DAdvise(pFormatetc, advf, pAdvSink, pdwConnection); in DAdvise()
299 return hr; in DAdvise()
308 HRESULT hr = m_rIDataObjectOrg->DUnadvise( dwConnection ); in DUnadvise() local
310 if (RPC_E_WRONG_THREAD == hr) in DUnadvise()
313 hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp); in DUnadvise()
315 if (SUCCEEDED(hr)) in DUnadvise()
316 hr = pIDOTmp->DUnadvise(dwConnection); in DUnadvise()
318 return hr; in DUnadvise()
327 HRESULT hr = m_rIDataObjectOrg->EnumDAdvise(ppenumAdvise); in EnumDAdvise() local
329 if (RPC_E_WRONG_THREAD == hr) in EnumDAdvise()
332 hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp); in EnumDAdvise()
334 if (SUCCEEDED(hr)) in EnumDAdvise()
335 hr = pIDOTmp->EnumDAdvise(ppenumAdvise); in EnumDAdvise()
337 return hr; in EnumDAdvise()
358 HRESULT hr = E_FAIL; in MarshalIDataObjectIntoCurrentApartment() local
363 hr = CreateStreamOnHGlobal(m_hGlobal, KEEP_HGLOB_ON_RELEASE, &pStm); in MarshalIDataObjectIntoCurrentApartment()
365 OSL_ENSURE(E_INVALIDARG != hr, "CreateStreamOnHGlobal with invalid args called"); in MarshalIDataObjectIntoCurrentApartment()
367 if (SUCCEEDED(hr)) in MarshalIDataObjectIntoCurrentApartment()
369 hr = CoUnmarshalInterface(pStm.get(), __uuidof(IDataObject), (void**)ppIDataObj); in MarshalIDataObjectIntoCurrentApartment()
370 OSL_ENSURE(CO_E_NOTINITIALIZED != hr, "COM is not initialized"); in MarshalIDataObjectIntoCurrentApartment()
373 return hr; in MarshalIDataObjectIntoCurrentApartment()