E
eastphoenix
Unregistered / Unconfirmed
GUEST, unregistred user!
我在网页内嵌了一个ActiveX,内用了一个Form1,还有一个回调函数Say用来被COM服务器调
用来向网页传递消息。可是在Say函数里无法访问Form1内的元素,代码如下:
unit ClientInterface;
interface
uses Dialogs, ComObj, dprCallBackAndIP_TLB;
type
TCallBack = class(TAutoIntfObject, IAgent)
procedure Say(var testString: OleVariant;out isSuccess: OleVariant)
safecall;
end;
implementation
uses IEForm;
procedure TCallBack.Say(var testString:OleVariant;out isSuccess: OleVariant);
var
tempString:String;
begin
isSuccess := 0;
try
tempString := testString;
//Form1.Edit1.Text := tempString;
showmessage(tempString);
//Form1.Edit1.Text := 'hello world';
Form1.ShowInWEB(PChar(tempString));//跟踪置函数内,发现有变量Inaccessible
except
isSuccess := 1;
end;
end;
end.
技术瓶颈,请各位尽快解决,谢谢
用来向网页传递消息。可是在Say函数里无法访问Form1内的元素,代码如下:
unit ClientInterface;
interface
uses Dialogs, ComObj, dprCallBackAndIP_TLB;
type
TCallBack = class(TAutoIntfObject, IAgent)
procedure Say(var testString: OleVariant;out isSuccess: OleVariant)
safecall;
end;
implementation
uses IEForm;
procedure TCallBack.Say(var testString:OleVariant;out isSuccess: OleVariant);
var
tempString:String;
begin
isSuccess := 0;
try
tempString := testString;
//Form1.Edit1.Text := tempString;
showmessage(tempString);
//Form1.Edit1.Text := 'hello world';
Form1.ShowInWEB(PChar(tempString));//跟踪置函数内,发现有变量Inaccessible
except
isSuccess := 1;
end;
end;
end.
技术瓶颈,请各位尽快解决,谢谢