How to download a html page without using IE cache
- From: MForceOne@xxxxxxxxx
- Date: Thu, 24 Apr 2008 07:42:10 -0700 (PDT)
Hi,
I want to download html page using the IHTMLDocument2 IPersistMoniker
interface.
I created a custom IBindStatusCallback object and use
RegisterBindStatusCallback to register it with a created IBindCtx.
See my steps below:
CComBSTR burl = url;
CComPtr<IHTMLDocument2> mDOC;
// init document //
CComQIPtr<IPersistMoniker> persist = mDOC;
CComPtr<IMoniker> moniker;
CreateURLMonikerEx(NULL, burl, &moniker, URL_MK_UNIFORM);
CComPtr<IBindCtx> bind;
CreateBindCtx(0,&bind);
CMyBindStatusCallback *pBSCB = new CMyBindStatusCallback ();
IBindStatusCallback *pPrevBSCB = NULL;
RegisterBindStatusCallback(bind, pBSCB , &pPrevBSCB, 0L);
persist->Load(FALSE, moniker, bind, STGM_READ);
Everything works fine but the page is still cached by IE.
Moreover the following functions of my custom IBindStatusCallback
object are never called:
OnStartBinding(DWORD dwReserved, IBinding *pib )
OnStopBinding( HRESULT hresult, LPCWSTR szError)
GetBindInfo(DWORD* pgrfBINDF, BINDINFO* pbindInfo)
I only see that AddRef() and Release() are called each two times and
QueryInterface(REFIID iid, void ** ppvObject) is called one time with
a query for IID_IServiceProvider which i don't have implemented.
In the IBindStatucCallback function GetBindInfo() i set the bind info
with BINDF_NOWRITECACHE and BINDF_PULLDATA
Does anyone know what i am doing wrong or what i need to do different
in order to load a html page by using the IHTMLDocument2
IPersistMoniker interface without using the IE cache?
Thank you for your help
Mike
.
- Follow-Ups:
- Re: How to download a html page without using IE cache
- From: Igor Tandetnik
- Re: How to download a html page without using IE cache
- Prev by Date: Re: mouse clicked Area from C# DOM
- Next by Date: Re: DXImageTransform.Microsoft.AlphaImageLoader with asynchronous pluggable protocol
- Previous by thread: About session cookie
- Next by thread: Re: How to download a html page without using IE cache
- Index(es):