I hate to be obnoxious, but I posted a patch for the issue in the subject (WSAGetLastError/GetLastError is reset by the rtl when one is using threads) and I'd like some feedback (if it's the proper solution or is there a better one). http://bugs.freepascal.org/view.php?id=10205 Bye -- Luca