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: 30 Jun 2005 03:26:41 -0700,    group: microsoft.public.inetsdk.programming.urlmonikers        back       


UrlMon calls Lockrequest in between Read   
Hello

The urlmon of the pluggable protocol is calling LockRequest method
IInternetProtocol in between reads. According to MSDN the call to
LockRequest should be made after all the data has been read or
downloaded. but in my case its not so? has anyone experienced this
behaviour before?

Here is the sequence of calls happening to me

   IInternetProtocol::Start
   IInternetProtocol::Read
   IInternetProtocol::Read
   IInternetProtocol::LockRequest
   IInternetProtocol::Read
   IInternetProtocol::Read
   IInternetProtocol::Read
   IInternetProtocol::Read
   IInternetProtocol::Continue
   IInternetProtocol::Terminate
   IInternetProtocol::UnlockRequest

its always consistent that urlmon calls LockRequest after having done
two times to Read Method

Regards
Raghavulu
date: 30 Jun 2005 03:26:41 -0700   author:   Raghavulu

Re: UrlMon calls Lockrequest in between Read   
"Raghavulu"  wrote in message
news:1120127201.421354.113760@g14g2000cwa.googlegroups.com
> The urlmon of the pluggable protocol is calling LockRequest method
> IInternetProtocol in between reads. According to MSDN the call to
> LockRequest should be made after all the data has been read or
> downloaded. but in my case its not so? has anyone experienced this
> behaviour before?
>
> Here is the sequence of calls happening to me
>
>   IInternetProtocol::Start
>   IInternetProtocol::Read
>   IInternetProtocol::Read
>   IInternetProtocol::LockRequest
>   IInternetProtocol::Read
>   IInternetProtocol::Read
>   IInternetProtocol::Read
>   IInternetProtocol::Read
>   IInternetProtocol::Continue
>   IInternetProtocol::Terminate
>   IInternetProtocol::UnlockRequest
>
> its always consistent that urlmon calls LockRequest after having done
> two times to Read Method

I've seen this happen, but only after Read has returned S_FALSE, 
indicating that there is no more data. The client would then call 
LockRequest, but for some reason might make a few more Read call that of 
course do nothing. Are you saying that in your case, LockRequest is 
called while the data is not yet fully read? Do you have a URL I can 
test against?
-- 
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: Thu, 30 Jun 2005 07:47:03 -0400   author:   Igor Tandetnik

Re: UrlMon calls Lockrequest in between Read   
Yes in my case, URLMON calls to the LockRequest eventhough the data is
not fully read i.e ::Read method is returning S_OK. As far as URL is
concerned it's happening for every URL. ie fetching a HTML file, an
image etc.

prot://hostname/data/data.html
prot://hostname/data/image.bmp

Regards
Raghavulu
date: 30 Jun 2005 05:32:06 -0700   author:   Raghavulu

Re: UrlMon calls Lockrequest in between Read   
"Raghavulu"  wrote in message
news:1120134726.835231.298980@o13g2000cwo.googlegroups.com
> Yes in my case, URLMON calls to the LockRequest eventhough the data is
> not fully read i.e ::Read method is returning S_OK. As far as URL is
> concerned it's happening for every URL. ie fetching a HTML file, an
> image etc.
>
> prot://hostname/data/data.html
> prot://hostname/data/image.bmp

My guess is LockRequest is called after you report 
BSCF_LASTDATANOTIFICATION and/or BSCF_DATAFULLYAVAILABLE in 
IInternetProtocolSink::ReportData. Is this the case?
-- 
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: Thu, 30 Jun 2005 09:03:15 -0400   author:   Igor Tandetnik

Re: UrlMon calls Lockrequest in between Read   
that's true. it's due to that i wake up apartment thread using
IInternetProtocolSink::Switch in  IInternetProtocolRoot::Start and bcos
of this IInternetProtocolRoot::Continue method is called in which i was
calling IInternetProtocolSink::ReportDĀ­ata.

I have to call IInternetProtocolSink::ReportDĀ­ata in
IInternetProtocolRoot::Continue otherwise i simply get an empty output
date: 30 Jun 2005 07:41:04 -0700   author:   Raghavulu

Re: UrlMon calls Lockrequest in between Read   
"Raghavulu"  wrote in message
news:1120142464.917769.15090@o13g2000cwo.googlegroups.com
> that's true. it's due to that i wake up apartment thread using
> IInternetProtocolSink::Switch in  IInternetProtocolRoot::Start and
> bcos of this IInternetProtocolRoot::Continue method is called in
> which i was calling IInternetProtocolSink::ReportData.
>
> I have to call IInternetProtocolSink::ReportData in
> IInternetProtocolRoot::Continue otherwise i simply get an empty output

Of course you need to call ReportData. What why do you care about 
LockRequest then? You tell the client that you have all the data fully 
downloaded, so it proceeds to lock it so that it is not accidentally 
purged from the cache at this point. Why again is this a problem for 
you?
-- 
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: Thu, 30 Jun 2005 11:05:13 -0400   author:   Igor Tandetnik

Re: UrlMon calls Lockrequest in between Read   
For normal urls like html and images its fine but in the case pdf files
it doesnt work. what happens in this case is once it receives the
lockrequest after two time read, i just see the splash screen of
opening the acrobat reader without content of pdf.  my doubt is its
because due to the call to LockRequest and not anymore further calls to
Read method.
date: 30 Jun 2005 08:21:22 -0700   author:   Raghavulu

Google
 
Web ureader.com


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