Z
zhengzhijia
Unregistered / Unconfirmed
GUEST, unregistred user!
我在com服务器中定义了一个接口函数:
procedure TLoginDemo.AddData(mystring: OleVariant);
var
i:integer;
begin
if VarIsArray(mystring) then
for I := 0 to VarArrayHighBound(3, 1)do
Form1.ListBox1.Items.Add(mystring);
end;
在客户端通过如下传递数据给服务器,为何不成功?
procedure TForm1.Button3Click(Sender: TObject);
var
strleVariant;
mystring:Tstrings;
i:integer;
begin
str := VarArrayCreate([0, 3], varOleStr);
mystring := tstringlist.Create;
for i:= 0 to 3do
mystring.Add(inttostr(I));
for I := 0 to 3do
str := mystring.Strings;
DCOMConnection1.AppServer.AddData(Str);
end;
2、不知道开发三层,服务器端如何调试?
procedure TLoginDemo.AddData(mystring: OleVariant);
var
i:integer;
begin
if VarIsArray(mystring) then
for I := 0 to VarArrayHighBound(3, 1)do
Form1.ListBox1.Items.Add(mystring);
end;
在客户端通过如下传递数据给服务器,为何不成功?
procedure TForm1.Button3Click(Sender: TObject);
var
strleVariant;
mystring:Tstrings;
i:integer;
begin
str := VarArrayCreate([0, 3], varOleStr);
mystring := tstringlist.Create;
for i:= 0 to 3do
mystring.Add(inttostr(I));
for I := 0 to 3do
str := mystring.Strings;
DCOMConnection1.AppServer.AddData(Str);
end;
2、不知道开发三层,服务器端如何调试?