Re: ActiveX, Loading File / Content
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Wed, 13 Sep 2006 11:08:22 -0400
Alexander Adam <contact@xxxxxxxxxxx> wrote:
Thanks for trying to help me out, I really appreciate. I know the demo
with CBindStatusCallback to asynchron download something and it fires
a OnDataAvailable(). That works just fine and I am also able to catch
when loading has finished (pBytes is NULL) but how can I now take that
whole content and save it to a temporary file like IE would do and
also that next time when loading, its not downloading again but
taking the file from IE?
In IBindStatusCallback::GetBindInfo, specify BINDF_NEEDFILE and _omit_
other cache-related flags such as BINDF_GETNEWESTVERSION and
BINDF_PRAGMA_NO_CACHE. Unrelated to cache issue, always specify
BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA (I found that
to be the only combination that works reliably).
At some point, OnProgress will be called with status code of
BINDSTATUS_CACHEFILENAMEAVAILABLE where you have the cache file name.
After that, complete the download as you would normally: you can ignore
the data you are given in OnDataAvailable. Once the download completes,
you can read directly from cache file.
--
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:
- Re: ActiveX, Loading File / Content
- From: Alexander Adam
- Re: ActiveX, Loading File / Content
- References:
- ActiveX, Loading File / Content
- From: contact
- Re: ActiveX, Loading File / Content
- From: Igor Tandetnik
- Re: ActiveX, Loading File / Content
- From: Alexander Adam
- Re: ActiveX, Loading File / Content
- From: Igor Tandetnik
- Re: ActiveX, Loading File / Content
- From: Alexander Adam
- ActiveX, Loading File / Content
- Prev by Date: Re: ActiveX, Loading File / Content
- Next by Date: IHTMLElementRender and IHTMLDocument2 from IShellWindows
- Previous by thread: Re: ActiveX, Loading File / Content
- Next by thread: Re: ActiveX, Loading File / Content
- Index(es):
Relevant Pages
|
|