Skip to content

Latest commit

 

History

History
141 lines (106 loc) · 4.79 KB

nf-wininet-ftpcommandw.md

File metadata and controls

141 lines (106 loc) · 4.79 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wininet.FtpCommandW
FtpCommandW function (wininet.h)
Sends commands directly to an FTP server. (Unicode)
FTP_TRANSFER_TYPE_ASCII
FTP_TRANSFER_TYPE_BINARY
FtpCommand
FtpCommand function [WinINet]
FtpCommandW
_inet_ftpcommand_function
wininet.ftpcommand
wininet/FtpCommand
wininet/FtpCommandW
wininet\ftpcommand.htm
wininet
cd12f52c-80d6-4aee-96c8-cb3cafcf0a6a
12/05/2018
FTP_TRANSFER_TYPE_ASCII, FTP_TRANSFER_TYPE_BINARY, FtpCommand, FtpCommand function [WinINet], FtpCommandA, FtpCommandW, _inet_ftpcommand_function, wininet.ftpcommand, wininet/FtpCommand, wininet/FtpCommandA, wininet/FtpCommandW
wininet.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
FtpCommandW (Unicode) and FtpCommandA (ANSI)
Wininet.lib
Wininet.dll
Windows
19H1
FtpCommandW
wininet/FtpCommandW
c++
APIRef
kbSyntax
DllExport
Wininet.dll
FtpCommand
FtpCommandA
FtpCommandW

FtpCommandW function

-description

The FtpCommand function sends commands directly to an FTP server.

-parameters

-param hConnect [in]

A handle returned from a call to InternetConnect.

-param fExpectResponse [in]

A Boolean value that indicates whether the application expects a data connection to be established by the FTP server. This must be set to TRUE if a data connection is expected, or FALSE otherwise.

-param dwFlags [in]

A parameter that can be set to one of the following values.

Value Meaning
FTP_TRANSFER_TYPE_ASCII
Transfers the file using the FTP ASCII (Type A) transfer method. Control and formatting data is converted to local equivalents.
FTP_TRANSFER_TYPE_BINARY
Transfers the file using the FTP Image (Type I) transfer method. The file is transferred exactly with no changes. This is the default transfer method.

-param lpszCommand [in]

A pointer to a string that contains the command to send to the FTP server.

-param dwContext [in]

A pointer to a variable that contains an application-defined value used to identify the application context in callback operations.

-param phFtpCommand [out]

A pointer to a handle that is created if a valid data socket is opened. The fExpectResponse parameter must be set to TRUE for phFtpCommand to be filled.

-returns

Returns TRUE if successful, or FALSE otherwise. To get a specific error message, call GetLastError.

-remarks

GetLastError can return ERROR_INTERNET_NO_DIRECT_ACCESS if the client application is offline. If one or more of the parameters are invalid, GetLastError will return ERROR_INVALID_PARAMETER.

Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.

Note  WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).
 

Note

The wininet.h header defines FtpCommand as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

FTP Sessions

WinINet Functions