Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
af8c7934
Commit
af8c7934
authored
Oct 05, 2015
by
Michael Müller
Committed by
Alexandre Julliard
Oct 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Implement InetPtonW function.
Signed-off-by:
Michael Müller
<
michael@fds-team.de
>
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
parent
f8aa842d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
socket.c
dlls/ws2_32/socket.c
+30
-0
ws2_32.spec
dlls/ws2_32/ws2_32.spec
+1
-0
No files found.
dlls/ws2_32/socket.c
View file @
af8c7934
...
...
@@ -7456,6 +7456,36 @@ INT WINAPI WS_inet_pton( INT family, PCSTR addr, PVOID buffer)
#endif
}
/***********************************************************************
* InetPtonW (WS2_32.@)
*/
INT
WINAPI
InetPtonW
(
INT
family
,
PCWSTR
addr
,
PVOID
buffer
)
{
char
*
addrA
;
int
len
;
INT
ret
;
TRACE
(
"family %d, addr %s, buffer (%p)
\n
"
,
family
,
debugstr_w
(
addr
),
buffer
);
if
(
!
addr
)
{
SetLastError
(
WSAEFAULT
);
return
SOCKET_ERROR
;
}
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
addr
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
!
(
addrA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
{
SetLastError
(
WSA_NOT_ENOUGH_MEMORY
);
return
SOCKET_ERROR
;
}
WideCharToMultiByte
(
CP_ACP
,
0
,
addr
,
-
1
,
addrA
,
len
,
NULL
,
NULL
);
ret
=
WS_inet_pton
(
family
,
addrA
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
addrA
);
return
ret
;
}
/***********************************************************************
* WSAStringToAddressA (WS2_32.80)
...
...
dlls/ws2_32/ws2_32.spec
View file @
af8c7934
...
...
@@ -53,6 +53,7 @@
@ stdcall FreeAddrInfoW(ptr)
@ stdcall GetAddrInfoW(wstr wstr ptr ptr)
@ stdcall GetNameInfoW(ptr long ptr long ptr long long)
@ stdcall InetPtonW(long wstr ptr)
@ stdcall WSApSetPostRoutine(ptr)
@ stdcall WPUCompleteOverlappedRequest(long ptr long long ptr)
@ stdcall WSAAccept(long ptr ptr ptr long)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment