Habs jetzt so gemacht:
Delphi-Quellcode:
procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject;
const pDisp: IDispatch;
var URL: OleVariant);
var
PersistStream: IPersistStreamInit;
Stream: IStream;
ms: TMemoryStream;
s:
string;
begin
ms:=TMemoryStream.Create;
ms.Clear;
PersistStream := Webbrowser1.Document
as IPersistStreamInit;
Stream := TStreamAdapter.Create(ms, soReference)
as IStream;
PersistStream.Save(Stream, True);
MS.Position:=0;
SetLength(S,MS.Size);
Ms.
Read(S[1],MS.Size);
s:='
Hallo';
Ms.Clear;
MS.
Write(s[1],Length(s));
MS.Position:=0;
PersistStream.Load(Stream);
end;
Vielen Dank nochmal a.vollmer