L
lgh200
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TUServerClientThread.MakeSaveInfoBuf(P: PSocketData;
var SendBuf: TSendBuf;
var SendSize: Integer);
var
s:string;
X,Len:Integer;
begin
MakeVerbBuf(vcSaveInfo,SendBuf,SendSize);
S:=P^.SrcFileName + '|' +
p^.DstFileName + '|' +
IntToStr(P^.FileSize) +'|';
Len :=Length(s);
for x:=1 to lendo
SendBuf[LeadLen+X-1] :=S[x];
SendSize :=LeadLen+Len;
end;
我创建了两个相同的线程,同时调用上面这个函数是出现了下面的错误:
access violiation at address 004337a4 in module porject1.exe
write of address 000000004
var SendBuf: TSendBuf;
var SendSize: Integer);
var
s:string;
X,Len:Integer;
begin
MakeVerbBuf(vcSaveInfo,SendBuf,SendSize);
S:=P^.SrcFileName + '|' +
p^.DstFileName + '|' +
IntToStr(P^.FileSize) +'|';
Len :=Length(s);
for x:=1 to lendo
SendBuf[LeadLen+X-1] :=S[x];
SendSize :=LeadLen+Len;
end;
我创建了两个相同的线程,同时调用上面这个函数是出现了下面的错误:
access violiation at address 004337a4 in module porject1.exe
write of address 000000004