Post by Igor TandetnikPost by g***@yahoo.co.inI have called the switch() from OnResponse method.It works fine.
Then call goes to the below mentioned Continue function in
ProtocolImpl.inl file.
inline STDMETHODIMP IInternetProtocolImpl::Continue(
/* [in] */ PROTOCOLDATA *pProtocolData)
I changed the code for continue() function in ProtocolImpl.inl file
Why? Simply override it in your protocol class. It's virtual.
Post by g***@yahoo.co.in'QueryServiceFromClient': identifier not found.
This is a method of the sink class, not the protocol. It's very simple -
see how it's implemented, copy/paste the code. It's just a couple of
lines.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
Hello Igor,
I understand that I need to override it. But I am totally confused
about how to do it.
I tried overiding it using following ways but always landed with an
error.
1. class CTestSink :
public PassthroughAPP::CInternetProtocolSinkWithSP<CTestSink>,
public IHttpNegotiate,
public IInternetProtocol
2. class CTestSink :
public PassthroughAPP::CInternetProtocolSinkWithSP<CTestSink>,
public IHttpNegotiate,
public IInternetProtocolRoot
3. class CTestSink :
public PassthroughAPP::CInternetProtocolSinkWithSP<CTestSink>,
public IHttpNegotiate,
public IInternetProtocolImpl
4. class CTestSink :
public PassthroughAPP::CInternetProtocolSinkWithSP<CTestSink>,
public IHttpNegotiate,
public PassthroughAPP::CInternetProtocolImpl
I am confused about how to override it !!!
One more thing -----
Below is the code for continue() . Is it OK ?
STDMETHODIMP CTestSink::Continue()
{
USES_CONVERSION;
ATLASSERT(m_spInternetProtocol != 0);
HRESULT hr = m_spInternetProtocol ? m_spInternetProtocol-
Post by Igor TandetnikContinue(pProtocolData) : S_OK;
REFGUID rguidReason = IID_IHttpSecurity;
HWND phwnd = NULL;
CComPtr<IWindowForBindingUI> spWindowForBindingUI;
QueryServiceFromClient(&spWindowForBindingUI);
HRESULT hr = spWindowForBindingUI ?
spWindowForBindingUI->GetWindow(rguidReason,&phwnd) : S_OK;
return hr;
}
Please let me know how to override it &&
Whether above Continue() function is right for the overriding
implementation ???
Thanks & Awaiting your reply,
Hitesh