This is a multi-part message in MIME format. --------------080601090400000104000006 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit new (update) - add doc for family parameter - add doc for additional return code - sorting in c file fixed --- dlls/iphlpapi/iphlpapi.spec | 1 + dlls/iphlpapi/ipstats.c | 29 +++++++++++++++++++++++++++++ 2 Dateien geändert, 30 Zeilen hinzugefügt(+) --------------080601090400000104000006 Content-Type: text/x-patch; name="0001-iphlpapi-Add-AllocateAndGetTcpExTableFromStack.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-iphlpapi-Add-AllocateAndGetTcpExTableFromStack.patch" diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec index 36ba13f..4f56e23 100644 --- a/dlls/iphlpapi/iphlpapi.spec +++ b/dlls/iphlpapi/iphlpapi.spec @@ -5,6 +5,7 @@ @ stdcall AllocateAndGetIpAddrTableFromStack( ptr long long long ) @ stdcall AllocateAndGetIpForwardTableFromStack( ptr long long long ) @ stdcall AllocateAndGetIpNetTableFromStack( ptr long long long ) +@ stdcall AllocateAndGetTcpExTableFromStack( ptr long long long long ) @ stdcall AllocateAndGetTcpTableFromStack( ptr long long long ) @ stdcall AllocateAndGetUdpTableFromStack( ptr long long long ) @ stdcall CancelIPChangeNotify( ptr ) diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index 1f52fcc..1d582a7 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -2154,6 +2154,35 @@ DWORD build_tcp_table( TCP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE } /****************************************************************** + * AllocateAndGetTcpExTableFromStack (IPHLPAPI.@) + * + * Get the TCP connection table. + * Like GetTcpTable(), but allocate the returned table from heap. + * + * PARAMS + * ppTcpTable [Out] pointer into which the MIB_TCPTABLE_EX 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 + * family [In] family of the addresses in the table + * + * RETURNS + * ERROR_NOT_SUPPORTED if family is AF_INET6 + * ERROR_INVALID_PARAMETER if ppTcpTable is NULL, whatever GetTcpTable() + * returns otherwise. + */ +DWORD WINAPI AllocateAndGetTcpExTableFromStack( PVOID *ppTcpTable, BOOL bOrder, + HANDLE heap, DWORD flags , DWORD family ) +{ + TRACE("table %p, bOrder %d, heap %p, flags 0x%08x family %d\n", ppTcpTable, bOrder, heap, flags, family); + + if (family != AF_INET) return ERROR_NOT_SUPPORTED; + if (!ppTcpTable) return ERROR_INVALID_PARAMETER; + return build_tcp_table( TCP_TABLE_OWNER_PID_ALL, ppTcpTable, bOrder, heap, flags, NULL ); +} + +/****************************************************************** * AllocateAndGetTcpTableFromStack (IPHLPAPI.@) * * Get the TCP connection table. --------------080601090400000104000006 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --------------080601090400000104000006--