LAN Web TCP Delphi

********************************************************
********************************************************
*** 'ARKADAŞLAR LÜTFEN KODBANK"TAN YARDIM İSTEMEYİN' ***
************* 'FORUMLARDAN YARDIM İSTEYİN' *************
********************************************************
********************************************************
uses ActiveX;
...
procedure WB_SaveAs_HTML
(WB:TWebBrowser; const FileName : string);
var
PersistStream: IPersistStreamInit;
Stream: IStream;
FileStream: TFileStream;
begin
if not Assigned(WB.Document) then
begin
ShowMessage('Document not loaded!');
Exit;
end;
PersistStream := WB.Document as IPersistStreamInit;
FileStream := TFileStream.Create(FileName, fmCreate);
try
Stream := TStreamAdapter.Create(FileStream, soReference)
as IStream;
if Failed(PersistStream.Save(Stream, True)) then
ShowMessage('SaveAs HTML fail!');
finally
FileStream.Free;
end;
end; (* WB_SaveAs_HTML *)
WB_SaveAs_HTML(WebBrowser1,'c:\WebBrowser1.html');