getipv6addr

Retrieves local IPv6 address(es)

getipv6addr <string array> <num>

Parameters

Array <string array>
IP addresses are stored in the string array.
Integer variable <num>
IP address counts. If the IP address is none, it is set to 0.

Return Value

System variable <result>
When the IP addresses are retrieved, it is set to 1.
When the IP address counts is bigger than the <string array> entries, it is set to 0.
When the IP address can not retrieve, it is set to -1. It is always failed on Windows 2000 or earlier.

Example

ipaddr_size = 10
strdim ipaddr ipaddr_size

getipv6addr ipaddr num
if result = -1 then
    messagebox 'Error' 'IPv6 address'
elseif result = 0 then
    N = ipaddr_size - 1
    for i 0 N
        messagebox ipaddr[i] "IPv6 address"
    next
    N = num - ipaddr_size
    sprintf2 str "And %d address(es)." N
    messagebox str "IPv6 address"
else
    N = num - 1
    for i 0 N
        messagebox ipaddr[i] "IPv6 address"
    next
endif

See also