Back to product page

MyIP function


Holds the IP address of the local computer.

Type

A Long value. If successful, 0 is returned, otherwise error as specified here

Syntax

  • C
long Sftp_GetMyIP(void *Sftp, char *Buffer, int *Bufsize);
long Sftp_SetMyIP(void *Sftp, char *newVal);
The MyIP(void *Sftp,char *Buffer,int *Bufsize) syntax has these parts:
void *SftpHandle of the created Sftp instance.
char *BufferBuffer that will hold the returned string. Holds the local computer IP address.
int *BufsizeSize of the buffer.

Remarks

Here you can find the IP address of the local computer, as defined in your network settings. Although you can write to this property, it will not change your network settings. It is provided for your reference only.

If your computer has more than one IP address, only first one provided by OS will be shown. You must find another way to obtain the remaining IP addresses.

The Bufsize variable should contain the maximum data length that can be stored in the Buffer variable. If you set Bufsize = 0, then the function will return with error ERROR_INSUFFICIENT_BUFFER and Bufsize will contain the required buffer size.

Platforms

Windows