procedure SetHtml(const WebBrowser:TWebBrowser; const Html:string);
var
Stream: IStream;
hHTMLText: HGLOBAL;
psi: IPersistStreamInit;
begin
if not Assigned(WebBrowser.Document) then Exit;
hHTMLText := GlobalAlloc(GPTR, StrLen(PChar(html))+1);
if 0 = hHTMLText then RaiseLastWin32Error;
CopyMemory(Pointer(hHTMLText),PChar(Html), StrLen(PChar(Html)));