Compartir a través de


CFtpConnection::GetCurrentDirectoryAsURL

Call this member function to get the current directory's name as a URL.

BOOL GetCurrentDirectoryAsURL(
   CString& strDirName 
) const;
BOOL GetCurrentDirectoryAsURL(
   LPTSTR pstrName,
   LPDWORD lpdwLen 
) const;

Parameters

  • strDirName
    A reference to a string that will receive the name of the directory.

  • pstrDirName
    A pointer to a string that will receive the name of the directory.

  • lpdwLen
    A pointer to a DWORD that contains the following information:

    On entry

    The size of the buffer referenced by pstrDirName.

    On return

    The number of characters stored to pstrDirName. If the member function fails and ERROR_INSUFFICIENT_BUFFER is returned, then lpdwLen contains the number of bytes that the application must allocate in order to receive the string.

Return Value

Nonzero if successful; otherwise 0. If the call fails, the Win32 function GetLastError may be called to determine the cause of the error.

Remarks

GetCurrentDirectoryAsURL behaves the same as GetCurrentDirectory

The parameter strDirName can be either partially qualified filenames relative to the current directory or fully qualified. A backslash (\) or forward slash (/) can be used as the directory separator for either name. GetCurrentDirectoryAsURL translates the directory name separators to the appropriate characters before they are used.

Requirements

Header: afxinet.h

See Also

Concepts

CFtpConnection Class

CFtpConnection Members

Hierarchy Chart

CFtpConnection::GetCurrentDirectory

CInternetConnection Class