客户端
procedure TForm1.Button3Click(Sender: TObject);
var
tmpMsg:OleVariant;
begin
tmpMsg := VarArrayCreate([0, 5], varVariant);
tmpMsg[0] := Edit4.Text;
tmpMsg[1] := Edit5.Text;
tmpMsg[2] := Edit6.Text;
tmpMsg[3] := 123;
//Edit7.Text;
tmpMsg[4] := Edit8.Text;
tmpMsg[5] := Edit9.Text;
pDataBack.MSGArray(tmpMsg, 6);
end;
中间层接收
procedure TDataBack.MSGArray(Msg: OleVariant;
Count: Int64);
var
i: integer;
Data: OleVariant;
begin
for i := 0 to Count - 1do
begin
Data := Msg;
Form1.Memo1.Lines.Add(Data);
end;
end;