GetTcp6Table2 function (iphlpapi.h)
The GetTcp6Table2 function retrieves the TCP connection table for IPv6.
IPHLPAPI_DLL_LINKAGE ULONG GetTcp6Table2( PMIB_TCP6TABLE2 TcpTable, PULONG SizePointer, BOOL Order );
A pointer to a buffer that receives the TCP connection table for IPv6 as a MIB_TCP6TABLE2 structure.
On input, specifies the size of the buffer pointed to by the TcpTable parameter.
On output, if the buffer is not large enough to hold the returned TCP connection table, the function sets this parameter equal to the required buffer size.
A value that specifies whether the TCP connection table should be sorted. If this parameter is TRUE, the table is sorted in ascending order, starting with the lowest local IP address. If this parameter is FALSE, the table appears in the order in which they were retrieved.
The following values are compared (as listed) when ordering the TCP endpoints:
- Local IPv6 address
- Local scope ID
- Local port
- Remote IPv6 address
- Remote scope ID
- Remote port
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
||The buffer pointed to by the TcpTable parameter is not large enough. The required size is returned in the variable pointed to by the SizePointer parameter.|
||The SizePointer parameter is NULL, or GetTcp6Table2 is unable to write to the memory pointed to by the SizePointer parameter.|
||This function is not supported on the operating system in use on the local system.|
||Use FormatMessage to obtain the message string for the returned error.|
The GetTcp6Table2 function is defined on Windows Vista and later.
The GetTcp6Table2 function is an enhanced version of the GetTcp6Table function that also retrieves information on the TCP offload state of the TCP connection.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|