IFileDataRetriever::GetRelativeDirectoryPath
Gets the path of the file, relative to the root directory of the replica.
HRESULT GetRelativeDirectoryPath(
LPWSTR pszDirectoryPath,
ULONG *pcchDirectoryPathLength);
Parameters
- pszDirectoryPath
[in, out, size_is(*pcchDirectoryPathLength)] Returns the path of the file, relative to the root directory of the replica. This path does not have a slash as its first character.
- pcchDirectoryPathLength
[in, out] Specifies the number of characters in pszDirectoryPath. Returns the number of characters required to retrieve the directory when pszDirectoryPath is too small, or returns the number of characters written.
Return Value
S_OK.
E_POINTER.
E_INVALIDARG.
HRESULT_FROM_WIN32(ERROR_MORE_DATA) when pszDirectoryPath is too small. In this situation, the required number of characters is returned in pcchDirectoryPathLength.
Remarks
To get the full relative path for the file, combine the path returned in pszDirectoryPath with the file name contained in the WIN32_FIND_DATAW.cFileName value returned by IFileDataRetriever::GetFileInfo.
The path that is returned in pszDirectoryPath is relative to the root directory of the replica. It does not contain a slash as its first character. For example, when this method is called for a file in the root directory of the replica, pszDirectoryPath contains the empty string, " ".