ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Net functions
  • Number of IP addresses
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Returns the IP (Internet Protocol) address of a computer.
Caution: Only IPV4 addresses are returned. This operating mode is kept for backward compatibility with the earlier versions. To find out the IPV4 and/or IPV6 addresses, use NetListIPAddress.
Example
// Displays the IP address of local computer
Info(NetIPAddress())
Syntax
<Result> = NetIPAddress([<Computer name>] [, <Index>])
<Result>: Character string
  • IP address of specified computer (in XXX.XXX.XXX.XXX format),
  • Empty string ("") if the computer has less IP addresses than the desired <Index>.
<Computer name>: Optional character string
Name of the computer to use. If this parameter is not specified, the current computer will be considered.
<Index>: Optional integer
Index of the IP address in the list of computer addresses. By default, the address returned is the first address found in the list of computer addresses. The index of the first address is set to 0.
Remarks

Number of IP addresses

  • An IP address is found for each TCP/IP protocol installed on the same computer.
  • To list the different IP addresses of a computer (IPV4 and/or IPV6), use NetListIPAddress.
Component: wd300com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Video NetIPAddress
https://youtu.be/F_naiz6PUuo

https://windevdesenvolvimento.blogspot.com/2019/03/dicas-2038-webdev-aula-32-netipaddress.html

// BTN_IP_COMPUTADOR_NETIPADDRESS

EDT_RESPOSTA=NetIPAddress()
amarildo
09 Mar. 2019

Last update: 09/30/2024

Send a report | Local help