Back to product page

ExtendedCmd function


Sends extended command to the server.

Type

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

Syntax

  • C
long Sftp_ExtendedCmd(void *Sftp, char *Command, char *Data, int Length);
The ExtendedCmd(void *Sftp,char *Command,char *Data,int Length) syntax has these parts:
void *SftpHandle of the created Sftp instance.
char *CommandCommand to be executed.
char *DataSSH formatted data buffer.
int LengthLength of Data buffer.

Remarks

This function will send SSH_FXP_EXTENDED packet to remote server. It is assumed that Data argument contains preformatted data that follows rules of SSH protocol, and that follows rules of extended command that is being sent.

ExtendedCmdReply callback will be called if command was successful and has some data to return back. Done callback will be called if there was an error, or only simple OK was returned by remote side. Only of of those callback function will be called, never both.

You should also check Extensions property to determine what extensions are supported by the server, since most of them will announce supported extensions during connection time.


Platforms

Windows