Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

GetUdpTable function

The GetUdpTable function retrieves the IPv4 User Datagram Protocol (UDP) listener table.

Syntax


DWORD GetUdpTable(
  _Out_    PMIB_UDPTABLE pUdpTable,
  _Inout_  PDWORD pdwSize,
  _In_     BOOL bOrder
);

Parameters

pUdpTable [out]

A pointer to a buffer that receives the IPv4 UDP listener table as a MIB_UDPTABLE structure.

pdwSize [in, out]

On input, specifies the size in bytes of the buffer pointed to by the UdpTable parameter.

On output, if the buffer is not large enough to hold the returned listener table, the function sets this parameter equal to the required buffer size in bytes.

On the Windows SDK released for Windows Vista and later, the data type for this parameter is changed to a PULONG which is equivalent to a PDWORD.

bOrder [in]

A Boolean value that specifies whether the returned UDP listener table should be sorted. If this parameter is TRUE, the table is sorted in the order of:

  1. Local IP address
  2. Local port

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 codeDescription
ERROR_INSUFFICIENT_BUFFER

The buffer pointed to by the pUdpTable parameter is not large enough. The required size is returned in the ULONG variable pointed to by the pdwSize parameter.

This error is also returned if the pUdpTable parameter is NULL.

ERROR_INVALID_PARAMETER

The pdwSize parameter is NULL, or GetUdpTable is unable to write to the memory pointed to by the pdwSize parameter.

ERROR_NOT_SUPPORTED

This function is not supported on the operating system in use on the local system.

Other

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

 

Remarks

On the Windows SDK released for Windows Vista and later, the return value from the GetUdpTable function is changed to a data type of ULONG which is equivalent to a DWORD.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Iphlpapi.h

Library

Iphlpapi.lib

DLL

Iphlpapi.dll

See also

GetExtendedUdpTable
GetUdp6Table
GetOwnerModuleFromUdp6Entry
GetOwnerModuleFromUdpEntry
GetUdpStatistics
GetUdpStatisticsEx
MIB_UDPROW
MIB_UDPROW_OWNER_MODULE
MIB_UDPROW_OWNER_PID
MIB_UDPTABLE_OWNER_MODULE
MIB_UDPTABLE_OWNER_PID
MIB_UDPTABLE

 

 

Build date: 11/16/2013

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.