GetIpStatisticsEx (Compact 2013)

3/26/2014

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

Syntax

DWORD GetIpStatisticsEx(
  PMIB_IPSTATS pStats,
  DWORD dwFamily
);

Parameters

  • pStats
    [out] Pointer to a MIB_IPSTATS structure that contains the IP 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
GetIpStatistics
GetTcpStatisticsEx
GetUdpStatisticsEx
MIB_IPSTATS

Other Resources

IP Helper