Return Code / Value
Description
WSAEINTR
10004
Interrupted function call.
A Blocking Operation WAS Interrupted by a call to
WSACANCELBLOCKINGCALL.
Wsaeacces
10013
Permission denied.
An Attempt Was Made to Access A Socket In A Way Forbidden By ITS Access Permissions. An Example Is Using A Broadcast Address for
Sendto without Broadcast Permission Being Set Using
Setsockopt (SO_Broadcast).
Another Possible Reason for the wsaeacces Error Is That WHEN THE
bind function is called (on Windows NT 4 SP4 or later), another application, service, or kernel mode driver is bound to the same address with exclusive access. Such exclusive access is a new feature of Windows NT 4 SP4 and later, and is Implement by using the so_exclusiveaddruse option.
WSAEFAULT
10014
BAD Address.
The system detected an invalid pointer address in attempting to use a pointer argument of a call. This error occurs if an application passes an invalid pointer value, or if the length of the buffer is too small. For instance, if the length of an argument , Which is a
SockAddr Structure, IS Smaller Than The Sizeof (SockAddr).
WSAEINVAL
10022
INVALID Argument.
Some INVALID Argument Was Supplied (for Example, Specifying An Invalid Level To the
Setsockopt function). in Some Instances, It Also Refers To The Current State of The Socket-for Instance, Calling
Accept on a socket what is not listening.
WSaemfile
10024
Too Many Open Files.
Too Many Open Sockets. Each Implementation May Have a Maximum Number of Socket Handles Available, Either Globally, Per Process, or Per Thread.
WSAEWOULDBLOCK
10035
Resource Temporarily Unavailable.
This Error Is Returned from Operations on Nonblocking Sockets That Cannot Be Completed Immediets, for Example
Recv When No Data IS Queued to Be Read from The Socket. It is a nonfatal error, and the operation shop be retried Later. it is normal for wsaewouldblock to be reported as the result from calling
Connect ON A Nonblocking Sock_Stream Socket, Since Some Time Must Elapse for the connection to be establish.
WSAEINPROGRESS
10036
Operation now in progras.
A blocking operation is currently executing. Windows Sockets only allows a single blocking operation-per- task or thread-to be outstanding, and if any other function call is made (whether or not it references that or any other socket) the function fails with The WSAEINPROGRESS ERROR.
WSAEAALReady
10037
Operation already in progravel.
An Operation Was Attempted ON A Nonblocking Socket with an Operation Already in Progress-That IS, CALLING
Connect A Second Time ON A Nonblocking Socket That Is Already Connecting, Or Canceling An Asynchronous Request
Wsaasyncgetxbyy) That Has Already Been Canceled OR completed.
WSAENOTSOCK
10038
Socket Operation on Nonsocket.
An Operation Was Attempted ON Sometting That Is Not a Socket. Either The Socket Handle Parameter Did Not Reference A Valid Socket, or for
SELECT, A MEMBER OF AN
FD_set Was Not Valid.
WSAEDESTADDRREQ
10039
Destination address required.
A Required Address Was Omitted from an Operation ON A Socket. For Example, This Error is Returned IF
Sendto Is Called with The Remote Address of Addr_Any.
WSaemSgsize
10040
Message too long.
.
WSAEPROTYPE
10041
Protocol WRONG TYPE for Socket.
A protocol was specified in the
Socket Function Call That Does Not Support The Semantics of The Socket Type Requested. for Example, The Arpa Internet Udp Protocol Cannot Be Specified with a socket type of sock_stream.wsaenoprotoopt
10042
Bad Protocol Option.
An unknown, invalid or unsupported option or level WAS specified in a
Getsockopt OR
Setsockopt call.
WSAEPROTONOSUPPORT
10043
Protocol not supported.
The Requested Protocol Has Not Been Configured Into The System, or No Implementation for IT EXSTS. For Example, A
Socket Call Requests A Sock_Dgram Socket, But Specifies A Street Protocol.
WSAESOCKTNOSUPPORT
10044
Socket Type Not Supported.
The Support for the specified socket type does not exist in this address family. For example, the optional type sock_raw might be selected in a
Socket Call, And The Implementation Does Not Support Sock_Raw Sockets At All.
WSAEOPNOTSUPP
10045
Operation Not Supported.
The attempted operation is not supported for the type of object referenced. Usually this occurs when a socket descriptor to a socket that can not support this operation is trying to accept a connection on a datagram socket.
WSAEPFNOSupport
10046
Protocol Family Not Supported.
The protocol family has not been configured into the system or no implementation for it exists. This message has a slightly different meaning from WSAEAFNOSUPPORT. However, it is interchangeable in most cases, and all Windows Sockets functions that return one of these messages also specify WSAEAFNOSUPPORT .
WSAEafnosupport
10047
Address Family NOT Supported by Protocol Family.
An address incompatible with the requested protocol was used. All sockets are created with an associated address family (that is, AF_INET for Internet Protocols) and a generic protocol type (that is, SOCK_STREAM). This error is returned if an incorrect protocol is explicitly Requested in Thaesocket Call, or if An address of the wrong family is buy for a socket, for example, in
Sendto.
WSAEADDRINUSE
10048
Address Already in Use.
Typically, Only ONE Usage of Each Socket Address (Protocol / IP Address / Port) is permitted. This Error Occurs IF An Application Attempts To
Bind A Socket To An IP Address / Port That Has Already Been Used For An Existing Socket, OR A Socket That Was Not Closed Properly, or One That Is Still in The Process of Closing. for Server Applications That Need To
Bind Multiple Sockets to the Same Port Number, Consider Using
Setsockopt (SO_REUSEADDR). Client Applications Usually NEED NOT CALL
Bind at all-
Connect Chooses An Unused Port AutomaticL. by
Bind IS Called with a Wildcard Address (Involving Addr_Any), A WSAEAddrinuse Error Could Be delayed Until The Specific Address Is Committed. This Call Happen with a call to another function later, including
Connect,
Listen,
WSACONNECT, OR
WSAJOINLEAF.
WSAEADDRNOTAVAIL
10049
Cannot Assign Requested Address.
The Requested Address Is Not Valid in ITS Context. This Normal RESULTS from An Attempt To
Bind to an address this is not valid for the local computer. this Can Also Result from
Connect,
Sendto,
Wsaconnect,
WSAJOINLEAF, OR
Wsasendto WHEN THE Remote address or port is not valid for a Remote Computer (for example, address or port 0).
WSAenetdown
10050
NetWork is down.
A socket operation encountered a dead network. This could indicate a serious failure of the network system (that is, the protocol stack that the Windows Sockets DLL runs over), the network interface, or the local network itself.WSAENETUNREACH
10051
NetWork is unreachable.
A Socket Operation Was Attempted to An Unreachable Network. This USUALLY Means The Local Software Knows No Route to Reach The Remote Host.
WSAENETRESet
10052
Network Dropped Connection On Reset.
The Connection Has Been Broken Due To Keep-Alive Activity Detecting A Failure While The Operation Was in Progress. It can also be returned by
Setsockopt if an attempt is name to set so_keepalive on a connection That Has Already failed.
Wsaeconnaborted
10053
Software Caused Connection Abort.
An Established Connection Was Aborted by The Software in Your Host Computer, Possibly Due to a Data Transmission Time-Out or Protocol Error.
WSaeconnreset
10054
Connection reset by peer.
An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see
setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET Subsequent Operations Fail with WSAEConnreset.
WSAenobufs
10055
No buffer space available.
An Operation ON A Socket Could Not Be Performed Because The System Lacked Sufficient Buffer Space or Because A Queue Was FULL.
WSAEisconn
10056
Socket is already connected.
A Connect Request Was Made ON AN Already-Connected Socket. Some Implementations Also Return This Error IF
Sendto Is Called ON A Connected Sock_Dgram Socket (for Sock_Stream Sockets, THE
TO Parameter in
Sendto is ignored) Alth Other Implementations Treat this as a legal ioccurrence.
WSAENOTCONN
10057
Socket is not connect.
A Request to send or receiving data was disallowed because the socket is not connection and (hen sending on a datagram socket using
Sendto) No Address Was Supplied. Any Other Type of Operation Might Also Return This Error-for EXAMPLE,
Setsockopt Setting So_keepalive if The Connection Has Been RESET.
WSAESHUTDOWN
10058
Cannot Send After Socket Shutdown.
A Request to send or receiving Data Was Disallowed Because The socket HAD Already Been Shut Down That Direction with a PreviOUS
SHUTDOWN CALL. BY CALLING
SHUTDOWN A Partial Close of A Socket Is Requested, Which Is A Signal That Sending Or Receiving, or Both Have Been Discontinued.
WSaetimedout
10060
Connection Timed Out.
A Connection Attempt Failed Because The Connected Party Did NOTLY RESPOND AFTER A Period of Time, or The Established Connection Failed To Respond.
WSAEConnrefused
10061
Connection Refused.
No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host-that is, one with no server application running.
WSAEHOSTDOWN
10064
Host is down.
A socket operation failed because the destination host is down. A socket operation encountered a dead host. Networking activity on the local host has not been initiated. These conditions are more likely to be indicated by the error WSAETIMEDOUT.WSAEHOSTUNREACH
10065
No route to host.
A socket Operation Was Attempted to an Unreachable Host. See
WSAENETUNREACH.
WSAEPROCLIM
10067
TOO MANY Processes.
A Windows Sockets Implementation May Have a Limit On The Number of Applications That Can Use IT Simultaneously.
WSAStartup May Fail with this error if the limit has been reached.
WSASYSNOTREADY
10091
NetWork subsystem is unavailable.
THIS Error is returned by
WSAStartup if The Windows Sockets Implementation Cannot Function At this Time Because The Underning System It Uses To Provide Network Services IS Currently Unavailable. Users Should Check:
· That The Appropriate Windows Sockets DLL File IS in The Current Path.
· That they are not trying to use more than one Windows Sockets implementation simultaneously. If there is more than one Winsock DLL on your system, be sure the first one in the path is appropriate for the network subsystem currently loaded.
· The Windows Sockets Implementation Documentation To Be Sure All Necessary Components Are Currently Installed and Configured Correctly.
WSAVERNOTSUPPORTED
10092
Winsock.dll Version Out of Range.
The Current Windows Sockets Implement Does Not Support The Windows Sockets Specification Version Requesction by The Application. Check That No Old Windows Sockets DLL Files Are Being Accessed.
WSANotinitialiad
10093
Successful WSAStartup Not Yet Performed.
Either the Application Has NOT CALLED
WSASTARTUP ORWSASTARTUP FAILED. The Application May Be Accessing A Socket That The Current Active Task Does Not Own (Thating to Share A Socket Between Tasks, OR
WSACLANUP HAS Been Called Too Many Times.
WSaediscon
10101
Graceful shutdown in progress.
Returned by
WSARECV and
WSARECVFROM TO INDICATE That The Remote Party HAS INITIATED A Graceful Shutdown Sequence.
WSATYPE_NOT_FOND
10109
Class Type Not Found.
The specified class was not found.
WSAHOST_NOT_FOND
11001
Host Not found.
No such host is known. The name is not an official host name or alias, or it can not be found in the database (s) being queried. This error may also be returned for protocol and service queries, and means that the specified name could NOT BE Found in The Relevant Database.
WSATRY_AGAIN
11002
Nonauthoritative Host Not found.
................... ..
WSANO_RECOVERY
11003
This is a nonRecoverable error.
This indicates that some sort of nonrecoverable error occurred during a database lookup. This may be because the database files (for example, BSD-compatible HOSTS, SERVICES, or PROTOCOLS files) could not be found, or a DNS request was returned by the server WITH A Severe Error.
WSANO_DATA
11004
Valid Name, No Data Record of Requested Type.
THE REQESTED NAME IS VALID AND WAS Found in The Database, But It Does Not Have The Correct Associated Data Being Resolved for. The USUAL EXAMPLE for this is a host name-to-address translation Attempt (use)
GethostByname or
WsaasyncgetHostbyName) Which Uses The DNS (Domain Name Server). An Mx Record Is Returned But no a record-indeicating the host itself exists, but is not directly reachable.wsa_invalid_handle
OS Dependent
Specified Event Object Handle IS Invalid.
An Application Attempts To Use An Event Object, But The Specified Handle Is Not Valid.
WSA_INVALID_PARAMETER
OS Dependent
One or more parameters are invalid.
An Application Used A Windows Sockets Function Which Directly Maps to a Windows Function. The Windows Function is INDICATING A Problem with one or more parameters.
WSA_IO_INCOMPLETE
OS Dependent
Overlapped I / O Event Object Not in Signaled State.
The Application Has Tried To Determine The Status of An Overlapped Operation Which is Not Yet Completed. Applications That Use
WsagetoverlappedResult (with the
FWAIT FLAG SET to FALSE) IN A Polling Mode To Determine When An Overlapped Operation Has Completed, Get This Error Code Until The Operation is Complete.
WSA_IO_PENDING
OS Dependent
Overlapped Operations Will Complete Later.
The Application Has initiated an overlapped Operation That Cannot Be Completed IMMEDITELY. A Completion IND WILL BEEN COMPLETED.
WSA_NOT_ENUGH_MEMORY
OS Dependent
Insufficient Memory Available.
An Application Used A Windows Sockets Function That Directly Maps to a Windows Function. The Windows Function is INDICATING A LACK OF Required Memory Resources.
WSA_OPERATION_ABORTED
OS Dependent
Overlapped Operation Aborted.
An overlapped Operation Was Canceled Due To The Closure of The Socket, or The Execution of The SiO_Flush Command in
WSAIOCTL.
WSAINVALIDPROCTABLE
OS Dependent
Invalid Procedure Table from Service Provider.
A Service Provider Returned A Bogus Procedure Table To WS2_32.dll. (This is usually caused by one or more of the function pointers being null.) WSAINVALIDPROVIDER
OS Dependent
Invalid Service Provider Version Number.
A Service Provider Returned a Version Number Other Than 2.0.
Wsaproviderfailedinit
OS Dependent
Unable to Initialize a Service Provider.
Either a Service Provider's DLL COULD NOT BE LOADED
LoadLibrary Failed) or the provider's
Wspstartup /
Nspstartup function failed.
WSASYSCALLFAILURE
OS Dependent
System call failure.
Generic Error Code, Returned Under Various Conditions.
Returned WHEN A System Call That Should Never Fail Does Fail. For Example, IF a Call To
Waitformultipleevents Fails or One of the Registry Functions Fails Trying to manipulate the Protocol / Namespace Catalogs.
RETURNED WHEN A Provider Does Not Return Success And Does Not Provide An Extended Error Code. CAN INDICATE A Service Provider Implementation Error.