Windows 特有的错误常量


以下错误码特定于 Windows 操作系统。

常量 描述
WSAEINTR 表示中断的函数调用。
WSAEBADF 表示无效的文件句柄。
WSAEACCES 表示权限不足,无法完成操作。
WSAEFAULT 指示无效的指针地址。
WSAEINVAL 表示传入了无效参数。
WSAEMFILE 表示打开的文件太多。
WSAEWOULDBLOCK 表示资源暂时不可用。
WSAEINPROGRESS 指示当前正在进行的操作。
WSAEALREADY 表示操作已经在进行中。
WSAENOTSOCK 表示该资源不是套接字。
WSAEDESTADDRREQ 表示需要目标地址。
WSAEMSGSIZE 表示消息大小太长。
WSAEPROTOTYPE 指示套接字的错误协议类型。
WSAENOPROTOOPT 表示错误的协议选项。
WSAEPROTONOSUPPORT 表示不支持该协议。
WSAESOCKTNOSUPPORT 表示不支持该套接字类型。
WSAEOPNOTSUPP 表示不支持该操作。
WSAEPFNOSUPPORT 表示不支持该协议族。
WSAEAFNOSUPPORT 表示不支持该地址族。
WSAEADDRINUSE 表示该网络地址已被使用。
WSAEADDRNOTAVAIL 表示网络地址不可用。
WSAENETDOWN 表示网络已关闭。
WSAENETUNREACH 表示网络不可达。
WSAENETRESET 表示网络连接已重置。
WSAECONNABORTED 表示连接已中止。
WSAECONNRESET 表示连接已被对端重置。
WSAENOBUFS 表示没有可用的缓冲区空间。
WSAEISCONN 表示套接字已经连接。
WSAENOTCONN 表示套接字未连接。
WSAESHUTDOWN 表示套接字关闭后无法发送数据。
WSAETOOMANYREFS 表示引用过多。
WSAETIMEDOUT 表示连接超时。
WSAECONNREFUSED 表示连接已被拒绝。
WSAELOOP 表示无法翻译名称。
WSAENAMETOOLONG 表示名称太长。
WSAEHOSTDOWN 表示网络主机已关闭。
WSAEHOSTUNREACH 表示没有到网络主机的路由。
WSAENOTEMPTY 表示目录不为空。
WSAEPROCLIM 表示进程过多。
WSAEUSERS 表示已超出用户配额。
WSAEDQUOT 表示已超出磁盘配额。
WSAESTALE 表示陈旧的文件句柄引用。
WSAEREMOTE 表示该条目是远程的。
WSASYSNOTREADY 表示网络子系统没有准备好。
WSAVERNOTSUPPORTED 表示 winsock.dll 版本超出范围。
WSANOTINITIALISED 表示尚未成功执行 WSAStartup。
WSAEDISCON 表示正在进行正常关闭。
WSAENOMORE 表示没有更多的结果。
WSAECANCELLED 表示操作已被取消。
WSAEINVALIDPROCTABLE 表示过程调用表无效。
WSAEINVALIDPROVIDER 表示无效的服务提供者。
WSAEPROVIDERFAILEDINIT 表示服务提供者初始化失败。
WSASYSCALLFAILURE 表示系统调用失败。
WSASERVICE_NOT_FOUND 表示未找到服务。
WSATYPE_NOT_FOUND 表示未找到类类型。
WSA_E_NO_MORE 表示没有更多的结果。
WSA_E_CANCELLED 表示调用已取消。
WSAEREFUSED 表示数据库查询被拒绝。

The following error codes are specific to the Windows operating system.

Constant Description
WSAEINTR Indicates an interrupted function call.
WSAEBADF Indicates an invalid file handle.
WSAEACCES Indicates insufficient permissions to complete the operation.
WSAEFAULT Indicates an invalid pointer address.
WSAEINVAL Indicates that an invalid argument was passed.
WSAEMFILE Indicates that there are too many open files.
WSAEWOULDBLOCK Indicates that a resource is temporarily unavailable.
WSAEINPROGRESS Indicates that an operation is currently in progress.
WSAEALREADY Indicates that an operation is already in progress.
WSAENOTSOCK Indicates that the resource is not a socket.
WSAEDESTADDRREQ Indicates that a destination address is required.
WSAEMSGSIZE Indicates that the message size is too long.
WSAEPROTOTYPE Indicates the wrong protocol type for the socket.
WSAENOPROTOOPT Indicates a bad protocol option.
WSAEPROTONOSUPPORT Indicates that the protocol is not supported.
WSAESOCKTNOSUPPORT Indicates that the socket type is not supported.
WSAEOPNOTSUPP Indicates that the operation is not supported.
WSAEPFNOSUPPORT Indicates that the protocol family is not supported.
WSAEAFNOSUPPORT Indicates that the address family is not supported.
WSAEADDRINUSE Indicates that the network address is already in use.
WSAEADDRNOTAVAIL Indicates that the network address is not available.
WSAENETDOWN Indicates that the network is down.
WSAENETUNREACH Indicates that the network is unreachable.
WSAENETRESET Indicates that the network connection has been reset.
WSAECONNABORTED Indicates that the connection has been aborted.
WSAECONNRESET Indicates that the connection has been reset by the peer.
WSAENOBUFS Indicates that there is no buffer space available.
WSAEISCONN Indicates that the socket is already connected.
WSAENOTCONN Indicates that the socket is not connected.
WSAESHUTDOWN Indicates that data cannot be sent after the socket has been shutdown.
WSAETOOMANYREFS Indicates that there are too many references.
WSAETIMEDOUT Indicates that the connection has timed out.
WSAECONNREFUSED Indicates that the connection has been refused.
WSAELOOP Indicates that a name cannot be translated.
WSAENAMETOOLONG Indicates that a name was too long.
WSAEHOSTDOWN Indicates that a network host is down.
WSAEHOSTUNREACH Indicates that there is no route to a network host.
WSAENOTEMPTY Indicates that the directory is not empty.
WSAEPROCLIM Indicates that there are too many processes.
WSAEUSERS Indicates that the user quota has been exceeded.
WSAEDQUOT Indicates that the disk quota has been exceeded.
WSAESTALE Indicates a stale file handle reference.
WSAEREMOTE Indicates that the item is remote.
WSASYSNOTREADY Indicates that the network subsystem is not ready.
WSAVERNOTSUPPORTED Indicates that the winsock.dll version is out of range.
WSANOTINITIALISED Indicates that successful WSAStartup has not yet been performed.
WSAEDISCON Indicates that a graceful shutdown is in progress.
WSAENOMORE Indicates that there are no more results.
WSAECANCELLED Indicates that an operation has been canceled.
WSAEINVALIDPROCTABLE Indicates that the procedure call table is invalid.
WSAEINVALIDPROVIDER Indicates an invalid service provider.
WSAEPROVIDERFAILEDINIT Indicates that the service provider failed to initialized.
WSASYSCALLFAILURE Indicates a system call failure.
WSASERVICE_NOT_FOUND Indicates that a service was not found.
WSATYPE_NOT_FOUND Indicates that a class type was not found.
WSA_E_NO_MORE Indicates that there are no more results.
WSA_E_CANCELLED Indicates that the call was canceled.
WSAEREFUSED Indicates that a database query was refused.