> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGameUiShowTextEntryResult

> XGameUiShowTextEntryResult

Gets the results from a [XGameUiShowTextEntryAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryasync.md) call.

## Syntax

```cpp theme={null}
HRESULT XGameUiShowTextEntryResult(  
         XAsyncBlock* async,  
         uint32_t resultTextBufferSize,  
         char* resultTextBuffer,  
         uint32_t* resultTextBufferUsed  
)  
```

### Parameters

*async*   \_In\_\
Type: [XAsyncBlock\*](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md)

A pointer to the [XAsyncBlock](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md) that was passed to [XGameUiShowTextEntryAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryasync.md).

*resultTextBufferSize*   \_In\_\
Type: uint32\_t

The size of the results text buffer, which is used to determine the buffer size that contains the result. You can get this info by calling [XGameUiShowTextEntryResultSize](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryresultsize.md). Alternatively, if you have a pre-allocated result buffer, you can pass in the size of that result buffer.

*resultTextBuffer*   \_Out\_writes\_to\_(resultTextBufferSize,*resultTextBufferUsed)\
Type: char*

A pointer to the text buffer that contains the result of the player's text input.

*resultTextBufferUsed*   \_Out\_opt\_\
Type: uint32\_t\*

The actual size of the buffer that contained the player's text input.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

Typically this function is to be called in [XGameUiShowTextEntryAsync's](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryasync.md) **XAsyncBlock**. This function allows you to retrieve the text input from a text entry field that was originally called for by [XGameUiShowTextEntryAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryasync.md). To retrieve the size of the text entry result you will need to call [XGameUiShowTextEntryResultSize](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryresultsize.md).\
You may also call this function anytime after the async function completes in order to retrieve the function result.

## Requirements

**Header:** XGameUI.h

**Library:** xgameruntime.lib

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

## See also

[XGameUI](https://docs.xbox.com/reference/system/xgameui/xgameui_members.md)\
[XGameUiShowTextEntryAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryasync.md)\
[XGameUiShowTextEntryResultSize](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryresultsize.md)


## Related topics

- [XGameUiShowTextEntryResultSize](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryresultsize.md)
- [XGameUiShowTextEntryAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryasync.md)
- [XGameUiSetTextEntryUiResponse](https://docs.xbox.com/reference/system/xgameui/functions/xgameuisettextentryuiresponse.md)
- [XGameUI (API contents)](https://docs.xbox.com/reference/system/xgameui/xgameui_members.md)
- [XGameUiShowTextEntryUiCallback](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowtextentryuicallback.md)
