Поделиться через


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 
);

Параметры

  • 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.

Возвращаемое значение

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

Заметки

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

Требования

Header: afxinet.h

См. также

Основные понятия

CFtpConnection Class

CFtpConnection Members

Hierarchy Chart