iphlpapi: Implement GetAdapterIndex.
This commit is contained in:
parent
bceab86d35
commit
72ef8729e6
|
@ -625,15 +625,22 @@ DWORD WINAPI FlushIpNetTable(DWORD dwIfIndex)
|
||||||
* RETURNS
|
* RETURNS
|
||||||
* Success: NO_ERROR
|
* Success: NO_ERROR
|
||||||
* Failure: error code from winerror.h
|
* Failure: error code from winerror.h
|
||||||
*
|
|
||||||
* FIXME
|
|
||||||
* Stub, returns ERROR_NOT_SUPPORTED.
|
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI GetAdapterIndex(LPWSTR AdapterName, PULONG IfIndex)
|
DWORD WINAPI GetAdapterIndex(LPWSTR AdapterName, PULONG IfIndex)
|
||||||
{
|
{
|
||||||
FIXME("(AdapterName %p, IfIndex %p): stub\n", AdapterName, IfIndex);
|
char adapterName[MAX_ADAPTER_NAME];
|
||||||
/* FIXME: implement using getInterfaceIndexByName */
|
int i;
|
||||||
return ERROR_NOT_SUPPORTED;
|
DWORD ret;
|
||||||
|
|
||||||
|
TRACE("(AdapterName %p, IfIndex %p)\n", AdapterName, IfIndex);
|
||||||
|
/* The adapter name is guaranteed not to have any unicode characters, so
|
||||||
|
* this translation is never lossy */
|
||||||
|
for (i = 0; i < sizeof(adapterName) - 1 && AdapterName[i]; i++)
|
||||||
|
adapterName[i] = (char)AdapterName[i];
|
||||||
|
adapterName[i] = '\0';
|
||||||
|
ret = getInterfaceIndexByName(adapterName, IfIndex);
|
||||||
|
TRACE("returning %d\n", ret);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue