This event occurs whenever an error occurs in background processing in a Winsock control, such as a failure to connect or a failure to send or receive in the background.
Private Sub winsock_Error(number, description)
The following table shows the settings for number.
Constant |
Value |
Description |
sckOutOfMemory | 7 | The system is out of memory. |
sckInvalidPropertyValue | 380 | The property value is invalid. |
sckGetNotSupported | 394 | The property cannot be read. |
sckSetNotSupported | 383 | The property is read-only. |
sckBadState | 40006 | Wrong protocol or connection state for the requested transaction or request. |
sckInvalidArg | 40014 | The parameter passed to a function is not in the correct format or in the specified range. |
sckSuccess | 40017 | Successful. |
sckUnsupported | 40018 | Unsupported variant type. |
sckInvalidOp | 40020 | Invalid operation at current state. |
sckOutOfRange | 40021 | Parameter is out of range. |
sckWrongProtocol | 40026 | Wrong protocol for the requested transaction or request. |
sckOpCanceled | 1004 | The operation is canceled. |
sckInvalidArgument | 10014 | The requested address is a broadcast address, but flag is not set. |
sckWouldBlock | 10035 | Socket is non-blocking and the specified operation will block. |
sckInProgress | 10036 | A blocking Winsock operation in progress. |
sckAlreadyComplete | 10037 | The operation is completed. No blocking operation in progress. |
sckNotSocket | 10038 | The descriptor is not a socket. |
sckMsgTooBig | 10040 | The datagram is too large to fit into the buffer and therefore is truncated. |
sckPortNotSupported | 10043 | The specified port is not supported. |
sckAddressInUse | 10048 | Address in use. |
sckAddressNotAvailable | 10049 | Address unavailable from the local computer. |
sckNetworkSubsystemFailed | 10050 | Network subsystem failed. |
sckNetworkUnreachable | 10051 | The network cannot be reached from this host at this time. |
sckNetReset | 10052 | Connection has timed out. |
sckConnectAborted | 10053 | Connection aborts due to timeout or other failure. |
sckConnectionReset | 10054 | The connection is reset by the remote device. |
sckNoBufferSpace | 10055 | Buffer space is unavailable. |
sckAlreadyConnected | 10056 | Socket is already connected. |
sckNotConnected | 10057 | Socket is not connected. |
sckSocketShutdown | 10058 | Socket has been shut down. |
sckTimedout | 10060 | Socket has been shut down. |
sckConnectionRefused | 10061 | Connection is forcefully rejected. |
sckNotInitialized | 10093 | WinsockInit should be called first. |
sckHostNotFound | 11001 | Authoritative answer: Host not found. |
sckHostNotFoundTryAgain | 11002 | Non-Authoritative answer: Host not found. |
sckNonRecoverableError | 11003 | Non-recoverable errors. |
sckNoData | 11004 | Valid name; no data record of requested type. |
The Winsock control uses the Error event to notify your application that a network error has occurred. An error message does not automatically display. Unlike Visual Basic 6.0, the Windows CE for Visual Basic 6.0 toolkit does not include a CancelDisplay parameter.