Share via


FtpCommand (Windows Embedded CE 6.0)

1/6/2010

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

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

Header wininet.h
Library wininet.lib
Windows Embedded CE Windows CE 2.12 and later

See Also

Reference

WinInet Functions
InternetReadFile