A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z


The Windows Sockets inet_addr function converts a string containing an Internet Protocol dotted address into a proper address for the IN_ADDR structure.

Declare Function inet_addr Lib "wsock32.dll" (ByVal cp As String) As Long


Operating Systems Supported
Requires Windows Sockets 1.1


Parameter Information
- cp
[in] A null-terminated character string representing a number expressed in the Internet standard ".'' notation.

Return Values
If no error occurs, inet_addr returns an unsigned long value containing a suitable binary representation of the Internet address given. If the string in the cp parameter does not contain a legitimate Internet address, for example if a portion of an "a.b.c.d" address exceeds 255, inet_addr returns the value INADDR_NONE.

Last update: 07 April 2006