Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.63 KB

FtpGetCurrentDirectory.md

File metadata and controls

61 lines (42 loc) · 1.63 KB

Home

Function name : FtpGetCurrentDirectory

Group: Internet Functions (WinInet) - Library: wininet


Retrieves the current directory for the specified FTP session


Code examples:

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

Declaration:

BOOL FtpGetCurrentDirectory(
	HINTERNET hConnect,
	LPTSTR lpszCurrentDirectory,
	LPDWORD lpdwCurrentDirectory
);
  

FoxPro declaration:

DECLARE INTEGER FtpGetCurrentDirectory IN wininet;
    INTEGER   hFtpSession,;
    STRING  @ lpszDirectory,;
    INTEGER @ lpdwCurrentDirectory  

Parameters:

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


Return value:

Returns TRUE if successful, or FALSE otherwise


Comments:

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.