IFileDataRetriever2::GetAbsoluteSourceFilePath

获取文件的绝对路径。

HRESULT GetAbsoluteSourceFilePath(
  LPWSTR pszAbsoluteSourceFilePath,
  ULONG *pcchAbsoluteSourceFilePathLength);

参数

  • pszAbsoluteSourceFilePath
    [in, out, size_is(*pcchAbsoluteSourceFilePathLength), unique] 返回文件的绝对路径。
  • pcchAbsoluteSourceFilePathLength
    [in, out] 指定 pszAbsoluteSourceFilePath 中的字符数。如果 pszAbsoluteSourceFilePath 太小,则返回检索目录所需的字符数;否则返回写入的字符数。

返回值

  • S_OK

  • 如果绝对文件路径超过 MAX_PATH,则返回值为 CO_E_PATHTOOLONG。

  • E_POINTER

  • 如果 pszAbsoluteSourceFilePath 太小,则返回值为 HRESULT_FROM_WIN32(ERROR_MORE_DATA)。在这种情况下,则在 pcchAbsoluteSourceFilePathLength 中返回必需的字符数。

请参阅

参考

IFileDataRetriever2 接口