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
8f07cdf9
Commit
8f07cdf9
authored
Mar 29, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Implement GetNameInfoW.
parent
86aecc84
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
socket.c
dlls/ws2_32/socket.c
+25
-0
ws2_32.spec
dlls/ws2_32/ws2_32.spec
+1
-0
No files found.
dlls/ws2_32/socket.c
View file @
8f07cdf9
...
...
@@ -5104,6 +5104,31 @@ int WINAPI WS_getnameinfo(const SOCKADDR *sa, WS_socklen_t salen, PCHAR host,
#endif
}
int
WINAPI
GetNameInfoW
(
const
SOCKADDR
*
sa
,
WS_socklen_t
salen
,
PWCHAR
host
,
DWORD
hostlen
,
PWCHAR
serv
,
DWORD
servlen
,
INT
flags
)
{
int
ret
;
char
*
hostA
=
NULL
,
*
servA
=
NULL
;
if
(
host
&&
(
!
(
hostA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
hostlen
))))
return
EAI_MEMORY
;
if
(
serv
&&
(
!
(
servA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
servlen
))))
{
HeapFree
(
GetProcessHeap
(),
0
,
hostA
);
return
EAI_MEMORY
;
}
ret
=
WS_getnameinfo
(
sa
,
salen
,
hostA
,
hostlen
,
servA
,
servlen
,
flags
);
if
(
!
ret
)
{
if
(
host
)
MultiByteToWideChar
(
CP_ACP
,
0
,
hostA
,
-
1
,
host
,
hostlen
);
if
(
serv
)
MultiByteToWideChar
(
CP_ACP
,
0
,
servA
,
-
1
,
serv
,
servlen
);
}
HeapFree
(
GetProcessHeap
(),
0
,
hostA
);
HeapFree
(
GetProcessHeap
(),
0
,
servA
);
return
ret
;
}
/***********************************************************************
* getservbyport (WS2_32.56)
*/
...
...
dlls/ws2_32/ws2_32.spec
View file @
8f07cdf9
...
...
@@ -52,6 +52,7 @@
@ stdcall FreeAddrInfoW(ptr)
@ stdcall GetAddrInfoW(wstr wstr ptr ptr)
@ stdcall GetNameInfoW(ptr long ptr long ptr long long)
@ 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