Compartir a través de


XGameUiShowTextEntryResult

Gets the results from a XGameUiShowTextEntryAsync call.

Syntax

HRESULT XGameUiShowTextEntryResult(  
         XAsyncBlock* async,  
         uint32_t resultTextBufferSize,  
         char* resultTextBuffer,  
         uint32_t* resultTextBufferUsed  
)  

Parameters

async   _In_
Type: XAsyncBlock*

A pointer to the XAsyncBlock that was passed to XGameUiShowTextEntryAsync.

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. 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 XAsyncBlock. This function allows you to retrieve the text input from a text entry field that was originally called for by XGameUiShowTextEntryAsync. To retrieve the size of the text entry result you will need to call XGameUiShowTextEntryResultSize.
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, Xbox One family consoles and Xbox Series consoles

See also

XGameUI
XGameUiShowTextEntryAsync
XGameUiShowTextEntryResultSize