mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Implement WSAStringToAddressA
svn path=/trunk/; revision=14962
This commit is contained in:
parent
4732ce19d1
commit
0d5f3d84cb
1 changed files with 27 additions and 2 deletions
|
@ -320,12 +320,37 @@ WSAStringToAddressA(
|
||||||
OUT LPSOCKADDR lpAddress,
|
OUT LPSOCKADDR lpAddress,
|
||||||
IN OUT LPINT lpAddressLength)
|
IN OUT LPINT lpAddressLength)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
INT ret, len;
|
||||||
|
LPWSTR szTemp;
|
||||||
|
LPWSAPROTOCOL_INFOW lpProtoInfoW = NULL;
|
||||||
|
|
||||||
return 0;
|
len = MultiByteToWideChar( CP_ACP, 0, AddressString, -1, NULL, 0 );
|
||||||
|
szTemp = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
|
||||||
|
MultiByteToWideChar( CP_ACP, 0, AddressString, -1, szTemp, len );
|
||||||
|
|
||||||
|
if (lpProtocolInfo)
|
||||||
|
{
|
||||||
|
len = WSAPROTOCOL_LEN+1;
|
||||||
|
lpProtoInfoW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
|
||||||
|
|
||||||
|
memcpy( lpProtoInfoW, lpProtocolInfo, sizeof(LPWSAPROTOCOL_INFOA));
|
||||||
|
|
||||||
|
MultiByteToWideChar( CP_ACP, 0, lpProtocolInfo->szProtocol, -1, lpProtoInfoW->szProtocol, len );
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = WSAStringToAddressW(szTemp, AddressFamily, lpProtoInfoW, lpAddress, lpAddressLength);
|
||||||
|
|
||||||
|
HeapFree( GetProcessHeap(), 0, szTemp );
|
||||||
|
|
||||||
|
if (lpProtocolInfo)
|
||||||
|
HeapFree( GetProcessHeap(), 0, lpProtoInfoW );
|
||||||
|
|
||||||
|
WSASetLastError(ret);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implement
|
* @implement
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue