Error

Occurs whenever an error accurs in background processing (for example, failed to connect, or failed to send or receive in the background).

Syntax

object.Error(long lNumber, BSTR bstrDescription)

The parts of the Error event syntax are described in the following table.

Part Description
object An object expression that evaluates to an object.
lNumber Indicates error code from WSAGetLastError().
bstrDescription Contains an error description.

The settings for lnumber are described in the following table.

Constant Value Description
sckOutOfMemory 7 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 argument passed to a function was 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 Argument is out of range.
sckWrongProtocol 40026 Wrong protocol for the requested transaction or request.
sckOpCanceled 1004 The operation was 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 is truncated.
sckPortNotSupported 10043 The specified port is not supported.
sckAddressInUse 10048 Address in use.
sckAddressNotAvailable 10049 Address not available from the local machine.
sckNetworkSubsystemFailed 10050 Network subsystem failed.
sckNetworkUnreachable 10051 The network cannot be reached from this host at this time.
sckNetReset 10052 Connection has timed out when SO_KEEPALIVE is set.
sckConnectAborted 11053 Connection is aborted due to timeout or other failure.
sckConnectionReset 10054 The connection is reset by remote side.
sckNoBufferSpace 10055 No buffer space is available.
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.