M
mygod!
Unregistered / Unconfirmed
GUEST, unregistred user!
这里的代码在编译时不出错,当我运行到这里的时候就出错了,错在哪里呢?
var
vv: Variant;
HTMLDocument: IHTMLDocument2;
begin
vv := VarArrayCreate([0,0],varVariant);
vv[0] :=memo1.Text;//memo1里放一个htm文件的源码
HTMLDocument :=webbrow.Document as IHTMLDocument2;
HTMLDocument.write(PSafeArray(TVarData(vv).VArray));
HTMLDocument.charset := 'gb2312';
HTMLDocument.close;
end;
initialization
OleInitialize(nil);
finalization
OleUninitialize;
var
vv: Variant;
HTMLDocument: IHTMLDocument2;
begin
vv := VarArrayCreate([0,0],varVariant);
vv[0] :=memo1.Text;//memo1里放一个htm文件的源码
HTMLDocument :=webbrow.Document as IHTMLDocument2;
HTMLDocument.write(PSafeArray(TVarData(vv).VArray));
HTMLDocument.charset := 'gb2312';
HTMLDocument.close;
end;
initialization
OleInitialize(nil);
finalization
OleUninitialize;