Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Mar : Re: Socket Error # 0
| Subject: | Re: Socket Error # 0 |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Fri, 23 Mar 2007 10:08:08 |
"Stephan Jaschke" <news@stj-software.de> wrote in message
news:4603937b$1@newsgroups.borland.com...
> In my version (original Delphi 7.0, Indy 9.00.10) the code is
Then you should upgrade to 9.0.50.
> the diffrence is the call to GStack.WSGetLastError in my version
which
> implicit calls WSAGetLastError and gives obviously _not_ LastError
> but 0 as no other winsock-call was involved.
Actually, there is 2 winsock calls in DisconnectSocket() - shutdown()
and closesocket(). So either one of them can be resetting
WSAGetLastError() back to 0. before GStack.WSGetLastError() can be
called. That is probably why the GStack.LastError property was added
in the first place.
Gambit