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: Thu, 24 Apr 2008 07:42:10 -0700 (PDT),    group: microsoft.public.inetsdk.programming.webbrowser_ctl        back       


How to download a html page without using IE cache   
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
date: Thu, 24 Apr 2008 07:42:10 -0700 (PDT)   author:   unknown

Re: How to download a html page without using IE cache   
wrote in message
news:0f7f87bd-519a-4dea-b985-d80f377ec4e7@t63g2000hsf.googlegroups.com
> 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.

I expect the first thing MSHTML does in IPersistMoniker::Load is 
register its own callback, thowing yours away.

See if this helps:

http://groups.google.com/group/microsoft.public.inetsdk.programming.webbrowser_ctl/browse_frm/thread/80a1ad12a99d45ce/1e9dc1ebda6f63f0

-- 
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, 24 Apr 2008 17:37:34 -0400   author:   Igor Tandetnik

Google
 
Web ureader.com


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