H
hongw21
Unregistered / Unconfirmed
GUEST, unregistred user!
用Delphi写了个ActiveX控减,控件有个方法输入参数是OleVariant类型来接受流:
procedure TWfUrgeX.ShowWf(WfStream: OleVariant);
var AStream : TMemoryStream;
pointer;
begin
AStream := TMemoryStream.Create;
try
Chart.BeginUpdate;
Chart.Clear;
p := VarArrayLock(WfStream);
AStream.Write(p^, VarArrayHighBound(WfStream,1) + 1);
AStream.Position := 0;
Chart.LoadFromStream(AStream);
Chart.EndUpdate;
finally
VarArrayUnlock(WfStream);
AStream.Free;
end;
请问我这种传递流的方式是否正确,如何用JavaScript中调用这个方法,并把流传入
procedure TWfUrgeX.ShowWf(WfStream: OleVariant);
var AStream : TMemoryStream;
pointer;
begin
AStream := TMemoryStream.Create;
try
Chart.BeginUpdate;
Chart.Clear;
p := VarArrayLock(WfStream);
AStream.Write(p^, VarArrayHighBound(WfStream,1) + 1);
AStream.Position := 0;
Chart.LoadFromStream(AStream);
Chart.EndUpdate;
finally
VarArrayUnlock(WfStream);
AStream.Free;
end;
请问我这种传递流的方式是否正确,如何用JavaScript中调用这个方法,并把流传入