|
WSANtohs
The Windows Sockets WSANtohs function converts a u_short from network byte order to host byte order.
int WSANtohs (
SOCKET s,
|
| u_short netshort,
|
| u_short FAR * lphostshort
|
| );
|
|
Parameters
s
[in] A descriptor identifying a socket.
netshort
[in] A 16-bit number in network byte order.
lphostshort
[out] A pointer to a 16-bit number in host byte order.
Remarks
This routine takes a 16-bit number in the network byte order associated with
socket s and returns a 16-bit number pointed to by the lphostshort parameter in host byte order.
Return Values
If no error occurs, WSANtohs returns zero. Otherwise, a value of SOCKET_ERROR is returned, and a specific
error code may be retrieved by calling WSAGetLastError.
Error Codes
WSANOTINITIALISED
| A successful WSAStartup must occur before using this function.
| WSAENETDOWN
| The network subsystem has failed.
| WSAENOTSOCK
| The descriptor is not a socket.
| WSAEFAULT
| The lphostshort argument is not totally contained in a valid part of the user address space.
|
See Also
htonl, htons, ntohl, ntohs, WSAHtonl, WSANtohl, WSAHtons
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|