This function issues an arbitrary FTP command to the FTP server.
At a Glance
Header file: | Wininet.h |
Windows CE versions: | 2.0 and later |
Syntax
BOOL WINAPI FtpCommand(HINTERNET hConnect, BOOL fExpectResponse, DWORD dwFlags, LPCTSTR lpszCommand, DWORD dwContext);
Parameters
hConnect
[in] Valid handle for an FTP session.
fExpectResponse
[in] Boolean that specifies if a data response is expected. If fExpectResponse is TRUE, a data response is expected, and the application can call the InternetReadFile function to read the response.
dwFlag
[in] Specifies the conditions under which the data connection takes place. The following flags can be set:
Value | Description |
FTP_TRANSFER_TYPE_ASCII | Data connection using the FTP ASCII ,Type A, transfer method. Control and formatting data is converted to local equivalents. |
FTP_TRANSFER_TYPE_BINARY | Data connection using the FTP Image, Type I, transfer method. The file is transferred exactly as it exists with no changes. This is the default transfer method. |
LpszCommand
[in] Long pointer to the null-terminated string that contains an FTP command, for example, “PWD \r\n”.
dwContext
[in] Specifies an application-defined value that associates the FTP command in a status callback.
Remarks
Inetftp.dll is available only for Intel x86 processors.
The dwContext parameter accepts status callbacks to the application, but all requests are handled synchronously.