Compartilhar via


XGameUiShowWebAuthenticationResult

Gets the results from a XGameUiShowWebAuthenticationAsync call.

Syntax

HRESULT XGameUiShowWebAuthenticationResult(  
         XAsyncBlock* async,  
         size_t bufferSize,  
         void* buffer,  
         XGameUiWebAuthenticationResultData** ptrToBuffer,  
         size_t* bufferUsed  
)  

Parameters

async   _Inout_
Type: XAsyncBlock*

A pointer to the XAsyncBlock that was passed to XGameUiShowWebAuthenticationAsync.

bufferSize   _In_
Type: size_t

The size, in bytes, of the buffer to receive the result data from the completed authentication request.

buffer   _Out_writes_bytes_to_(bufferSize,bufferUsed)
Type: void

A pointer to the buffer to receive the result data from the completed authentication request. This buffer holds the result data structure, as well as the variable size response data.

ptrToBuffer   _Outptr_
Type: XGameUiWebAuthenticationResultData**

A reference pointer to the result data structure. The result data structure is stored in the passed in buffer.

bufferUsed   _Out_opt_
Type: size_t*

The count of how many bytes of the buffer were used to store the result data and the variable response data.

Return value

Type: HRESULT

HRESULT success or error code.

Remarks

Call this method inside the AsyncBlock callback or after the AsyncBlock is complete.

Before you call this method, you should call XGameUiShowWebAuthenticationResultSize so that you can allocate a buffer of memory of sufficient size to contain the results of the web authentication response.

After calling this method, the buffer contains both the XGameUiWebAuthenticationResultData structure, as well as the variable response data (which can be accessed via the responseCompletionUri field of the result data structure).

When you are done processing the results of the result data, you should release the buffer memory allocation.

For an example of how to use this method, see the code example in XGameUiShowWebAuthenticationAsync.

Requirements

Header: XGameUI.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XGameUI
XGameUiShowWebAuthenticationAsync
XGameUiShowWebAuthenticationResultSize
XGameUiWebAuthenticationResultData
Asynchronous Programming Model