Поделиться через


GetTcpStatisticsEx (Compact 2013)

3/26/2014

This function retrieves the Transmission Control Protocol (TCP) statistics for the current device. This function differs from the GetTcpStatistics function in that this function also supports the Internet Protocol version 6 (IPv6) protocol family.

Syntax

DWORD GetTcpStatisticsEx(
  PMIB_TCPSTATS pStats, 
  DWORD dwFamily
);

Parameters

  • pStats
    [out] Pointer to a MIB_TCPSTATS structure that contains the TCP statistics for the local device.
  • dwFamily
    [in] The protocol family for which to retrieve statistics. The following table shows the possible values for this parameter.

    Value

    Description

    AF_INET

    Internet Protocol version 4 (IPv4).

    AF_INET6

    Internet Protocol version 6 (IPv6).

Return Value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Return code

Description

ERROR_INVALID_PARAMETER

The pStats parameter is NULL or does not point to valid memory, or the dwFamily parameter is not a valid value.

ERROR_NOT_SUPPORTED

This function is not supported on the operating system on which the function call was made.

Other

Use FormatMessage to obtain the message string for the returned error.

Requirements

Header

iphlpapi.h

Library

Iphlpapi.lib

See Also

Reference

IP Helper Functions
GetIpStatisticsEx
GetTcpStatistics
GetUdpStatisticsEx
MIB_TCPSTATS
GetTcpStatistics

Other Resources

IP Helper