参考MSDN的IP Helper部分(bcb的帮助中是没有这部分内容的)
下面是一部分摘要(MSDN 2003.4版)
Platform SDK: IP Helper
About IP Helper
Internet Protocol Helper (IP Helper) assists network administration of the local computer by enabling applications to retrieve information about the network configuration of the local computer, and to modify that configuration. IP Helper also provides notification mechanisms to ensure that an application is notified when certain aspects of the local computer network configuration change.
Many of the IP Helper functions pass structure parameters that represent data types associated with the Management Information Base technology. The IP Helper functions use these structures to represent various networking information, such as ARP cache entries. Since these structures are also used by the MIB API, they are described in the Management Information Base Reference. Although the IP Helper API uses these structures, IP Helper is distinct from the Management Information Base (MIB) and Simple Network Management Protocol (SNMP).
IP Helper provides capabilities in the following areas:
Retrieving Information About Network Configuration
Managing Network Adapters
Managing Interfaces
Managing IP Addresses
Using the Address Resolution Protocol
Retrieving Information on the Internet Protocol and the Internet Control Message Protocol
Managing Routing
Receiving Notification of Network Events
Retrieving Information About the Transmission Control Protocol and the User Datagram Protocol
int bufsize=64*1024;
int err;
err=setsockopt(UDP->ThisSocket,SOL_SOCKET,SO_RCVBUF,(char*)(&bufsize),sizeof(int));
if(0!=err)
MessageBox(Handle,AnsiString(err).c_str(),"提示信息",MB_OK|MB_ICONERROR);