Group: Internet Functions (WinInet) - Library: wininet
Retrieving list of files on the FTP directory
Downloading files from the FTP server using InternetReadFile
Reading list of folders and files on FTP server
Custom FTP Class for Visual FoxPro application
BOOL FtpGetCurrentDirectory(
HINTERNET hConnect,
LPTSTR lpszCurrentDirectory,
LPDWORD lpdwCurrentDirectory
);
DECLARE INTEGER FtpGetCurrentDirectory IN wininet;
INTEGER hFtpSession,;
STRING @ lpszDirectory,;
INTEGER @ lpdwCurrentDirectory
hConnect [in] Valid handle to an FTP session.
lpszCurrentDirectory [out] Pointer to a buffer that receives the current directory string
lpdwCurrentDirectory [in, out] Pointer to a variable that specifies the length, in characters, of the buffer for the current directory string
Returns TRUE if successful, or FALSE otherwise
Before calling this function you must secure enough bytes in a string to return a directory name. The second parameter is also passed by a reference, the function stores the resulting string"s length in it.