---
name: "AllocateAndGetTcpTableFromStack"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/AllocateAndGetTcpTableFromStack"
---

# AllocateAndGetTcpTableFromStack(3w)

## NAME

**AllocateAndGetTcpTableFromStack** (IPHLPAPI.@)

## SYNOPSIS

DWORD AllocateAndGetTcpTableFromStack\
  (\
   PMIB\_TCPTABLE\* *ppTcpTable*,\
   BOOL           *bOrder*,\
   HANDLE         *heap*,\
   DWORD          *flags*\
  )

## DESCRIPTION

Get the **TCP** connection table. Like **[GetTcpTable(3w)](/GetTcpTable/3w.md)**, but allocate the returned table from *heap*.

## PARAMS

*ppTcpTable* **\[Out\]**  pointer into which the **MIB\_TCPTABLE** is allocated and returned.

*bOrder* **\[In\]**  whether to sort the table.

*heap* **\[In\]**  *heap* from which the table is allocated.

*flags* **\[In\]**  *flags* to HeapAlloc.

## RETURNS

**ERROR\_INVALID\_PARAMETER** if *ppTcpTable* is **NULL**, whatever **[GetTcpTable(3w)](/GetTcpTable/3w.md)** returns otherwise.

## IMPLEMENTATION

Declared in **"ipstats.h"**.

Implemented in **"dlls/iphlpapi/ipstats.c"**.

Debug channel **"iphlpapi"**.
