Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : Re: 'ntdll.dll' problem
| Subject: | Re: 'ntdll.dll' problem |
| Posted by: | "Martin James" (nospam@dial.pipex.com) |
| Date: | Fri, 18 Aug 2006 21:01:50 |
>
>
> procedure TfrTCPServer.myProc( Athread: TIdPeerThread );
> var MyClass : TMyclass;
> begin
> .....
> MyClass := TMyclass.create;
> MyClass.no := 123;
> ..............
> try
> ManagerThreads[ Tperson( Athread.data ).roomNumber ].addlist( MyClass );
> except on e: exception do
> begin
> ExceptionLoga( e.Message ); //---------->Access violation at address 7C82F350 in module 'ntdll.dll'. Write of address 31333176
> end;
> end;
>
> What may be source of the problem?
Illegal index?
Why ntdll.dll?
..because the CS call is illegal?
First, break up that complex thingy!
procedure TfrTCPServer.myProc( Athread: TIdPeerThread );
var MyClass : TMyclass;
thisPerson:TPerson;
theirRoomNumber:integer;
begin
.....
MyClass := TMyclass.create;
MyClass.no := 123;
..............
try
thisPerson:=Tperson(Athread.data);
theirRoomNumber:=thisPerson.roomNumber;
ManagerThreads[theirRoomNumber].addlist( MyClass );
except on e: exception do
begin
ExceptionLoga( e.Message );
end;
end;
Rgds,
Martin
PS. You have a manager thread for every room??