[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: iphlpapi: Add AllocateAndGetTcpExTableFromStack().Signed-off-by: Ralf Habacker <ralf.habacker@freene
From: Ralf Habacker <ralf () habacker ! de>
Date: 2013-08-31 13:40:44
Message-ID: 5221F25C.2000007 () habacker ! de
[Download RAW message or body]
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(+)
["0001-iphlpapi-Add-AllocateAndGetTcpExTableFromStack.patch" (text/x-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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic