Windows提供了一套非常轻量级的网络函数,方便进行网络应用开发,整理出来供参考使用。
The following functions are used in Windows networking:
- MultinetGetConnectionPerformance
- WNetAddConnection2
- WNetAddConnection3
- WNetCancelConnection
- WNetCancelConnection2
- WNetCloseEnum
- WNetConnectionDialog
- WNetConnectionDialog1
- WNetDisconnectDialog
- WNetDisconnectDialog1
- WNetEnumResource
- WNetGetConnection
- WNetGetLastError
- WNetGetNetworkInformation
- WNetGetProviderName
- WNetGetResourceInformation
- WNetGetResourceParent
- WNetGetUniversalName
- WNetGetUser
- WNetOpenEnum
- WNetRestoreConnectionW
- WNetUseConnection
Obsolete Functions
The following function is provided only for compatibility with 16-bit versions of Windows:
windows提供了大量的网络辅助函数,如下也为探讨内容:
IP Helper Functions
The following functions retrieve and modify configuration settings for the TCP/IP transport on the local computer. The following categorical listing can help determine which collection of functions is best suited for a given task:
Adapter Management
Address Resolution Protocol (ARP) Management
- CreateIpNetEntry
- CreateProxyArpEntry
- DeleteIpNetEntry
- DeleteProxyArpEntry
- FlushIpNetTable
- GetIpNetTable
- SendARP
- SetIpNetEntry
Interface Conversion
- ConvertInterfaceAliasToLuid
- ConvertInterfaceGuidToLuid
- ConvertInterfaceIndexToLuid
- ConvertInterfaceLuidToAlias
- ConvertInterfaceLuidToGuid
- ConvertInterfaceLuidToIndex
- ConvertInterfaceLuidToNameA
- ConvertInterfaceLuidToNameW
- ConvertInterfaceNameToLuidA
- ConvertInterfaceNameToLuidW
- if_indextoname
- if_nametoindex
Interface Management
- GetFriendlyIfIndex
- GetIfEntry
- GetIfEntry2
- GetIfStackTable
- GetIfTable
- GetIfTable2
- GetIfTable2Ex
- GetInterfaceInfo
- GetInvertedIfStackTable
- GetIpInterfaceEntry
- GetIpInterfaceTable
- GetNumberOfInterfaces
- InitializeIpInterfaceEntry
- SetIfEntry
- SetIpInterfaceEntry
Internet Protocol (IP) and Internet Control Message Protocol (ICMP)
- GetIcmpStatistics
- GetIpStatistics
- Icmp6CreateFile
- Icmp6ParseReplies
- Icmp6SendEcho2
- IcmpCloseHandle
- IcmpCreateFile
- IcmpParseReplies
- IcmpSendEcho
- IcmpSendEcho2
- IcmpSendEcho2Ex
- SetIpTTL
IP Address Management
- AddIPAddress
- CreateAnycastIpAddressEntry
- CreateUnicastIpAddressEntry
- DeleteIPAddress
- DeleteAnycastIpAddressEntry
- DeleteUnicastIpAddressEntry
- GetAnycastIpAddressEntry
- GetAnycastIpAddressTable
- GetIpAddrTable
- GetMulticastIpAddressEntry
- GetMulticastIpAddressTable
- GetUnicastIpAddressEntry
- GetUnicastIpAddressTable
- InitializeUnicastIpAddressEntry
- IpReleaseAddress
- IpRenewAddress
- NotifyStableUnicastIpAddressTable
- SetUnicastIpAddressEntry
IP Address String Conversion
- RtlIpv4AddressToString
- RtlIpv4AddressToStringEx
- RtlIpv4StringToAddress
- RtlIpv4StringToAddressEx
- RtlIpv6AddressToString
- RtlIpv6AddressToStringEx
- RtlIpv6StringToAddress
- RtlIpv6StringToAddressEx
IP Neighbor Address Management
- CreateIpNetEntry2
- DeleteIpNetEntry2
- FlushIpNetTable2
- GetIpNetEntry2
- GetIpNetTable2
- ResolveIpNetEntry2
- ResolveNeighbor
- SetIpNetEntry2
IP Path Management
IP Route Management
- CreateIpForwardEntry
- CreateIpForwardEntry2
- DeleteIpForwardEntry
- DeleteIpForwardEntry2
- EnableRouter
- GetBestInterface
- GetBestInterfaceEx
- GetBestRoute
- GetBestRoute2
- GetIpForwardEntry2
- GetIpForwardTable
- GetIpForwardTable2
- GetRTTAndHopCount
- InitializeIpForwardEntry
- SetIpForwardEntry
- SetIpForwardEntry2
- SetIpStatistics
- SetIpStatisticsEx
- UnenableRouter
IP Table Memory Management
IP Utility
Network Configuration
Notification
- CancelMibChangeNotify2
- NotifyAddrChange
- NotifyIpInterfaceChange
- NotifyRouteChange
- NotifyRouteChange2
- NotifyUnicastIpAddressChange
Persistent Port Reservarion
- CreatePersistentTcpPortReservation
- CreatePersistentUdpPortReservation
- DeletePersistentTcpPortReservation
- DeletePersistentUdpPortReservation
- LookupPersistentTcpPortReservation
- LookupPersistentUdpPortReservation
Security Health
These functions are defined only on Windows Server 2003.
Note These functions are not available Windows Vista and Windows Server 2008.
Teredo IPv6 Client Management
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)
- GetExtendedTcpTable
- GetExtendedUdpTable
- GetOwnerModuleFromTcp6Entry
- GetOwnerModuleFromTcpEntry
- GetOwnerModuleFromUdp6Entry
- GetOwnerModuleFromUdpEntry
- GetPerTcp6ConnectionEStats
- GetPerTcpConnectionEStats
- GetTcpStatistics
- GetTcpStatisticsEx
- GetTcp6Table
- GetTcp6Table2
- GetTcpTable
- GetTcpTable2
- SetPerTcp6ConnectionEStats
- SetPerTcpConnectionEStats
- SetTcpEntry
- GetUdp6Table
- GetUdpStatistics
- GetUdpStatisticsEx
- GetUdpTable
Deprecated APIs
Note These functions are deprecated and not supported by Microsoft.