From: Austin English austinenglish@gmail.com
Add more failure conditions
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44850 Signed-off-by: Austin English austinenglish@gmail.com Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- 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 b4f77beced..7a447e733a 100644 --- a/dlls/iphlpapi/iphlpapi.spec +++ b/dlls/iphlpapi/iphlpapi.spec @@ -77,7 +77,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 5df4cd832b..95ccf496e7 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; +}