Group: Internet Functions (WinInet) - Library: wininet
Uploading file to the FTP server using InternetWriteFile
Downloading files from the FTP server using InternetReadFile
How to retrieve the size of a remote file (FTP)
Custom FTP Class for Visual FoxPro application
HINTERNET FtpOpenFile(
HINTERNET hConnect,
LPCTSTR lpszFileName,
DWORD dwAccess,
DWORD dwFlags,
DWORD_PTR dwContext
);
DECLARE INTEGER FtpOpenFile IN wininet;
INTEGER hFtpSession,;
STRING sFileName,;
INTEGER lAccess,;
INTEGER lFlags,;
INTEGER lContext
hConnect [in] Valid HINTERNET handle to an FTP session.
lpszFileName [in] Pointer to a null-terminated string that contains the name of the file to access on the remote system.
dwAccess [in] Unsigned long integer value that determines how the file will be accessed. This can be GENERIC_READ or GENERIC_WRITE, but not both.
dwFlags [in] Unsigned long integer value that contains the conditions under which the transfers occur.
dwContext [in] Pointer to an unsigned long integer value
Returns a handle if successful, or NULL otherwise. Later this handle can be used by InternetWriteFile or InternetReadFile functions
This function often works in combination with InternetWriteFile and InternetReadFile functions.