Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Wed, 2 Apr 2008 03:00:45 -0700 (PDT),    group: microsoft.public.inetsdk.programming.urlmonikers        back       


How to set an InternetStatusCallback in PassThroughAPP   
Hey every body,
first, sorry for my poor english.
In these days, i did an passthroughapp for windows mobile, and it runs
well, i can get all the http and https requests header. and now i have
a question, because i want to get the time for sending a request or
receiving a request or dns resolution time ..., just like the
notification status in the function InternetStatusCallback,
ex. I can get the sending request time between
INTERNET_STATUS_SENDING_REQUEST and INTERNET_STATUS_REQUEST_SENT.

if someone show me the way how to do that?

Thanks for every kind of feedback

Yé
date: Wed, 2 Apr 2008 03:00:45 -0700 (PDT)   author:   henry_yeye

Re: How to set an InternetStatusCallback in PassThroughAPP   
"henry_yeye"  wrote in message
news:f92fcb62-bd93-4366-abf8-02ed42020384@u69g2000hse.googlegroups.com
> In these days, i did an passthroughapp for windows mobile, and it runs
> well, i can get all the http and https requests header. and now i have
> a question, because i want to get the time for sending a request or
> receiving a request or dns resolution time ..., just like the
> notification status in the function InternetStatusCallback,
> ex. I can get the sending request time between
> INTERNET_STATUS_SENDING_REQUEST and INTERNET_STATUS_REQUEST_SENT.

Many of INTERNET_STATUS_* values are mirrored by BINDSTATUS_* values you 
receive in IInternetProtocolSink::ReportProgress. E.g. 
INTERNET_STATUS_SENDING_REQUEST corresponds to 
BINDSTATUS_SENDINGREQUEST.

INTERNET_STATUS_REQUEST_SENT callback doesn't result in ReportProgress 
call. I don't see any way to hook into it from a Passthrough APP.
-- 
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
date: Wed, 2 Apr 2008 07:36:38 -0400   author:   Igor Tandetnik

Re: How to set an InternetStatusCallback in PassThroughAPP   
On 2 avr, 13:36, "Igor Tandetnik"  wrote:
> "henry_yeye"  wrote in message
>
> news:f92fcb62-bd93-4366-abf8-02ed42020384@u69g2000hse.googlegroups.com
>
> > In these days, i did an passthroughapp for windows mobile, and it runs
> > well, i can get all the http and https requests header. and now i have
> > a question, because i want to get the time for sending a request or
> > receiving a request or dns resolution time ..., just like the
> > notification status in the function InternetStatusCallback,
> > ex. I can get the sending request time between
> > INTERNET_STATUS_SENDING_REQUEST and INTERNET_STATUS_REQUEST_SENT.
>
> Many of INTERNET_STATUS_* values are mirrored by BINDSTATUS_* values you
> receive in IInternetProtocolSink::ReportProgress. E.g.
> INTERNET_STATUS_SENDING_REQUEST corresponds to
> BINDSTATUS_SENDINGREQUEST.
>
> INTERNET_STATUS_REQUEST_SENT callback doesn't result in ReportProgress
> call. I don't see any way to hook into it from a Passthrough APP.
> --
> 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

Hi Igor

Thanks for your response.
So, it means i can just get the RequestSentTicks, and please correct
me if i am wrong:
between BINDSTATUS_FINDINGRESOURCE and BINDSTATUS_CONNECTING -> Dns
Lookup time ?
between BINDSTATUS_CONNECTING and BINDSTATUS_SENDINGREQUEST -> Connect
time ?
between BSCF_FIRSTDATANOTIFICATION and BSCF_LASTDATANOTIFICATION ->
Receive data time ?

Best wishes,

Yé
date: Wed, 2 Apr 2008 05:03:07 -0700 (PDT)   author:   henry_yeye

