Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

WinInet questions

Hi, does anyone know if WININET can be used to do the "save as webpage" style behavior IE provides (CityDesk does something similar with the 'Import Web Page' function), in which it downloads the HTML file and any referenced images, etc.?  I've been looking in the docs, but am unclear as whether the InternetReadFile() method works in this fashion.  For instance, I don't see how to retrieve the file names of images, etc. 

Also, if anyone knows of an interop wrapper over this I'd be grateful.  PInvoke.net has only limited signatures currently and I'm by no means a Win32 expert. 

Thanks!

Kris
Friday, October 08, 2004

it's highly unlikely that wininet will be able to help you. it deals with data transfer protocols (http, ftp, etc), not applications stuff like HTML.

this is probably somewhere in the Browser object (in shdocvw or browsui, i forget). it might also be in mshtml (which is the HTML renderer) or there's a highly remote chance that it's in URLMON (which handles 'url' 'monikers' and does magic with them, usually downloading the data with wininet and telling the browser what it should do with it)

mb
Saturday, October 09, 2004

Yup, very easy using just the MSHTML control and walking the IHTMLDocument images collection after DocumentComplete event fires from the browser control.  Thanks for the advice, mb!

Kris
Sunday, October 10, 2004

*  Recent Topics

*  Fog Creek Home