FtpGetCurrentDirectory

This function retrieves the current directory for the specified FTP session.

At a Glance

Header file: Wininet.h
Windows CE versions: 2.0 and later

Syntax

BOOL WINAPI FtpGetCurrentDirectory(HINTERNET hConnect, LPCTSTR lpszDirectory, LPDWORD lpdwDirectoryLength);

Parameters

hConnect

[in] Valid handle to an FTP session.

lpszCurrentDirectory

[out] Long pointer to a buffer that receives the null-terminated string that contains the absolute path to the current directory.

lpdwCurrentDirectory

[in/out] Long pointer to a variable that specifies the buffer length, in characters, for the current directory string. The buffer length must include room for a terminating null character. Using a length of MAX_PATH is sufficient for all paths. When the function returns, the variable receives the number of characters copied into the buffer.

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.

If the lpszCurrentDirectory buffer is not large enough, lpdwCurrentDirectory receives the number of bytes required to retrieve the full, current directory name.