Re: How to set an InternetStatusCallback in PassThroughAPP   
On 2 avr, 14:03, henry_yeye  wrote:
> On 2 avr, 13:36, "Igor Tandetnik"  wrote:
>
>
>
> > "henry_yeye"  wrote in message
>
> >news:f92fcb62-bd93-4366-abf8-02ed42020384@u69g2000hse.googlegroups.com
>
> > > In these days, i did an passthroughapp for windows mobile, and it runs> > > well, i can get all the http and https requests header. and now i have> > > a question, because i want to get the time for sending a request or
> > > receiving a request or dns resolution time ..., just like the
> > > notification status in the function InternetStatusCallback,
> > > ex. I can get the sending request time between
> > > INTERNET_STATUS_SENDING_REQUEST and INTERNET_STATUS_REQUEST_SENT.
>
> > Many of INTERNET_STATUS_* values are mirrored by BINDSTATUS_* values you> > receive in IInternetProtocolSink::ReportProgress. E.g.
> > INTERNET_STATUS_SENDING_REQUEST corresponds to
> > BINDSTATUS_SENDINGREQUEST.
>
> > INTERNET_STATUS_REQUEST_SENT callback doesn't result in ReportProgress
> > call. I don't see any way to hook into it from a Passthrough APP.
> > --
> > 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
>
> Hi Igor
>
> Thanks for your response.
> So, it means i can just get the RequestSentTicks, and please correct
> me if i am wrong:
> between BINDSTATUS_FINDINGRESOURCE and BINDSTATUS_CONNECTING -> Dns
> Lookup time ?
> between BINDSTATUS_CONNECTING and BINDSTATUS_SENDINGREQUEST -> Connect
> time ?
> between BSCF_FIRSTDATANOTIFICATION and BSCF_LASTDATANOTIFICATION ->
> Receive data time ?
>
> Best wishes,
>
> Yé

Hi Igor

I did something try to get HINTERNET when BINDSTATUS_CONNECTING is
sent, then set an InternetSetStatusCallback to get all de
INTERNET_STATUS_*, I've got an HINTERNET handler from
IWininetHttpInfo::QueryOptiong with INTERNET_OPTION_PARENT_HANDLE flag
which is not NULL (something like 0cc000c8), but the Callback methode
is never called.
Am I wrong ???

//Test for get HINTERNET Handler
CComPtr<IWinInetHttpInfo> m_spWinInetHttpInfo;
HRESULT hrTemp = m_spTargetProtocol-
>QueryInterface(IID_IWinInetHttpInfo,
	reinterpret_cast<void**>(&m_spWinInetHttpInfo));
DWORD dwFlags;
INTERNET_STATUS_CALLBACK hrStatus;
if(SUCCEEDED(hrTemp))
{
    DWORD dwBuffLen;
    m_spWinInetHttpInfo->QueryOption(INTERNET_OPTION_PARENT_HANDLE,
(LPVOID)&dwFlags, &dwBuffLen);
    InternetSetStatusCallback((HINTERNET)dwFlags,
CTestSink::MyInternetCallback);
    if(hrStatus == INTERNET_INVALID_STATUS_CALLBACK)
	OutputDebugString(L"INTERNET_INVALID_STATUS_CALLBACK\n");
    g_pMainWin->Log(L"HINTERNET: %d, %0x08p", dwFlags, dwFlags);
}

Best wishes,

Yé
date: Wed, 2 Apr 2008 05:13:49 -0700 (PDT)   author:   henry_yeye

Re: How to set an InternetStatusCallback in PassThroughAPP   
"henry_yeye"  wrote in message
news:29da1ff7-fc19-45bf-a193-d1adff9e4f14@8g2000hsu.googlegroups.com
> between BINDSTATUS_FINDINGRESOURCE and BINDSTATUS_CONNECTING -> Dns
> Lookup time ?
> between BINDSTATUS_CONNECTING and BINDSTATUS_SENDINGREQUEST -> Connect
> time ?
> between BSCF_FIRSTDATANOTIFICATION and BSCF_LASTDATANOTIFICATION ->
> Receive data time ?

Yes, this looks right.
-- 
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
date: Wed, 2 Apr 2008 08:14:59 -0400   author:   Igor Tandetnik

Re: How to set an InternetStatusCallback in PassThroughAPP   
On 2 avr, 14:14, "Igor Tandetnik"  wrote:
> "henry_yeye"  wrote in message
>
> news:29da1ff7-fc19-45bf-a193-d1adff9e4f14@8g2000hsu.googlegroups.com
>
> > between BINDSTATUS_FINDINGRESOURCE and BINDSTATUS_CONNECTING -> Dns
> > Lookup time ?
> > between BINDSTATUS_CONNECTING and BINDSTATUS_SENDINGREQUEST -> Connect
> > time ?
> > between BSCF_FIRSTDATANOTIFICATION and BSCF_LASTDATANOTIFICATION ->
> > Receive data time ?
>
> Yes, this looks right.
> --
> 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

