Back to product page

ErrorText function


Provides a string expression describing an error.

Type

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

Syntax

  • C
long Sftp_GetErrorText(void *Sftp, short ErrorNum, char *Buffer, int *Bufsize);
The ErrorText(void *Sftp,short ErrorNum,char *Buffer,int *Bufsize) syntax has these parts:
void *SftpHandle of the created Sftp instance.
short ErrorNumSpecifies error code.
char *BufferBuffer that will hold the returned string.
int *BufsizeSize of the buffer.

Remarks

The ErrorText property will return a text description of the value specified in the ErrorNum parameter. For a list of possible values, please see the Errors section. If an unknown ErrorNum is entered, 'Unrecognized Error' text will be returned.

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

Platforms

Windows