> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XtfGetOverlayFolder

> XtfGetOverlayFolder

# XtfGetOverlayFolder

获取与特定包完整名称关联的 overlay folder 路径。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
HRESULT XtfGetOverlayFolder(
        PCWSTR address,
        PCWSTR packageFullName,
        PWSTR overlayFolderPath,
        UINT32* overlayFolderPathLength
)   
```

<a id="ID4ET" />

### 参数

*address*<br />类型：PCWSTR

\[in] 指向主机地址的指针。

*packageFullName*<br />类型：PCWSTR

\[in] 指向应用完整包名的指针。

*overlayFolderPath*<br />类型：PWSTR

\[out, optional] overlay folder 路径。

*overlayFolderPathLength*<br />类型：UINT32

\[in, out] overlayFolderPath 的长度（以 WCHAR 为单位）。

<a id="ID4E1" />

### 返回值

类型：HRESULT

如果尚未为指定的完整包名设置任何路径，则 overlayFolderPath 的返回值为 **null**，overlayFolderPathLength 为零 (0)，并返回 **S\_OK**。

成功时返回 **S\_OK**。如果 overlayFolderPath 空间不够，则返回 **HRESULT\_FROM\_WIN32(ERROR\_MORE\_DATA)**，并在 overlayFolderPathLength 中返回所需的缓冲区长度。

<a id="remarks" />

## 备注

使用 [XTFSetOverlayFolder](/reference/tools/xtf/xtfapi/functions/xtfsetoverlayfolder-xtfapi-xbox-windows-m) 来设置或清除 overlay folder。使用 [XtfGetOverlayFolder](/reference/tools/xtf/xtfapi/functions/xtfgetoverlayfolder-xtfapi-xbox-windows-m) 检索当前为某个包设置的 overlay folder 路径。使用 [XtfClearAllOverlayFolders](/reference/tools/xtf/xtfapi/functions/xtfclearalloverlayfolders-xtfapi-xbox-windows-m) 清除主机上之前设置的所有 overlay folder。使用 [IXtfApplicationClient::GetInstalled](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/getinstalled-ixtfapplicationclient-xtfapplication-xbox-microsoft-m) 枚举当前安装在主机上的所有包。

## 要求

**头文件：** xtfapi.h

**库：** XtfApi.lib

**支持的平台：** Windows（用于 XBOX 主机工具）

## 另请参阅

[XTF 传输错误 (NDA 主题)](/tools/tools-console/commandlinetools/xtf-transport-errors)<br />[其他 Xtf API](/reference/tools/xtf/xtfapi/atoc-xtfapi)<br />[使用 Overlay Folder 调试 (NDA 主题)](/build/console-features/debugging-diagnostics/debugging-with-overlay-folders)<br />命令行工具 [xbapp overlayfolder (NDA 主题)](/tools/tools-console/commandlinetools/xbapp)


## Related topics

- [XtfSetOverlayFolder](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfsetoverlayfolder-xtfapi-xbox-windows-m.md)
- [XtfClearAllOverlayFolders](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfclearalloverlayfolders-xtfapi-xbox-windows-m.md)
- [面向 XBOX 游戏的 Title Performance Overlay](/zh-CN/tools/tools-console/titleperfoverlay/index.md)
- [XGameSaveFilesGetFolderWithUiAsync](/zh-CN/reference/system/xgamesavefiles/functions/xgamesavefilesgetfolderwithuiasync.md)
- [XGameSaveFilesGetFolderWithUiResult](/zh-CN/reference/system/xgamesavefiles/functions/xgamesavefilesgetfolderwithuiresult.md)
