Inet ntop windows ce


















Please rate your experience Yes No. Any additional feedback? In this article. The Internet Protocol version 4 IPv4 address family. When this parameter is specified, this function returns an IPv4 address string.

The Internet Protocol version 6 IPv6 address family. When this parameter is specified, this function returns an IPv6 address string. The address family specified in the Family parameter is not supported. An invalid parameter was passed to the function. The InetPton function converts an IPv4 or IPv6 Internet network address in its standard text presentation form into its numeric binary form.

Possible values for the address family are defined in the Ws2def. Note that the Ws2def. A pointer to the NULL -terminated string that contains the text representation of the IP address to convert to numeric binary form.

A pointer to a buffer in which to store the numeric binary representation of the IP address. The IP address is returned in network byte order. If no error occurs, the InetPton function returns a value of 1 and the buffer pointed to by the pAddrBuf parameter contains the binary numeric IP address in network byte order. The InetPton function returns a value of 0 if the pAddrBuf parameter points to a string that is not a valid IPv4 dotted-decimal string or a valid IPv6 address string.

Otherwise, a value of -1 is returned, and a specific error code can be retrieved by calling the WSAGetLastError for extended error information. The InetPton function provides a protocol-independent conversion of an Internet network address in its standard text presentation form into its numeric binary form. For compatibility with their software, they are supported as specified.

When a three-part address is specified, the last part is interpreted as a bit quantity and placed in the right-most 2 bytes of the network address. This makes the three-part address format convenient for specifying Class B network addresses as When a two-part address is specified, the last part is interpreted as a bit quantity and placed in the right-most 3 bytes of the network address. This makes the two-part address format convenient for specifying Class A network addresses as "net.

When only one part is given, the value is stored directly in the network address without any byte rearrangement. Header: Winsock2. Link Library: Ws2. Send Feedback on this topic to the authors.

All rights reserved.



0コメント

  • 1000 / 1000