home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 March / Chip_1999-03_cd.bin / zkuste / delphi / INFO / DI9806JP.ZIP / WSAErr.pas < prev   
Pascal/Delphi Source File  |  1997-12-05  |  4KB  |  71 lines

  1. unit WSAErr;
  2. interface
  3. Uses
  4.  Windows, WinSock2;
  5.  
  6. function WSAErrorMsg : String;
  7.  
  8. implementation
  9.  
  10.  
  11. function WSAErrorMsg : String;
  12. begin
  13.  case WSAGetLastError of
  14.   WSAEINTR           : Result := 'Interrupted system call';{WSAEINTR}
  15.   WSAEBADF           : Result := 'Bad file number'; {WSAEBADF}
  16.   WSAEACCES          : Result := 'Permission denied'; {WSAEINTR}
  17.   WSAEFAULT          : Result := 'Bad address';{WSAEFAULT}
  18.   WSAEINVAL          : Result := 'Invalid argument';{WSAEINVAL}
  19.   WSAEMFILE          : Result := 'Too many open files';{WSAEMFILE}
  20.   WSAEWOULDBLOCK     : Result := 'Operation would block';{WSAEWOULDBLOCK}
  21.   WSAEINPROGRESS     : Result := 'Operation now in progress';{WSAEINPROGRESS}
  22.   WSAEALREADY        : Result := 'Operation already in progress';{WSAEALREADY}
  23.   WSAENOTSOCK        : Result := 'Socket operation on nonsocket';{WSAENOTSOCK}
  24.   WSAEDESTADDRREQ    : Result := 'Destination address required';{WSAEDESTADDRREQ}
  25.   WSAEMSGSIZE        : Result := 'Message too long';{WSAEMSGSIZE}
  26.   WSAEPROTOTYPE      : Result := 'Protocol wrong type for socket';{WSAEPROTOTYPE}
  27.   WSAENOPROTOOPT     : Result := 'Protocol not available';{WSAENOPROTOOPT}
  28.   WSAEPROTONOSUPPORT : Result := 'Protocol not supported';{WSAEPROTONOSUPPORT}
  29.   WSAESOCKTNOSUPPORT : Result := 'Socket not supported';{WSAESOCKTNOSUPPORT}
  30.   WSAEOPNOTSUPP      : Result := 'Operation not supported on socket';{WSAEOPNOTSUPP}
  31.   WSAEPFNOSUPPORT    : Result := 'Protocol family not supported';{WSAEPFNOSUPPORT}
  32.   WSAEAFNOSUPPORT    : Result := 'Address family not supported';{WSAEAFNOSUPPORT}
  33.   WSAEADDRINUSE      : Result := 'Address already in use';{WSAEADDRINUSE}
  34.   WSAEADDRNOTAVAIL   : Result := 'Can''t assign requested address';{WSAEADDRNOTAVAIL}
  35.   WSAENETDOWN        : Result := 'Network is down';{WSAENETDOWN}
  36.   WSAENETUNREACH     : Result := 'Network is unreachable';{WSAENETUNREACH}
  37.   WSAENETRESET       : Result := 'Network dropped connection on reset';{WSAENETRESET}
  38.   WSAECONNABORTED    : Result := 'Software caused connection abort';{WSAECONNABORTED}
  39.   WSAECONNRESET      : Result := 'Connection reset by peer';{WSAECONNRESET}
  40.   WSAENOBUFS         : Result := 'No buffer space available';{WSAENOBUFS}
  41.   WSAEISCONN         : Result := 'Socket is already connected';{WSAEISCONN}
  42.   WSAENOTCONN        : Result := 'Socket is not connected';{WSAENOTCONN}
  43.   WSAESHUTDOWN       : Result := 'Can''t send after socket shutdown';{WSAESHUTDOWN}
  44.   WSAETOOMANYREFS    : Result := 'Too many references:can''t splice';{WSAETOOMANYREFS}
  45.   WSAETIMEDOUT       : Result := 'Connection timed out';{WSAETIMEDOUT}
  46.   WSAECONNREFUSED    : Result := 'Connection refused';{WSAECONNREFUSED}
  47.   WSAELOOP           : Result := 'Too many levels of symbolic links';{WSAELOOP}
  48.   WSAENAMETOOLONG    : Result := 'File name is too long';{WSAENAMETOOLONG}
  49.   WSAEHOSTDOWN       : Result := 'Host is down';{WSAEHOSTDOWN}
  50.   WSAEHOSTUNREACH    : Result := 'No route to host';{WSAEHOSTUNREACH}
  51.   WSAENOTEMPTY       : Result := 'Directory is not empty';{WSAENOTEMPT}
  52.   WSAEPROCLIM        : Result := 'Too many processes';{WSAEPROCLIM}
  53.   WSAEUSERS          : Result := 'Too many users';{WSAEUSERS}
  54.   WSAEDQUOT          : Result := 'Disk quota exceeded';{WSAEDQUOT}
  55.   WSAESTALE          : Result := 'Stale NFS file handle';{WSAESTALE}
  56.   WSAEREMOTE         : Result := 'Too many levels of remote in path';{WSAEREMOTE}
  57.   WSASYSNOTREADY     : Result := 'Network subsystem is unusable';{WSASYSNOTREADY}
  58.   WSAVERNOTSUPPORTED : Result := 'Winsock DLL cannot support this application';{WSAVERNOTSUPPORTED}
  59.   WSANOTINITIALISED  : Result := 'Winsock not initialized';{WSANOTINITIALISED}
  60.   WSAHOST_NOT_FOUND  : Result := 'Host not found';{WSAHOST NOT FOUND}
  61.   WSATRY_AGAIN       : Result := 'Non authoritative - host not found';{WSATRY_AGAIN}
  62.   WSANO_RECOVERY     : Result := 'Non recoverable error';
  63.   WSANO_DATA         : Result := 'Valid name, no data record of requested type'
  64.   else Result := 'Not a Winsock error';
  65.  end;
  66. end;
  67.  
  68.  
  69.  
  70. end.
  71.