FtpCommand

This function issues an arbitrary FTP command to the FTP server.

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.
  • dwFlags
    [in] Specifies the conditions under which the data connection takes place. The following table shows the flags that 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

The dwContext parameter accepts status callbacks to the application, but all requests are handled synchronously.

Requirements

OS Versions: Windows CE 2.12 and later.
Header: Wininet.h.
Link Library: Wininet.lib.

See Also

InternetReadFile | WinInet Functions

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.