[PATCH] ws2_32: Implement InetNtopW.

Bruno Jesus 00cpxxx at gmail.com
Thu Jul 21 13:19:20 CDT 2016


On Thu, Jul 21, 2016 at 2:46 PM, Philipp Hoppermann <plata at mailbox.org> wrote:
> Fixes "unimplemented function WS2_32.dll.InetNtopW"

Hi, thanks for the patch.

> At the moment, this fix just calls inet_ntop

Unfortunately you can't do that. inet_ntop replies in char, not WCHAR.
Please see how InetPtonW is implemented [1], by following its example
you will be able to implement the function properly using
WS_inet_ntop.

http://source.winehq.org/git/wine.git/commitdiff/af8c79343ce9eb24e223607ec2c04cb91ffaf782

> Signed-off-by: Philipp Hoppermann <plata at mailbox.org>
> ---
>  dlls/ws2_32/socket.c    | 8 ++++++++
>  dlls/ws2_32/ws2_32.spec | 1 +
>  2 files changed, 9 insertions(+)
>
> diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
> index b0af3d7..0622060 100644
> --- a/dlls/ws2_32/socket.c
> +++ b/dlls/ws2_32/socket.c
> @@ -7934,6 +7934,14 @@ INT WINAPI InetPtonW(INT family, PCWSTR addr, PVOID buffer)
>  }
>
>  /***********************************************************************
> +*              InetNtopW                      (WS2_32.@)
> +*/
> +PCWSTR WINAPI InetNtopW(INT  family, PVOID addr, PWSTR stringBuf, SIZE_T stringBufSize)

Please change stringBuf to buffer and stringBufSize to buffer_len.



More information about the wine-devel mailing list