LEFT | RIGHT |
1 #ifndef PASSTHROUGHAPP_SINKPOLICY_INL | 1 #ifndef PASSTHROUGHAPP_SINKPOLICY_INL |
2 #define PASSTHROUGHAPP_SINKPOLICY_INL | 2 #define PASSTHROUGHAPP_SINKPOLICY_INL |
3 | 3 |
4 #if _MSC_VER > 1000 | 4 #if _MSC_VER > 1000 |
5 #pragma once | 5 #pragma once |
6 #endif // _MSC_VER > 1000 | 6 #endif // _MSC_VER > 1000 |
7 | 7 |
8 #ifndef PASSTHROUGHAPP_SINKPOLICY_H | 8 #ifndef PASSTHROUGHAPP_SINKPOLICY_H |
9 #error SinkPolicy.inl requires SinkPolicy.h to be included first | 9 #error SinkPolicy.inl requires SinkPolicy.h to be included first |
10 #endif | 10 #endif |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 } | 376 } |
377 if (SUCCEEDED(hr)) | 377 if (SUCCEEDED(hr)) |
378 { | 378 { |
379 hr = pSink->QueryInterface(IID_IInternetBindInfo, reinterpret_ca
st<void**>(&spBindInfo)); | 379 hr = pSink->QueryInterface(IID_IInternetBindInfo, reinterpret_ca
st<void**>(&spBindInfo)); |
380 ATLASSERT(SUCCEEDED(hr) && spBindInfo != 0); | 380 ATLASSERT(SUCCEEDED(hr) && spBindInfo != 0); |
381 } | 381 } |
382 if (SUCCEEDED(hr) && !handled) | 382 if (SUCCEEDED(hr) && !handled) |
383 { | 383 { |
384 hr = pTargetProtocol->Start(szUrl, spSink, spBindInfo, grfPI, dw
Reserved); | 384 hr = pTargetProtocol->Start(szUrl, spSink, spBindInfo, grfPI, dw
Reserved); |
385 } | 385 } |
| 386 if (E_ABORT == hr && pSink->m_blockedInTransaction) |
| 387 { |
| 388 static_cast<Protocol*>(this)->m_shouldSupplyCustomContent = true
; |
| 389 pSink->m_spInternetProtocolSink->ReportProgress(BINDSTATUS_MIMET
YPEAVAILABLE, L"text/html"); |
| 390 pSink->m_spInternetProtocolSink->ReportData(BSCF_FIRSTDATANOTIFI
CATION, 0, static_cast<ULONG>(g_blockedByABPPage.size())); |
| 391 return S_OK; |
| 392 } |
386 return hr; | 393 return hr; |
387 } | 394 } |
388 | 395 |
389 | 396 |
390 template <class Protocol, class Sink> | 397 template <class Protocol, class Sink> |
391 inline Sink* CustomSinkStartPolicy<Protocol, Sink>::GetSink( | 398 inline Sink* CustomSinkStartPolicy<Protocol, Sink>::GetSink( |
392 const Protocol* pProtocol) | 399 const Protocol* pProtocol) |
393 { | 400 { |
394 return Protocol::ComObjectClass::GetSink(pProtocol); | 401 return Protocol::ComObjectClass::GetSink(pProtocol); |
395 } | 402 } |
396 | 403 |
397 template <class Protocol, class Sink> | 404 template <class Protocol, class Sink> |
398 inline Sink* CustomSinkStartPolicy<Protocol, Sink>::GetSink() const | 405 inline Sink* CustomSinkStartPolicy<Protocol, Sink>::GetSink() const |
399 { | 406 { |
400 return GetSink(static_cast<const Protocol*>(this)); | 407 return GetSink(static_cast<const Protocol*>(this)); |
401 } | 408 } |
402 | 409 |
403 template <class Protocol, class Sink> | 410 template <class Protocol, class Sink> |
404 inline Protocol* CustomSinkStartPolicy<Protocol, Sink>::GetProtocol( | 411 inline Protocol* CustomSinkStartPolicy<Protocol, Sink>::GetProtocol( |
405 const Sink* pSink) | 412 const Sink* pSink) |
406 { | 413 { |
407 return Protocol::ComObjectClass::GetProtocol(pSink); | 414 return Protocol::ComObjectClass::GetProtocol(pSink); |
408 } | 415 } |
409 | 416 |
410 } // end namespace PassthroughAPP | 417 } // end namespace PassthroughAPP |
411 | 418 |
412 #endif // PASSTHROUGHAPP_SINKPOLICY_INL | 419 #endif // PASSTHROUGHAPP_SINKPOLICY_INL |
LEFT | RIGHT |