This article is from the FAQ, by with numerous contributions by others.
Although this error message can be caused by a number of different
problems, as far as WinSock users are concerned, it probably has to do
with having multiple versions of WINSOCK.DLL hanging around your hard
disk. To solve this problem, make sure that you do not have multiple
versions of WINSOCK.DLL in your PATH. If so, remove or rename the
versions you're not using. If you only have a single version of
WINSOCK.DLL, it may not be in the path. Simply put it in
\WINDOWS\SYSTEM or add your WinSock's directory to the PATH statement
in your AUTOEXEC.BAT file.