XtfSetOverlayFolder

Sets, or resets, the overlay folder value associated with a specific package full name.

Syntax

HRESULT XtfSetOverlayFolder(
        PCWSTR address,
        PCWSTR packageFullName,
        PCWSTR overlayFolderPath
)   

Parameters

address
Type: PCWSTR

[in] Pointer to the address of the console.

packageFullName
Type: PCWSTR

[in] Pointer to the package full name of the app.

overlayFolderPath
Type: PCWSTR

[in] Pointer to a string that contains the overlay folder path. If overlayFolderPath is null then packageFullName is ignored and the Overlay Folder is reset (equivalent to xbapp overlayfolder package_full_name /r (NDA topic)Authorization required).

Return value

Type: HRESULT

A return value of S_OK indicates the function succeeded. Any other value indicates an unexpected error occurred.

Remarks

Use XTFSetOverlayFolder to set or clear an overlay folder. Use XtfGetOverlayFolder to retrieve the overlay folder path currently set for a package. Use XtfClearAllOverlayFolders to clear all overlay folder that were previously set on the console. Use IXtfApplicationClient::GetInstalled to enumerate all packages currently installed on the console.

Note

Overlay folders set using XtfSetOverlayFolder are persistent across reboots of the console.

C++ Example

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;
}

Requirements

Header: xtfapi.h

Library: XtfApi.lib

Supported platforms: Windows (for Xbox console tools)

See also

Debugging with Overlay Folders (NDA topic)Authorization required
Command line tool xbapp overlayfolder (NDA topic)Authorization required
XTF Transport Errors (NDA topic)Authorization required