FtpPutFile

概況:位於頭檔案WinInet.h,將本地檔案上傳到FTP伺服器。

基本介紹

  • 中文名:FtpPutFile
  • 使用:將本地檔案上傳到FTP伺服器保存
函式定義,參數說明,

函式定義

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

參數說明

hConnect
[in] FTP會話句柄
lpszLocalFile
[in]本地檔案路徑
lpszLocalFile
[in]本地檔案路徑
lpszNewRemoteFile
[in]上傳到ftp伺服器的檔案保存路徑
dwFlags
[in]指示檔案上傳的條件,可傳入下面的值,可以組合使用
ValueDescription
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. If the INTERNET_FLAG_HYPERLINK is also specified, WinInet will create the cache file but will not commit it.
INTERNET_FLAG_RELOAD
Forces a download of the requested file, object, or directory listing from the origin server, not from the cache.
INTERNET_FLAG_RESYNCHRONIZE
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]指定套用數據該搜尋相關聯的應用程式定義的值。此參數僅當應用程式已調用InternetSetStatusCallback成立一個狀態回調。所有的狀態請求都得到同步處理。

相關詞條

熱門詞條

聯絡我們