Share via


CPathT::RelativePathTo

Call this method to create a relative path from one file or folder to another.

BOOL RelativePathTo( 
   PCXSTR pszFrom, 
   DWORD dwAttrFrom, 
   PCXSTR pszTo, 
   DWORD dwAttrTo  
);

Parameters

  • pszFrom
    The start of the relative path.

  • dwAttrFrom
    The File attributes of pszFrom. If this value contains FILE_ATTRIBUTE_DIRECTORY, pszFrom is assumed to be a directory; otherwise, pszFrom is assumed to be a file.

  • pszTo
    The end point of the relative path.

  • dwAttrTo
    The File attributes of pszTo. If this value contains FILE_ATTRIBUTE_DIRECTORY, pszTo is assumed to be a directory; otherwise, pszTo is assumed to be a file.

Return Value

Returns TRUE on success, FALSE on failure.

Remarks

For more information, see PathRelativePathTo.

Requirements

Header: atlpath.h

See Also

Reference

CPathT Class

Other Resources

CPathT Members