Home All Groups Group Topic Archive Search About

UCOMIpersistFile only saves first 4K?

Author
15 Dec 2005 1:12 AM
coderkid
I am using UCOMIpersistFile to save the HTML source of the Web page I
am viewing but the Save() method only writes out 4096 bytes of data.
How do I get it to write the entire HTML source to file?

Here is the code that I am using:

IHTMLDocument2 doc = (IHTMLDocument2) axWebBrowser1.Document;

string filename = System.IO.Path.GetTempFileName();

UCOMIPersistFile pf = (UCOMIPersistFile) doc;
pf.Save(filename, true);

It's that simple. Now when I look at the contents of the file that I
save, it only contains the first 4K of data and the rest is truncated.

Thanks in advance to anyone that can help with this.

AddThis Social Bookmark Button