Commit b0efe7f8 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

iphlpapi: Improve GetPerAdapterInfo stub.

parent 17248108
......@@ -1450,13 +1450,33 @@ DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf)
* Failure: error code from winerror.h
*
* FIXME
* Stub, returns ERROR_NOT_SUPPORTED.
* Stub, returns empty IP_PER_ADAPTER_INFO in every case.
*/
DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterInfo, PULONG pOutBufLen)
{
ULONG bytesNeeded = sizeof(IP_PER_ADAPTER_INFO);
DWORD ret;
TRACE("(IfIndex %d, pPerAdapterInfo %p, pOutBufLen %p)\n", IfIndex,
pPerAdapterInfo, pOutBufLen);
return ERROR_NOT_SUPPORTED;
if (!pOutBufLen)
ret = ERROR_INVALID_PARAMETER;
else if (!pPerAdapterInfo)
{
*pOutBufLen = bytesNeeded;
ret = NO_ERROR;
}
else if (*pOutBufLen < bytesNeeded)
{
*pOutBufLen = bytesNeeded;
ret = ERROR_BUFFER_OVERFLOW;
}
else
{
memset(pPerAdapterInfo, 0, bytesNeeded);
ret = NO_ERROR;
}
return ret;
}
......
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