[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    iphlpapi: Add AllocateAndGetTcpExTableFromStack().
From:       Ralf Habacker <ralf.habacker () freenet ! de>
Date:       2013-08-31 12:16:03
Message-ID: 5221DE83.70909 () freenet ! de
[Download RAW message or body]

new
- add doc for family parameter
- add doc for additional return code
- sorting in c file fixed

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
---
 dlls/iphlpapi/iphlpapi.spec |    1 +
 dlls/iphlpapi/ipstats.c     |   27 +++++++++++++++++++++++++++
 2 Dateien geändert, 28 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..37af0f0 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -2179,6 +2179,33 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE \
                *ppTcpTable, BOOL bO
     return build_tcp_table( TCP_TABLE_BASIC_ALL, (void **)ppTcpTable, bOrder, heap, \
flags, NULL );  }
 
+/******************************************************************
+ *    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
+ *
+ * RETURNS
+ *  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 ); +}
+
 static DWORD get_udp_table_sizes( UDP_TABLE_CLASS class, DWORD row_count, DWORD \
*row_size )  {
     DWORD table_size;





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic