diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec index 2a4b3d84c73..abc7152b6b3 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 5df4cd832bd..f1aa0d1e04e 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; +}