to lonelysword:
对不起,纯属口误,是onerror里的errorcode,onread里没有errorcode
我把errorevent都设为eegeneral,还是没办法
对于我说过的下面这句话:
还是常常会出现delphi自己的错误消息提示,象10061,10057什么的,
这好象是另外一种error code,如能把它屏蔽我想就不会出现提示了.
是吗?如果是,该怎么做呢。
我找到了help里的有关说明(是在索引中 Error TCP Event 里找到的)
WinSock Error Codes
The following error codes apply to the WinSock ActiveX Controls.
Error Code Error Message
10004 The operation is canceled.
10013 The requested address is a broadcast address, but flag is not set.
10014 Invalid argument.
10022 Socket not bound, invalid address or listen is not invoked prior to accept.
10024 No more file descriptors are available, accept queue is empty.
10035 Socket is non-blocking and the specified operation will block.
10036 A blocking Winsock operation is in progress.
10037 The operation is completed. No blocking operation is in progress.
10038 The descriptor is not a socket.
10039 Destination address is required.
10040 The datagram is too large to fit into the buffer and is truncated.
10041 The specified port is the wrong type for this socket.
10042 Option unknown, or unsupported.
10043 The specified port is not supported.
10044 Socket type not supported in this address family.
10045 Socket is not a type that supports connection oriented service.
10047 Address Family is not supported.
10048 Address in use.
10049 Address is not available from the local machine.
10050 Network subsystem failed.
10051 The network cannot be reached from this host at this time.
10052 Connection has timed out when SO_KEEPALIVE is set.
10053 Connection is aborted due to timeout or other failure.
10054 The connection is reset by remote side.
10055 No buffer space is available.
10056 Socket is already connected.
10057 Socket is not connected.
10058 Socket has been shut down.
10060 The attempt to connect timed out.
10061 Connection is forcefully rejected.
10201 Socket already created for this object.
10202 Socket has not been created for this object.
11001 Authoritative answer: Host not found.
11002 Non-Authoritative answer: Host not found.
11003 Non-recoverable errors.
11004 Valid name, no data record of requested type.
我想只要对它进行有关操作就能完全屏蔽winsocket错误消息(至少
能屏蔽很多onerror里的errorcode参数无法屏蔽的消息)
但到底怎么做?????????
lonelysword,你帮助我也不止一次了,非常感谢
我期待你或是其它朋友能帮我解决这个问题
说到这里我想起了冰河,它好像就完全屏蔽了delphi的英文错误消息
(全用自定义的中文表示),据说它是用c++builder写的
我想delphi应该也能做到这一点