Commit 84a51219 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

iphlpapi: Implement if_indextoname() using the ConvertInterface* functions.

parent 259f7c7c
......@@ -3374,11 +3374,19 @@ IF_INDEX WINAPI IPHLP_if_nametoindex(const char *name)
/******************************************************************
* if_indextoname (IPHLPAPI.@)
*/
PCHAR WINAPI IPHLP_if_indextoname(NET_IFINDEX index, PCHAR name)
char *WINAPI IPHLP_if_indextoname( NET_IFINDEX index, char *name )
{
TRACE("(%u, %p)\n", index, name);
NET_LUID luid;
DWORD err;
TRACE( "(%u, %p)\n", index, name );
err = ConvertInterfaceIndexToLuid( index, &luid );
if (err) return NULL;
return getInterfaceNameByIndex(index, name);
err = ConvertInterfaceLuidToNameA( &luid, name, IF_MAX_STRING_SIZE );
if (err) return NULL;
return name;
}
/******************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment