发表于:2004-11-14 14:34:00
楼主
我在用delphi编写opc客户端的时候,用SyncRead读写
procedure SyncRead(Source: Smallint; NumItems: Integer; var ServerHandles: PSafeArray; out Values: PSafeArray; out Errors: PSafeArray; out Qualities: OleVariant;out TimeStamps: OleVariant); -opcautomation_tlb.pas
我是这样编写的:
procedure TForm1.Timer1Timer(Sender: TObject);
var
ServerHandles:PSafeArray;
Values: PSafeArray;
Errors:PSafeArray;
Quarlities:OleVariant;
TimeStamps:OleVariant;
begin
objTestGroup.SyncRead(OPCCache,1,ServerHandles,Values,Errors,Quarlities,TimeStamps);
出现了以下问题:“参数错误!”
请问邓老师是哪里除了问题?是不是我的变量定义的不对?