IP Helper Functions


AllocateAndGetTcpExTableFromStack Function

[This function is deprecated and not supported as of Windows Vista.]

The AllocateAndGetTcpExTableFromStack function retrieves the TCP connection table and allocates memory from the local heap to store the table.

Syntax

C++
DWORD WINAPI AllocateAndGetTcpExTableFromStack(
  __out  PVOID *ppTcpTable,
  __in   BOOL bOrder,
  __in   HANDLE hHeap,
  __in   DWORD dwFlags,
  __in   DWORD dwFamily
);

Parameters

ppTcpTable [out]

Pointer to the address of the opaque data that contains the TCP connection table after the function returns.

bOrder [in]

If true, the TCP connection entries in the table returned in ppTcpTable are sorted; if false, they are not.

hHeap [in]

Handle to the heap from which the memory to store the table will be allocated.

dwFlags [in]

One or more flags that indicate specific heap allocation control behaviors.

dwFamily [in]

The family of the TCP addresses in the table.

ValueMeaning
AF_INET

Retrieve IPv4 TCP addresses.

AF_INET6

Retrieve IPv6 TCP addresses.

 

Return Value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, it returns a function from winerror.h.

Remarks

The GetTcpTable or GetExtendedTcpTable functions should be used to retrieve the TCP connection table instead of using the AllocateAndGetTcpExTableFromStack function.

Note  The AllocateAndGetTcpExTableFromStack function is deprecated and not supported on Windows Vista and later. On the Microsoft Windows Software Development Kit (SDK) released for Windows Vista and later, the function prototype for AllocateAndGetTcpExTableFromStack is still defined in the Iphlpapi.h header file for continued support on Windows Server 2003 and Windows XP.

Requirements

Minimum supported clientWindows XP
Minimum supported serverWindows Server 2003
End of client supportWindows XP
End of server supportWindows Server 2003
HeaderIphlpapi.h
LibraryIphlpapi.lib
DLLIphlpapi.dll

See Also

AllocateAndGetUdpExTableFromStack
GetTcpTable
GetExtendedTcpTable

Send comments about this topic to Microsoft

Build date: 11/12/2009

Tags :


Page view tracker