Re: ActiveX, Loading File / Content



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


.



Relevant Pages

  • Re: reading IECache files
    ... folder it is in is "01UZ05M7"? ... I did post code a few days ago that would take a temp cache file name (ie ... could use UrlDownloadToFile which would either a) download the file from the ...
    (microsoft.public.vb.winapi)
  • Re: Attention David F
    ... the page was loading, especially with Google analytics... ... Connection Rate Download Time ... I think I will stay with Publisher 2000 ... Web Plus does seem to offer a lot of features that you ...
    (microsoft.public.publisher.webdesign)
  • Re: FAQ 3.19 How can I make my CGI script more efficient?
    ... increase in Apache speed is amazing. ... Loading Begin Download ... Loading End Navigation ... Interactive End Download ...
    (comp.lang.perl.misc)
  • Re: HELP! E2k3 server keeps rebooting...
    ... Download the symbols from here. ... Unable to load image ntoskrnl.exe, Win32 error 2 ... Loading Kernel Symbols ...
    (microsoft.public.exchange.admin)
  • Re: Pages Hang When Loading & Cannot Download
    ... > Click on 'Tools' at the top of this Internet Explorer page. ... Scroll down the list until you find the 'Download' settings ... > How to make a good newsgroup post: ... >> Previously acessible sites now hang when loading and stop loading. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)