> ## Documentation Index
> Fetch the complete documentation index at: https://notevil.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CAPLfunctionGetIPAddress

# GetIPAddress

[Valid for](../../../Shared/FeatureAvailability.md): CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

## Function Syntax

```plaintext theme={null}
long GetIPAddress(char buffer[], dword bufferSize);
```

## Description

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.

## Example

```plaintext theme={null}
char buffer[50];
GetIPAddress(buffer, elcount(buffer));
write("IP Address: %s", buffer);
```

[IpGetAdapterAddress](../../TCPIPAPI/Functions/CAPLfunctionIPGetAdapterAddress.md) • [IpGetAdapterAddressAsString](../../TCPIPAPI/Functions/CAPLfunctionIPGetAdapterAddressAsString.md) • [IpGetAddressAsNumber](../../TCPIPAPI/Functions/CAPLfunctionIPGetAddressAsNumber.md) • [IpGetAddressAsArray](../../TCPIPAPI/Functions/CAPLfunctionIPGetAddressAsArray.md) • [IpGetAddressAsString](../../TCPIPAPI/Functions/CAPLfunctionIPGetAddressAsString.md)
