B
boycxd
Unregistered / Unconfirmed
GUEST, unregistred user!
type
PTest=^TTest;
TTest=record
Code :longint;
Name :string;
TimeStr :string;
Time :Tdatetime;
end;
var//声明并在程序的某部分附值了
ListTest:Tlist;
ATestGame;
procedure TFrmMainServer.Button7Click(Sender: TObject);
var
Count:integer;
i,rc:integer;
recordsize:integer;
SendStream: TMemoryStream;
begin
Count:=Server.Socket.ActiveConnections;
for i:=0 to Count-1 do
begin
for rc:=0 to ListTest.Count -1 do//
begin
ATest:=ListTest.Items[rc]; //
recordsize:=sizeof(ATest);
SendStream:=Tmemorystream.create;
try
Sendstream.write(ATest,recordsize);
Sendstream.position:=0;
Server.Socket.Connections.sendStream(sendstream);
finally
Sendstream.Free ;//这部分出错
end;
end;
end;
end;
请高手指导:是代码有问题还是我的思路有问题?
PTest=^TTest;
TTest=record
Code :longint;
Name :string;
TimeStr :string;
Time :Tdatetime;
end;
var//声明并在程序的某部分附值了
ListTest:Tlist;
ATestGame;
procedure TFrmMainServer.Button7Click(Sender: TObject);
var
Count:integer;
i,rc:integer;
recordsize:integer;
SendStream: TMemoryStream;
begin
Count:=Server.Socket.ActiveConnections;
for i:=0 to Count-1 do
begin
for rc:=0 to ListTest.Count -1 do//
begin
ATest:=ListTest.Items[rc]; //
recordsize:=sizeof(ATest);
SendStream:=Tmemorystream.create;
try
Sendstream.write(ATest,recordsize);
Sendstream.position:=0;
Server.Socket.Connections.sendStream(sendstream);
finally
Sendstream.Free ;//这部分出错
end;
end;
end;
end;
请高手指导:是代码有问题还是我的思路有问题?