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
"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
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
"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
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
"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
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.