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

# XUserResolveIssueWithUiUtf16Result

> XUserResolveIssueWithUiUtf16Result

# XUserResolveIssueWithUiUtf16Result

Recupera el resultado de una llamada a [XUserResolveIssueWithUiUtf16Async](/reference/system/xuser/functions/xuserresolveissuewithuiutf16async).

## Sintaxis

```cpp theme={null}
HRESULT XUserResolveIssueWithUiUtf16Result(  
         XAsyncBlock* async  
)  
```

### Parámetros

*async*   \_Inout\_\
Tipo: XAsyncBlock\*

El [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) que pasamos a [XUserResolveIssueWithUiUtf16Async](/reference/system/xuser/functions/xuserresolveissuewithuiutf16async).

### Valor devuelto

Tipo: HRESULT

Devuelve S\_OK si la operación se realiza correctamente; de lo contrario, devuelve un código de error.
Para obtener una lista de los códigos de error, consulte [Códigos de error](/reference/errorcodes).

| Código de retorno | Descripción                           |
| ----------------- | ------------------------------------- |
| S\_OK             | La operación se realizó correctamente |
| E\_ABORT          | El usuario canceló la operación       |

## Comentarios

Si una API de XUsers devuelve un error E\_GAMEUSER\_RESOLVE\_USER\_ISSUE\_REQUIRED, el usuario debe interactuar con la interfaz de usuario (UI) del sistema para resolver el problema.
Llame a [XUserResolveIssueWithUiUtf16Async](/reference/system/xuser/functions/xuserresolveissuewithuiutf16async) para mostrar la interfaz de usuario del sistema adecuada.

Para mostrar una interfaz de usuario del sistema para resolver problemas de tokens con una dirección URL no Unicode, llame a [XUserResolveIssueWithUiAsync](/reference/system/xuser/functions/xuserresolveissuewithuiasync).

En el ejemplo siguiente se muestra cómo mostrar la interfaz de usuario del sistema para resolver problemas de tokens con una dirección URL.

```cpp theme={null}
HRESULT ResolveUserIssueComplete(XAsyncBlock* ab)
{
    if (SUCCEEDED_LOG(XUserResolveIssueWithUiResult(ab)))
    {
        appLog.AddLog("Successfully Resolved User Issue\n");
    }

    return S_OK;
}

HRESULT ResolveUserIssueUtf16Complete(XAsyncBlock* ab)
{
    if (SUCCEEDED_LOG(XUserResolveIssueWithUiUtf16Result(ab)))
    {
        appLog.AddLog("Successfully Resolved User Issue\n");
    }

    return S_OK;
}

HRESULT ResolveUserIssueWithUiAsync(
    XTaskQueueHandle queue,
    const char* narrowUrl = nullptr,
    const wchar_t* wideUrl = nullptr,
    bool useUtf16 = false)
{
    auto resolveAsyncBlock = std::make_unique<XAsyncBlock>();
    ZeroMemory(resolveAsyncBlock.get(), sizeof(*resolveAsyncBlock));
    resolveAsyncBlock->queue = queue;
    resolveAsyncBlock->context = this;

    if (useUtf16)
    {
        resolveAsyncBlock->callback = [](XAsyncBlock* ab)
        {
            auto asyncBlock = std::unique_ptr<XAsyncBlock>(ab);
            LOG_IF_FAILED(static_cast<User*>(ab->context)->ResolveUserIssueUtf16Complete(ab));
        };

        if (SUCCEEDED_LOG(XUserResolveIssueWithUiUtf16Async(
            _handle.get(),
            wideUrl,
            resolveAsyncBlock.get())))
        {
            // The call succeeded, so release the std::unique_ptr ownership of XAsyncBlock* since the callback will take over ownership.
            // If the call fails, the std::unique_ptr will keep ownership and delete the XAsyncBlock*
            resolveAsyncBlock.release();
        }
    }
    else
    {
        resolveAsyncBlock->callback = [](XAsyncBlock* ab)
        {
            auto asyncBlock = std::unique_ptr<XAsyncBlock>(ab);
            LOG_IF_FAILED(static_cast<User*>(ab->context)->ResolveUserIssueComplete(ab));
        };

        if (SUCCEEDED_LOG(XUserResolveIssueWithUiAsync(
            _handle.get(),
            narrowUrl,
            resolveAsyncBlock.get())))
        {
            // The call succeeded, so release the std::unique_ptr ownership of XAsyncBlock* since the callback will take over ownership.
            // If the call fails, the std::unique_ptr will keep ownership and delete the XAsyncBlock*
            resolveAsyncBlock.release();
        }
    }

    return S_OK;
}
```

## Requisitos

**Encabezado:** XUser.h

**Biblioteca:** xgameruntime.lib

**Plataformas compatibles:** Windows, Steam Deck, consolas de la familia XBOX One y consolas XBOX Series

## Consulte también

[XUser](/reference/system/xuser/xuser_members)

[XUserResolveIssueWithUiUtf16Async](/reference/system/xuser/functions/xuserresolveissuewithuiutf16async)

[XUserResolveIssueWithUiAsync](/reference/system/xuser/functions/xuserresolveissuewithuiasync)


## Related topics

- [XUserResolveIssueWithUiResult](/es/reference/system/xuser/functions/xuserresolveissuewithuiresult.md)
- [XUserResolveIssueWithUiUtf16Async](/es/reference/system/xuser/functions/xuserresolveissuewithuiutf16async.md)
- [XUser](/es/reference/system/xuser/xuser_members.md)
- [Contenedores de API de C# de Unity para el GDK](/es/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XUserResolveIssueWithUiAsync](/es/reference/system/xuser/functions/xuserresolveissuewithuiasync.md)
