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

# XStoreShowRateAndReviewUIAsync

> XStoreShowRateAndReviewUIAsync

# XStoreShowRateAndReviewUIAsync

Muestra un cuadro de diálogo emergente del sistema para permitir que el usuario proporcione una reseña del juego actual o decline hacerlo.

## Sintaxis

```cpp theme={null}
HRESULT XStoreShowRateAndReviewUIAsync(  
         const XStoreContextHandle storeContextHandle,  
         XAsyncBlock* async  
)  
```

### Parámetros

*storeContextHandle*   \_In\_\
Tipo: XStoreContextHandle

El identificador de contexto de la tienda para el usuario, devuelto por [XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext).

*async*   \_Inout\_\
Tipo: [XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

Un [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) que define el trabajo asincrónico que se está realizando. El [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) se puede usar para sondear el estado de la llamada y recuperar los resultados de la llamada. Consulte [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) para obtener más información.

### Valor devuelto

Tipo: HRESULT

Código HRESULT de éxito o de error.

## Comentarios

Para recuperar el resultado de ejecución de esta función, llame a [XStoreShowRateAndReviewUIResult](/reference/system/xstore/functions/xstoreshowrateandreviewuiresult) después de llamar a esta función.

Si el sistema detecta que un juego llama a esta función en exceso, ocultará el cuadro de diálogo y devolverá automáticamente **CanceledByUser**.

El siguiente fragmento de código muestra un ejemplo de presentación de un cuadro de diálogo de reseña.

```cpp theme={null}
void CALLBACK ShowRateAndReviewUICallback(XAsyncBlock* asyncBlock)
{
    XStoreRateAndReviewResult result{};
    HRESULT hr = XStoreShowRateAndReviewUIResult(
        asyncBlock,
        &result);

    if (FAILED(hr))
    {
        printf("Failed to rate and review: 0x%x\r\n", hr);
        return;
    }

    printf("result.wasUpdated: %s\r\n", result.wasUpdated ? "true" : "false");
}

void ShowRateAndReviewUI(XStoreContextHandle storeContextHandle, XTaskQueueHandle taskQueueHandle)
{
    auto asyncBlock = std::make_unique<XAsyncBlock>();
    ZeroMemory(asyncBlock.get(), sizeof(*asyncBlock));
    asyncBlock->queue = taskQueueHandle;
    asyncBlock->callback = ShowRateAndReviewUICallback;

    HRESULT hr = XStoreShowRateAndReviewUIAsync(
        storeContextHandle,
        asyncBlock.get());

    if (FAILED(hr))
    {
        printf("Failed rate and review: 0x%x\r\n", hr);
        return;
    }
}

```

## Requisitos

**Encabezado:** XStore.h (incluido en XGameRuntime.h)

**Biblioteca:** xgameruntime.lib

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

## Consulte también

[XStore](/reference/system/xstore/xstore_members)\
[XStoreShowRateAndReviewUIResult](/reference/system/xstore/functions/xstoreshowrateandreviewuiresult)


## Related topics

- [XStoreShowRateAndReviewUIResult](/es/reference/system/xstore/functions/xstoreshowrateandreviewuiresult.md)
- [XStoreRateAndReviewResult](/es/reference/system/xstore/structs/xstorerateandreviewresult.md)
- [XStore](/es/reference/system/xstore/xstore_members.md)
- [Contenedores de API de C# de Unity para el GDK](/es/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreShowGiftingUIAsync](/es/reference/system/xstore/functions/xstoreshowgiftinguiasync.md)
