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

Displays a system dialog to pop up to allow the user to provide a review for the current game or decline to do so.

## Syntax

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

### Parameters

*storeContextHandle*   \_In\_\
Type: XStoreContextHandle

The store context handle for the user returned by [XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext).

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

An [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) defining the asynchronous work being done. The [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) can be used to poll for the call's status and retrieve call results. See [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) for more information.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

To retrieve the execution result of this function call [XStoreShowRateAndReviewUIResult](/reference/system/xstore/functions/xstoreshowrateandreviewuiresult) after calling this function.

If the system detects a game is calling this excessively, it will hide the dialog and automatically return **CanceledByUser**.

The following code snippet shows an example of displaying a review dialog.

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

```

## Requirements

**Header:** XStore.h (included in XGameRuntime.h)

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

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


## Related topics

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