> ## 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.

# XtfSetOverlayFolder

> XtfSetOverlayFolder

# XtfSetOverlayFolder

Définit ou réinitialise la valeur du dossier de superposition associée à un nom complet de package spécifique.

<a id="syntaxSection" />

## Syntaxe

```cpp theme={null}
HRESULT XtfSetOverlayFolder(
        PCWSTR address,
        PCWSTR packageFullName,
        PCWSTR overlayFolderPath
)   
```

<a id="ID4ET" />

### Paramètres

*address*<br />Type : PCWSTR

\[in] Pointeur vers l'adresse de la console.

*packageFullName*<br />Type : PCWSTR

\[in] Pointeur vers le nom complet du package de l'application.

*overlayFolderPath*<br />Type : PCWSTR

\[in] Pointeur vers une chaîne qui contient le chemin du dossier de superposition. Si overlayFolderPath est **null**, packageFullName est ignoré et le dossier de superposition est réinitialisé (équivalent à [xbapp overlayfolder package\_full\_name /r (rubrique NDA)](/fr/tools/tools-console/commandlinetools/xbapp)).

<a id="ID4E1" />

### Valeur de retour

Type : HRESULT

Une valeur de retour **S\_OK** indique que la fonction a réussi. Toute autre valeur indique qu'une erreur inattendue s'est produite.

<a id="remarks" />

## Remarques

Utilisez [XTFSetOverlayFolder](/fr/reference/tools/xtf/xtfapi/functions/xtfsetoverlayfolder-xtfapi-xbox-windows-m) pour définir ou effacer un dossier de superposition. Utilisez [XtfGetOverlayFolder](/fr/reference/tools/xtf/xtfapi/functions/xtfgetoverlayfolder-xtfapi-xbox-windows-m) pour récupérer le chemin du dossier de superposition actuellement défini pour un package. Utilisez [XtfClearAllOverlayFolders](/fr/reference/tools/xtf/xtfapi/functions/xtfclearalloverlayfolders-xtfapi-xbox-windows-m) pour effacer tous les dossiers de superposition précédemment définis sur la console. Utilisez [IXtfApplicationClient::GetInstalled](/fr/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/getinstalled-ixtfapplicationclient-xtfapplication-xbox-microsoft-m) pour énumérer tous les packages actuellement installés sur la console.

<Note>
  Les dossiers de superposition définis à l'aide de XtfSetOverlayFolder sont conservés lors des redémarrages de la console.
</Note>

<a id="ID4E6C" />

## Exemple C++

```cpp theme={null}
int wmain(int argc, wchar_t **argv)
{
    HRESULT             hr = S_OK;
    PCWSTR              consoleAddress = L"190.167.10.18";
    PCWSTR              pOverlayFolderPFN = L"682716bc-bcec-4d5b-a21d-e2b6a4e3066d_1.0.0.0_x64__8wekyb3d8bbwe";
    PWSTR               pOverlayFolderPath = L"D:\\MyGame1\\";
    PWSTR               pOverlayFolderPathReturned = nullptr;
    UINT32              bufferSize = 0;

    hr = XtfSetOverlayFolder(consoleAddress, pOverlayFolderPFN, pOverlayFolderPath);
    if (FAILED(hr))
    {
        wprintf(L"\n\n*** XtfSetOverlayFolder failed 0x%x", hr);
        return hr;
    }

    pOverlayFolderPathReturned = new WCHAR[APPLICATION_USER_MODEL_ID_MAX_LENGTH];
    hr = XtfGetOverlayFolder(consoleAddress, pOverlayFolderPFN, pOverlayFolderPathReturned, &buffersize);
    if (FAILED(hr))
    {
        wprintf(L"\n\n*** Overlay Folder Path is set to %s", pOverlayFolderPathReturned);
    }
    else
    {
        wprintf(L"\n\n*** XtfGetOverlayFolder failed 0x%x", hr);
    }
    delete[] pOverlayFolderPathReturned;

    return hr;
}
```

## Configuration requise

**En-tête :** xtfapi.h

**Bibliothèque :** XtfApi.lib

**Plateformes prises en charge :** Windows (pour les outils de console XBOX)

## Voir aussi

[Débogage avec des dossiers de superposition (rubrique NDA)](/fr/build/console-features/debugging-diagnostics/debugging-with-overlay-folders)<br />Outil en ligne de commande [xbapp overlayfolder (rubrique NDA)](/fr/tools/tools-console/commandlinetools/xbapp)<br />[Erreurs de transport XTF (rubrique NDA)](/fr/tools/tools-console/commandlinetools/xtf-transport-errors)


## Related topics

- [XtfGetOverlayFolder](/fr/reference/tools/xtf/xtfapi/functions/xtfgetoverlayfolder-xtfapi-xbox-windows-m.md)
- [XtfClearAllOverlayFolders](/fr/reference/tools/xtf/xtfapi/functions/xtfclearalloverlayfolders-xtfapi-xbox-windows-m.md)
- [Gestion des packages (wdapp.exe)](/fr/tools/tools-console/console_commandlinetools/wdapp.md)
- [XBOX Manager : gestion des applications et des fichiers](/fr/tools/tools-console/xbom/manager-tool-managing-applications.md)
- [Gérer les dossiers de superposition](/fr/tools/tools-console/devhome/devhome-overlay-folders.md)
