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

Exibe uma caixa de diálogo do sistema para permitir que o usuário faça uma avaliação do jogo atual ou se recuse a fazê-la.

## Sintaxe

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

### Parâmetros

*storeContextHandle*   \_In\_\
Tipo: XStoreContextHandle

O identificador de contexto da loja para o usuário retornado por [XStoreCreateContext](/pt-BR/reference/system/xstore/functions/xstorecreatecontext).

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

Um [XAsyncBlock](/pt-BR/reference/system/xasync/structs/xasyncblock) que define o trabalho assíncrono que está sendo feito. O [XAsyncBlock](/pt-BR/reference/system/xasync/structs/xasyncblock) pode ser usado para sondar o status da chamada e recuperar os resultados da chamada. Consulte [XAsyncBlock](/pt-BR/reference/system/xasync/structs/xasyncblock) para obter mais informações.

### Valor retornado

Tipo: HRESULT

Código de êxito ou de erro HRESULT.

## Comentários

Para recuperar o resultado da execução desta função, chame [XStoreShowRateAndReviewUIResult](/pt-BR/reference/system/xstore/functions/xstoreshowrateandreviewuiresult) após chamar esta função.

Se o sistema detectar que um jogo está chamando esta função excessivamente, ele ocultará a caixa de diálogo e retornará automaticamente **CanceledByUser**.

O trecho de código a seguir mostra um exemplo de exibição de uma caixa de diálogo de avaliação.

```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

**Cabeçalho:** XStore.h (incluído em XGameRuntime.h)

**Biblioteca:** xgameruntime.lib

**Plataformas compatíveis:** Windows, consoles da família XBOX One e consoles XBOX Series

## Confira também

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


## Related topics

- [XStoreShowRateAndReviewUIAsync](/reference/system/xstore/functions/xstoreshowrateandreviewuiasync.md)
- [XStoreShowRateAndReviewUIResult](/reference/system/xstore/functions/xstoreshowrateandreviewuiresult.md)
- [XStoreRateAndReviewResult](/reference/system/xstore/structs/xstorerateandreviewresult.md)
- [XStore](/reference/system/xstore/xstore_members.md)
