Re: Igor, pAPP toolkit questions
From: Josh Mclaren (optics201_at_optonline.com)
Date: 11/23/04
- Next message: Igor Tandetnik: "Re: Igor, pAPP toolkit questions"
- Previous message: MiraclesHappen: "Re: Content-type bug in IE since SP2"
- In reply to: Igor Tandetnik: "Re: Igor, pAPP toolkit questions"
- Next in thread: Igor Tandetnik: "Re: Igor, pAPP toolkit questions"
- Reply: Igor Tandetnik: "Re: Igor, pAPP toolkit questions"
- Messages sorted by: [ date ] [ thread ]
Date: 23 Nov 2004 14:46:54 -0800
Igor,
Thanks for your response. Your toolkit has just been invaluable and I
just wanted to mention that before I continue. Let me give you some
further background: I have removed the MainDlg files from the Toolkit
Sample and moved the spSession->RegisterNameSpace into a method off of
an ATL COM object. This is so that I can associate the pAPP with a
WebBrowser control which is instantiated in a .NET C# project.
This is working great, and currently, instead of the MainDlg Log
function being called, I have mimicked the toolkit functionality by
raising a COM event where the .NET Form behaves similarly (appending
the request/response string to a multi line textbox).
At this point, I am just playing around in the methods defined in
TestApp.cpp (BeginningTransaction, OnResponse, ReportProgress). I've
been wary of adjusting methods defined in ProtocolImpl.inl or
elsewhere, simply because I'm not sure if I'm playing in the right
place.
It seems that the methods in TestApp.cpp have access to most of the
objects I need so far, except now that I've entered into
Authentication territory.
> I'm not sure what that means. You pass the buffer to the method, right?
> So make sure it is valid. Am I missing something obvious?
If I take the lines in BeginningTransaction which currently point pbuf
to the HTTP_QUERY_RAW_HEADERS_CRLF , and change it to
HTTP_QUERY_AUTHORIZATION, and debug/watch the pointer it remains a
"bad pointer". This is regardless of whether I run the same code
throughout the above three methods (BeginningTransaction, OnResponse,
ReportProgress).
---Although--- I may have missed it if it was populated in one of the
many OnResponse calls.
If I change it back to the raw_headers flag, the pointer contains data
and is fine, so I don't think I have a pointer problem but something
deeper.
> Also, make sure you don't call too early. You definitely need to do it
> after IAuthenticate::Authenticate returns. Probably the best place is in
> BINDSTATUS_SENDINGREQUEST notification - by this time, all the request
> headers have been fully prepared.
I'll try this and let you know. I am assuming I can check for
BINDSTATUS_SENDINGREQUEST within ReportProgress as you do now for
BINDSTATUS_REDIRECTING.
> It is the best and only way. The POST data is supplied in BINDINFO
> structure.
Thanks!
> I found GetBindString to be very inconsistent. It works for some strings
> but not others, with no apparent reason. Usually there are alternative
> ways to get the same information, so I haven't spent much time on it.
Thanks again! :)
(html content)
> IInternetProtocol::Read is the only place you can see it.
Ok, can you expand on this a bit? The toolkit has a
IInternetProtocolImpl::Read method implemented in ProtocolImpl.inl
which just seems to forward it on to the target protocol's Read. Are
you suggesting I add a datastructure there to maintain the HTML info
(I assume the HTML comes in the first parameter *pv)? I hope its
possible to pass that structure back up to the TestApp.cpp/ CTestSink
level.
> Now I'm confused. Are you asking about response body (presumably HTML
> content), or response headers?
In my most ideal dreamworld, I would like one object where *all* data
that is sent across the network stream is available. One big string
which I could parse out by myself is my desired goal.
-Josh
"Igor Tandetnik" <itandetnik@mvps.org> wrote in message news:<#RzCtmX0EHA.804@TK2MSFTNGP12.phx.gbl>...
> "Josh Mclaren" <optics201@optonline.com> wrote in message
> news:72494446.0411221935.4f759181@posting.google.com
> > I am having trouble implementing what you suggested in the following
> > post, with the pAPP toolkit. :
> >
> > http://groups.google.com/groups?hl=en&lr=&safe=off&selm=OsmO3iP5DHA.1664%40TK2MSFTNGP11.phx.gbl
> >
> > When I simply take the pAPP toolkit and replace the
> > HTTP_QUERY_RAW_HEADERS_CRLF | HTTP_QUERY_FLAG_REQUEST_HEADERS
> > QueryInfo call
> >
> > with
> >
> > HTTP_QUERY_AUTHORIZATION | HTTP_QUERY_FLAG_REQUEST_HEADERS
> >
> > the buffer is always an invalid pointer.
>
> I'm not sure what that means. You pass the buffer to the method, right?
> So make sure it is valid. Am I missing something obvious?
>
> Also, make sure you don't call too early. You definitely need to do it
> after IAuthenticate::Authenticate returns. Probably the best place is in
> BINDSTATUS_SENDINGREQUEST notification - by this time, all the request
> headers have been fully prepared.
>
> > I've also played around with
> > GetBindInfo off of the m_spInternetBindInfo object. I've been able to
> > use that succesfully to retreive post Data (though I'm not sure that
> > is the best way)
>
> It is the best and only way. The POST data is supplied in BINDINFO
> structure.
>
> > and I thought I might be able to use it similarly to
> > retrieve BINDSTRING_USERNAME as some MSDN code retrieves MIME types.
>
> I found GetBindString to be very inconsistent. It works for some strings
> but not others, with no apparent reason. Usually there are alternative
> ways to get the same information, so I haven't spent much time on it.
>
> > Another question I had is to ask is what is the best way to examine
> > the html content that is received with the current toolkit.
>
> IInternetProtocol::Read is the only place you can see it.
>
> > Ideally
> > I'd like the entire message rather than dealing with QueryInfo's
> > splitting of the headers etc.
>
> Now I'm confused. Are you asking about response body (presumably HTML
> content), or response headers?
- Next message: Igor Tandetnik: "Re: Igor, pAPP toolkit questions"
- Previous message: MiraclesHappen: "Re: Content-type bug in IE since SP2"
- In reply to: Igor Tandetnik: "Re: Igor, pAPP toolkit questions"
- Next in thread: Igor Tandetnik: "Re: Igor, pAPP toolkit questions"
- Reply: Igor Tandetnik: "Re: Igor, pAPP toolkit questions"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|