Compartilhar via


CFtpConnection::Command

Sends a command directly to an FTP server.

CInternetFile* Command(
   LPCTSTR pszCommand,
   CmdResponseType eResponse = CmdRespNone,
   DWORD dwFlags = FTP_TRANSFER_TYPE_BINARY,
   DWORD_PTR dwContext = 1 
);

Parameters

  • pszCommand
    A pointer to a string containing the command to be sent.

  • eResponse
    Determines whether a response is expected from the FTP server. Can be one of the following values:

    • CmdRespNone   No response is expected.

    • CmdRespRead   A response is expected.

  • dwFlags
    A value containing the flags that control this function. For a complete list, see FTPCommand.

  • dwContext
    A pointer to a value containing an application-defined value used to identify the application context in callbacks.

Return Value

Nonzero if successful; otherwise 0. If the call fails, the Windows function GetLastError may be called to determine the cause of the error.

Remarks

This member function emulates the functionality of the FTPCommand function, as described in the Windows SDK.

Requirements

Header: afxinet.h

See Also

Reference

CFtpConnection Class

Hierarchy Chart

Other Resources

CFtpConnection Members