Using "Passthrough APP" with bcb 5.0
Hi
I am trying to use "Passthrough APP"
( see http://itandetnik.150m.com/PassthruAPP.zip )
in Borland C++ Builder 5.0 (BCB)
The toolbox is perfect for my applitcation.
I was able to compile .in BCB
However when executing I get the exception.
"Access Violation at address ..." see the '<---' below
/* file sinkpol.inl */
...
// ===== CustomSinkStartPolicy =====
template <class Protocol, class Sink>
inline HRESULT CustomSinkStartPolicy<Protocol, Sink>::OnStart(
LPCWSTR szUrl,
IInternetProtocolSink *pOIProtSink, IInternetBindInfo
*pOIBindInfo,
DWORD grfPI, HANDLE_PTR dwReserved,
IInternetProtocol* pTargetProtocol ) const
{
Sink *pSink;
HRESULT hr;
IInternetProtocolSink *spSink;
IInternetBindInfo *spBindInfo;
ATLASSERT(pTargetProtocol != 0);
pSink = GetSink( (const Protocol *)(this) );
hr = pSink->OnStart( szUrl, pOIProtSink, pOIBindInfo, grfPI,
dwReserved, pTargetProtocol );
if (SUCCEEDED(hr)) {
hr = pSink->QueryInterface( IID_IInternetBindInfo,
<------- HERE gives the exception
(void **)(&spBindInfo) );
ATLASSERT(SUCCEEDED(hr) && spBindInfo != 0);
}
if (SUCCEEDED(hr)) {
hr = pSink->QueryInterface( IID_IInternetProtocolSink,
(void **)(&spSink) );
ATLASSERT(SUCCEEDED(hr) && spSink != 0);
}
if (SUCCEEDED(hr)) {
hr = pTargetProtocol->Start( szUrl, spSink, spBindInfo,
grfPI,
dwReserved );
}
return hr;
}
Yes the same program compiles and executes without any problem
under Visual C++
Anyone can point about how to solve this ?
Thanks
date: Mon, 29 Oct 2007 07:57:04 -0700
author: unknown