Huw Davies : iphlpapi: Retrieve the IPv4 addresses using an export rather than a helper.

Alexandre Julliard julliard at winehq.org
Thu Jul 22 16:28:20 CDT 2021


Module: wine
Branch: master
Commit: 8d9d7fc5d2b858182ab76f29ece658616004b7c2
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8d9d7fc5d2b858182ab76f29ece658616004b7c2

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Jul 22 12:50:19 2021 +0100

iphlpapi: Retrieve the IPv4 addresses using an export rather than a helper.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/iphlpapi/iphlpapi_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
index 6e1d95ab321..b2d597fd9ab 100644
--- a/dlls/iphlpapi/iphlpapi_main.c
+++ b/dlls/iphlpapi/iphlpapi_main.c
@@ -76,6 +76,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(iphlpapi);
 #define CHARS_IN_GUID 39
 
 DWORD WINAPI AllocateAndGetIfTableFromStack( MIB_IFTABLE **table, BOOL sort, HANDLE heap, DWORD flags );
+DWORD WINAPI AllocateAndGetIpAddrTableFromStack( MIB_IPADDRTABLE **table, BOOL sort, HANDLE heap, DWORD flags );
 
 static const NPI_MODULEID *ip_module_id( USHORT family )
 {
@@ -350,7 +351,7 @@ DWORD WINAPI CreateSortedAddressPairs( const PSOCKADDR_IN6 src_list, DWORD src_c
     if (!(pairs = HeapAlloc( GetProcessHeap(), 0, size ))) return ERROR_NOT_ENOUGH_MEMORY;
     ptr = (SOCKADDR_IN6 *)&pairs[dst_count];
 
-    if ((ret = getIPAddrTable( &table, GetProcessHeap(), 0 )))
+    if ((ret = AllocateAndGetIpAddrTableFromStack( &table, FALSE, GetProcessHeap(), 0 )))
     {
         HeapFree( GetProcessHeap(), 0, pairs );
         return ret;




More information about the wine-cvs mailing list