I wrote:
> But I try WsaGetLastError in the BIND function directly..
> And report results in next email
As promised..
procedure TBlockSocket.Bind(IP, Port: string);
var
Sin: TVarSin;
tmpdbg: integer;
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);
writeln('DEBUG 5: ', synsock.wsagetlasterror);
tmpdbg:= synsock.Bind(FSocket, Sin);
writeln('DEBUG 4: ', synsock.wsagetlasterror);
SockCheck(tmpdbg);
writeln('DEBUG 3: ', synsock.wsagetlasterror);
writeln('DEBUG 2: ', FLastError);
writeln('DEBUG 1: ', tmpdbg);
writeln('lift off!');
GetSinLocal;
FBuffer := '';
FBinded := True;
...output...
DEBUG 5: 0
DEBUG 4: 0
DEBUG 3: 0
DEBUG 2: 0
DEBUG 1: -1
(Windows 2000 issue???)
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