Microsoft Windows CE 3.0  

FtpPutFile

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function stores a file on the FTP server.

BOOL WINAPI FtpPutFile(
HINTERNET
hConnect
,
LPCTSTR
lpszLocalFile
,
LPCTSTR
lpszNewRemoteFile
,
DWORD
dwFlags
,
DWORD
dwContext
);

Parameters

hConnect
[in] Valid handle to an FTP session.
lpszLocalFile
[in] Long pointer to a null-terminated string that contains the file name to send from the local system.
lpszNewRemoteFile
[in] Long pointer to a null-terminated string that contains the file name to create on the remote system.
dwFlags
[in] Specifies the conditions under which the transfer occurs. Can be a combination of the following values:
Value Description
INTERNET_FLAG_DONT_CACHE Does not add the returned entity to the cache. Identical to the preferred value INTERNET_FLAG_NO_CACHE_WRITE.
INTERNET_FLAG_HYPERLINK Forces a reload if there was no Expires time and no Last-Modified time returned by the server when determining whether to reload the item from the network.
INTERNET_FLAG_MUST_CACHE_REQUEST Causes a temporary file to be created if the file cannot be cached. Identical to the preferred value INTERNET_FLAG_NEED_FILE.
INTERNET_FLAG_NEED_FILE Causes a temporary file to be created if the file cannot be cached.
INTERNET_FLAG_NO_CACHE_WRITE Does not add the returned entity to the cache.
INTERNET_FLAG_RELOAD Forces a download of the requested file, object, or directory listing from the origin server, not from the cache.
INTERNET_FLAG_RESYNCRONIZE Performs a conditional download of the file.
INTERNET_FLAG_TRANSFER_ASCII Transfers the file as ASCII.
INTERNET_FLAG_TRANSFER_BINARY Transfers the file as binary.
dwContext
[in] Specifies an application-defined value that associates this search with application data. This parameter is used only if the application has already called InternetSetStatusCallbackto set up a status callback. All status requests are handled synchronously.

Return Values

TRUE indicates success. FALSE indicates failure. To get extended error data, call GetLastError.

Remarks

Inetftp.dll is available only for Intel x86 processors.

FtpPutFileis a high-level routine that handles all the bookkeeping and overhead associated with reading a file locally and storing it on an FTP server. An application that needs to send file data only, or that requires close control over the file transfer, should use the FtpOpenFileand InternetWriteFilefunctions.

If the dwTransferTypeparameter specifies FILE_TRANSFER_TYPE_ASCII, translation of the file data converts control and formatting characters to local equivalents.

Both lpszNewRemoteFileand lpszLocalFilecan be either partially or fully qualified file names relative to the current directory. A backward slash (\) or forward slash (/) can be used as the directory separator for either name. FtpPutFiletranslates the directory name separators to the appropriate character before they are used.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Wininet.h   Wininet.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

FtpOpenFile, GetLastError, InternetSetStatusCallback