Re: PassthruAPP: QueryServiceFromClient(&spWindowForBinding); returns null for Media player request ?
- From: "Adrian" <neagaadrian@xxxxxxxxx>
- Date: 31 Jul 2006 07:22:10 -0700
Actually i found the way to communicate between CTestAPP and CTestSink,
again thanks to Igor.
My Continue method is like:
STDMETHODIMP CTestAPP::Continue(
/* [in] */ PROTOCOLDATA *pProtocolData)
{
ATLASSERT(m_spInternetProtocol != 0);
//MessageBox(NULL, "EE@", "", MB_OK);
CComPtr<IWindowForBindingUI> spWindowForBinding;
HRESULT hr =
m_internetSink.QueryServiceFromClient(&spWindowForBinding);
..............................
}
the problem now is that m_internetSink.QueryServiceFromClient fails,
does not even gets to return anything, throws atlassert error at:
if (SUCCEEDED(hr))
{
hr = spClientProvider->QueryService(guidService, riid, ppvObject);
}
any ideas why ?
Adrian wrote:
I'm using your code exactly and i got to the problem that there are two
classes: CTestSink and CTestAPP, it seems like Continue is in CTestAPP,
but i cannot do QueryServiceFromClient because this is a CTestSink
method,
First: is CTestAPP's Continue i need to get the window in ?
And: is there a way to QueryServiceFromClient in CTestAPP, or
communicate somehow between them, since the headers i need are
accesible in CTestSink::OnProgress while the window i also need is
accesible in CTestAPP...
Thanks.
Igor Tandetnik wrote:
"Adrian" <neagaadrian@xxxxxxxxx> wrote in message
news:1154341595.835624.39040@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm using Igor's toolkip, and as i need to know which IE window does
each request i have:
PROTOCOLDATA protdata;
protdata.grfFlags = PD_FORCE_SWITCH;
Switch(&protdata);
CComPtr<IWindowForBindingUI> spWindowForBinding;
QueryServiceFromClient(&spWindowForBinding);
Just calling Switch doesn't magically make subsequent
QueryServiceFromClient work. When you call Switch, soon your client will
turn around and call Continue on you, on the main thread. That's the
point of the exercise. You should call QueryServiceFromClient from your
Continue implementation.
--
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
.
- Follow-Ups:
- References:
- PassthruAPP: QueryServiceFromClient(&spWindowForBinding); returns null for Media player request ?
- From: Adrian
- Re: PassthruAPP: QueryServiceFromClient(&spWindowForBinding); returns null for Media player request ?
- From: Igor Tandetnik
- Re: PassthruAPP: QueryServiceFromClient(&spWindowForBinding); returns null for Media player request ?
- From: Adrian
- PassthruAPP: QueryServiceFromClient(&spWindowForBinding); returns null for Media player request ?
- Prev by Date: Re: PassthruAPP: QueryServiceFromClient(&spWindowForBinding); returns null for Media player request ?
- Next by Date: Re: PassthruAPP: QueryServiceFromClient(&spWindowForBinding); returns null for Media player request ?
- Previous by thread: Re: PassthruAPP: QueryServiceFromClient(&spWindowForBinding); returns null for Media player request ?
- Next by thread: Re: PassthruAPP: QueryServiceFromClient(&spWindowForBinding); returns null for Media player request ?
- Index(es):
Relevant Pages
|
|