[fpc-devel] WinSock error 10106

Alexander Todorov alexx.todorov at gmail.com
Thu Jan 5 23:04:17 CET 2006


Hello,
I have a two classes that implement TCP / IP client and server.
Internally they use a base class which uses sockets to handle communication.
In this part of code I get an error :

procedure TTCPClient.Connect;
begin
  FSocket := Socket(AF_INET, SOCK_STREAM, 0); // create socket descriptor
  if (FSocket <= 0) then
    raise Exception.Create(IntToStr(SocketError));
.....
end;

According to Google this is :
WSAEPROVIDERFAILEDINIT 10106   - (Winsock2)

The code itself is OK and is tested heavy under Linux and now I wanted
to use it under Windows.

I call TTCPClient.Connect that is supposed to connect to 127.0.0.1:4444.
On the server side thare is TTCPServer written in simillar manner.

This error occurs on my development machine, but not on other testing
machine. On testing machine the connection between server and client
is established.

Does anyone have a clue what is causing the problem ?? I don't think
this is a bug, maybe it's some dependency?

machines used:
developer :
Windows XP, SP1 + critical patches
Lazarus 0.9.8, fpc 2.0.0

tester :
Windows XP, SP1, just installed.

linux :
Lazarus 0.9.10, fpc 2.0.0
OS : Debian (don't know exact version)



More information about the fpc-devel mailing list