实现目标:开发一ActiveX Libary 对象,其中定义一函数,其中传递的参数应为
TFeild,但DELPHI ACTIVEX是不允许赋其TFeild类型的,那么该怎么办呢?
原函数应如下:Function TForm1.UpLoadFile(FileName:String; const col:TField):Boolean;
begin
try
col.AsString:=FileToStr(FileName);
result:=True;
except
result:=false;
end;
End;
希望高手指点!
TFeild,但DELPHI ACTIVEX是不允许赋其TFeild类型的,那么该怎么办呢?
原函数应如下:Function TForm1.UpLoadFile(FileName:String; const col:TField):Boolean;
begin
try
col.AsString:=FileToStr(FileName);
result:=True;
except
result:=false;
end;
End;
希望高手指点!
在UpLoadFile过程中进行转义处理。var DD:TField; DD:=@fldTmp;
DD.asstring:="Your string";
一般来说不用进行转换,除非你想自动点出它的函数参数等,转换一下类型就好了
[email protected]