procedure TBlockSocket.Bind(IP, Port: string);
var
Sin: TVarSin;
tmpdbg: integer; // my elite hacking
begin
FLastError := 0;
if (FSocket <> INVALID_SOCKET)
or not((FFamily = SF_ANY) and (IP = cAnyHost) and (Port = cAnyPort)) then
begin
SetSin(Sin, IP, Port);
if FLastError = 0 then
begin
if FSocket = INVALID_SOCKET then
InternalCreateSocket(Sin);
tmpdbg:= synsock.Bind(FSocket, Sin);
SockCheck(synsock.Bind(FSocket, Sin));
writeln('DEBUG 1: ', tmpdbg);
writeln('DEBUG 2: ', FLastError);
GetSinLocal;
FBuffer := '';
FBinded := True;
end;
ExceptCheck;
DoStatus(HR_Bind, IP + ':' + Port);
end;
end;
...program output...
DEBUG1: -1
DEBUG2: 0
So somehow FLastError is getting set to zero...
Within SockCheck !!! ???
L505
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public