EAccessViolation at address 00000000
Buenas a todos, esto es de chiste y me tiene loco.
Tengo la siguiente función:
function configureSocket(Puerto:Integer;
var ClientSocket:TClientSocket;
PcName : String;
ByIP : boolean = False): boolean;
begin
try
ClientSocket := TClientSocket.Create(nil);
If ( ByIP ) then
ClientSocket.Address := PcName
else
ClientSocket.Host:= PcName;
ClientSocket.Port:= Puerto;
ClientSocket.ClientType:= ctBlocking;
ClientSocket.Open; // si no esta activo salta al except
Result:= true;
except
Result:= false
end;
end;
pues bien, el ClienteSocket.Open, da excepción, y cuando se va al except, al hacer el Result:=false me da una excepción (EAccessViolation at address 00000000)
alguien me puede decir por qué carajo (intentando ser "fino") me está pasando esto????
Gracias a todos
|