The following tables outline the Object Model for the CE WinSock Control. This control is included in MSCEWinsock.dll.
Table A.41. WinSock Properties
|
BytesReceived
| Integer
| Read-Only. Gets the amount of data, in bytes, received by the WinSock control.
|
LocalHostName
| String
| Read-Only. Gets the name of the local machine (device name).
|
LocalIP
| String
| Read-Only. Gets the local IP address in dotted-string format (xxx.xxx.xxx.xxx).
|
LocalPort
| Integer
| Sets or Gets the local port for use by the WinSock control.
|
Name
| String
| Gets the logical name of the WinSock control as set in the Properties window.
|
Parent
| Object
| Returns a reference to the WinSock control's parent object, such as its containing form.
|
Protocol
| SockCtrlProtocol
| Sets or gets the protocol used for transfer by the WinSock control. Only TCP/IP and IrDA are supported.
|
RemoteHost
| String
| Sets or Gets the IP or host name of the remote machine the socket is connected or will connect to.
|
RemoteHostIP
| String
| Read-Only. Gets the IP address or the remote host in dotted-string format (xxx.xxx.xxx.xxx) after a successful connection.
|
RemotePort
| Integer
| Sets or Gets the remote host port the WinSock control is connected or will connect to.
|
SocketHandle
| Long
| Read-Only. Gets the window handle for the currently open socket used by the WinSock control. This is useful for making calls to the WinSock API.
|
State
| SockCtrlState
| Read-Only. Gets the current state of the WinSock control.
|
ServiceName
| String
| Sets or Gets the service name for an IrDA socket connection.
|
Tag
| String
| Sets or Gets a string that can be used to hold any additional information the programmer wants to store.
|
Table A.43. SockCtrlError Constants
|
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
| 10004
| The operation is canceled.
|
SckInvalidArgument
| 10014
| The requested address is a broadcast address, but flag is not set.
|
SckWouldBlock
| 10035
| Socket is nonblocking and the specified operation will block.
|
SckInProgress
| 10036
| A blocking WinSock operation is 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 did not connect with timeout period
|
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.
|