Hi Igor

I did something try to get HINTERNET when BINDSTATUS_CONNECTING is
sent, then set an InternetSetStatusCallback to get all de
INTERNET_STATUS_*, I've got an HINTERNET handler from
IWininetHttpInfo::QueryOptiong with INTERNET_OPTION_PARENT_HANDLE flag
which is not NULL (something like 0cc000c8), but the Callback methode
is never called.
Am I wrong ???

//Test for get HINTERNET Handler
CComPtr<IWinInetHttpInfo> m_spWinInetHttpInfo;
HRESULT hrTemp = m_spTargetProtocol-
>QueryInterface(IID_IWinInetHttpInfo,

        reinterpret_cast<void**>(&m_spWinInetHttpInfo));
DWORD dwFlags;
INTERNET_STATUS_CALLBACK hrStatus;
if(SUCCEEDED(hrTemp))
{
    DWORD dwBuffLen;
    m_spWinInetHttpInfo->QueryOption(INTERNET_OPTION_PARENT_HANDLE,
(LPVOID)&dwFlags, &dwBuffLen);
    InternetSetStatusCallback((HINTERNET)dwFlags,
CTestSink::MyInternetCallback);
    if(hrStatus == INTERNET_INVALID_STATUS_CALLBACK)
        OutputDebugString(L"INTERNET_INVALID_STATUS_CALLBACK\n");
    g_pMainWin->Log(L"HINTERNET: %d, %0x08p", dwFlags, dwFlags);

}

Best wishes,

Yé
date: Wed, 2 Apr 2008 05:20:08 -0700 (PDT)   author:   henry_yeye

Re: How to set an InternetStatusCallback in PassThroughAPP   
"henry_yeye"  wrote in message
news:e462d2b6-7154-425f-bc41-a68c5d18ae57@c65g2000hsa.googlegroups.com
> I did something try to get HINTERNET when BINDSTATUS_CONNECTING is
> sent, then set an InternetSetStatusCallback to get all de
> INTERNET_STATUS_*, I've got an HINTERNET handler from
> IWininetHttpInfo::QueryOptiong with INTERNET_OPTION_PARENT_HANDLE flag
> which is not NULL (something like 0cc000c8), but the Callback methode
> is never called.

INTERNET_OPTION_PARENT_HANDLE probably gives you the session handle (as 
returned by InternetConnect), not a request handle (from 
HttpOpenRequest). Interesting nofitications are fired on the latter, of 
course.

Even if you somehow get the request handle, and install your own 
callback, this will remove the callback used by the stock HTTP APP so it 
couldn't do its job. The whole thing will break.
-- 
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
date: Wed, 2 Apr 2008 08:27:30 -0400   author:   Igor Tandetnik

Re: How to set an InternetStatusCallback in PassThroughAPP   
On 2 avr, 14:27, "Igor Tandetnik"  wrote:
> "henry_yeye"  wrote in message
>
> news:e462d2b6-7154-425f-bc41-a68c5d18ae57@c65g2000hsa.googlegroups.com
>
> > I did something try to get HINTERNET when BINDSTATUS_CONNECTING is
> > sent, then set an InternetSetStatusCallback to get all de
> > INTERNET_STATUS_*, I've got an HINTERNET handler from
> > IWininetHttpInfo::QueryOptiong with INTERNET_OPTION_PARENT_HANDLE flag
> > which is not NULL (something like 0cc000c8), but the Callback methode
> > is never called.
>
> INTERNET_OPTION_PARENT_HANDLE probably gives you the session handle (as
> returned by InternetConnect), not a request handle (from
> HttpOpenRequest). Interesting nofitications are fired on the latter, of
> course.
>
> Even if you somehow get the request handle, and install your own
> callback, this will remove the callback used by the stock HTTP APP so it
> couldn't do its job. The whole thing will break.
> --
> 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

Thanks very much Igor

Best wishes,
Yé
date: Wed, 2 Apr 2008 06:02:06 -0700 (PDT)   author:   henry_yeye

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us