Commit 8397e3da authored by Philipp Hoppermann's avatar Philipp Hoppermann Committed by Alexandre Julliard

ws2_32: Implement InetNtopW.

parent 4832adf8
......@@ -7934,6 +7934,26 @@ INT WINAPI InetPtonW(INT family, PCWSTR addr, PVOID buffer)
}
/***********************************************************************
* InetNtopW (WS2_32.@)
*/
PCWSTR WINAPI InetNtopW(INT family, PVOID addr, PWSTR buffer, SIZE_T len)
{
char bufferA[WS_INET6_ADDRSTRLEN];
PWSTR ret = NULL;
TRACE("family %d, addr (%p), buffer (%p), len %ld\n", family, addr, buffer, len);
if (WS_inet_ntop(family, addr, bufferA, sizeof(bufferA)))
{
if (MultiByteToWideChar(CP_ACP, 0, bufferA, -1, buffer, len))
ret = buffer;
else
SetLastError(ERROR_INVALID_PARAMETER);
}
return ret;
}
/***********************************************************************
* WSAStringToAddressA (WS2_32.80)
*/
INT WINAPI WSAStringToAddressA(LPSTR AddressString,
......
......@@ -54,6 +54,7 @@
@ stdcall GetAddrInfoExW(wstr wstr long ptr ptr ptr ptr ptr ptr ptr)
@ stdcall GetAddrInfoW(wstr wstr ptr ptr)
@ stdcall GetNameInfoW(ptr long ptr long ptr long long)
@ stdcall InetNtopW(long ptr ptr long)
@ stdcall InetPtonW(long wstr ptr)
@ stdcall WSApSetPostRoutine(ptr)
@ stdcall WPUCompleteOverlappedRequest(long ptr long long ptr)
......
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