Austin English : iphlpapi: Add GetBestRoute2 stub.

Alexandre Julliard julliard at winehq.org
Wed May 1 16:37:07 CDT 2019


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

Author: Austin English <austinenglish at gmail.com>
Date:   Sun Apr 28 08:13:27 2019 +0200

iphlpapi: Add GetBestRoute2 stub.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44850
Signed-off-by: Austin English <austinenglish at gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/iphlpapi/iphlpapi.spec   |  2 +-
 dlls/iphlpapi/iphlpapi_main.c | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec
index 2a4b3d8..abc7152 100644
--- a/dlls/iphlpapi/iphlpapi.spec
+++ b/dlls/iphlpapi/iphlpapi.spec
@@ -78,7 +78,7 @@
 @ stdcall GetBestInterfaceEx( ptr ptr )
 @ stub GetBestInterfaceFromStack
 @ stdcall GetBestRoute( long long ptr )
-#@ stub GetBestRoute2
+@ stdcall GetBestRoute2( ptr long ptr ptr long ptr ptr )
 @ stub GetBestRouteFromStack
 #@ stub GetCurrentThreadCompartmentId
 @ stdcall GetExtendedTcpTable( ptr ptr long long long long )
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
index 5df4cd8..f1aa0d1 100644
--- a/dlls/iphlpapi/iphlpapi_main.c
+++ b/dlls/iphlpapi/iphlpapi_main.c
@@ -3313,3 +3313,23 @@ DWORD WINAPI GetIpInterfaceTable(ADDRESS_FAMILY family, PMIB_IPINTERFACE_TABLE *
     FIXME("(%u %p): stub\n", family, table);
     return ERROR_NOT_SUPPORTED;
 }
+
+/******************************************************************
+ *    GetBestRoute2 (IPHLPAPI.@)
+ */
+DWORD WINAPI GetBestRoute2(NET_LUID *luid, NET_IFINDEX index,
+                           const SOCKADDR_INET *source, const SOCKADDR_INET *destination,
+                           ULONG options, PMIB_IPFORWARD_ROW2 bestroute,
+                           SOCKADDR_INET *bestaddress)
+{
+    static int once;
+
+    if (!once++)
+        FIXME("(%p, %d, %p, %p, 0x%08x, %p, %p): stub\n", luid, index, source,
+                destination, options, bestroute, bestaddress);
+
+    if (!destination || !bestroute || !bestaddress)
+        return ERROR_INVALID_PARAMETER;
+
+    return ERROR_NOT_SUPPORTED;
+}




More information about the wine-cvs mailing list