GetUdpStatisticsEx function
The GetUdpStatisticsEx function retrieves the User Datagram Protocol (UDP) statistics for the current computer. The GetUdpStatisticsEx function differs from the GetUdpStatistics function in that GetUdpStatisticsEx also supports the Internet Protocol version 6 (IPv6) protocol family.
Syntax
DWORD GetUdpStatisticsEx( _Out_ PMIB_UDPSTATS pStats, _In_ DWORD dwFamily );
Parameters
- pStats [out]
-
A pointer to a MIB_UDPSTATS structure that receives the UDP statistics for the local computer.
- dwFamily [in]
-
The protocol family for which to retrieve statistics. This parameter must be one of the following values:
Value Meaning - 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 |
|---|---|
|
The pStats parameter is NULL or does not point to valid memory, or the dwFamily parameter is not a valid value. |
|
This function is not supported on the operating system on which the function call was made. |
|
Use FormatMessage to obtain the message string for the returned error. |
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- IP Helper Start Page
- IP Helper Function Reference
- GetIpStatisticsEx
- GetTcpStatisticsEx
- GetUdpStatistics
- MIB_UDPSTATS