CAPL Script

GetIPAddress

This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.

Syntax

long GetIPAddress(char buffer[], dword bufferSize)

Function

Retrieves the default (first) IP address of the computer as a string.

Parameters

buffer Space for the returned address.

bufferSize

Length of the buffer.

Return Values

0 if the function completed successfully, else unequal 0.

char buffer[50];GetIPAddress(buffer, elcount(buffer));write("IP Address: %s", buffer);

IpGetAdapterAddress | IpGetAdapterAddressAsString | IpGetAddressAsNumber | IpGetAddressAsArray | IpGetAddressAsString