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

# XUserGetTokenAndSignatureUtf16ResultSize

> XUserGetTokenAndSignatureUtf16ResultSize

# XUserGetTokenAndSignatureUtf16ResultSize

Gets the buffer size for holding the results of a call to [XUserGetTokenAndSignatureUtf16Async](/reference/system/xuser/functions/xusergettokenandsignatureutf16async).

## Syntax

```cpp theme={null}
HRESULT XUserGetTokenAndSignatureUtf16ResultSize(  
         XAsyncBlock* async,  
         size_t* bufferSize  
)  
```

### Parameters

*async*   \_Inout\_\
Type: XAsyncBlock\*

An [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) for polling the call's status and retrieving call results.

*bufferSize*   \_Out\_\
Type: size\_t\*

Contains the required buffer size.

### Return value

Type: HRESULT

Returns S\_OK if successful; otherwise, returns an error code.
For a list of error codes, see [Error Codes](/reference/errorcodes).

## Remarks

The XUserGetTokenAndSignatureUtf16Async function uses an [XUserGetTokenAndSignatureOptions](/reference/system/xuser/enums/xusergettokenandsignatureoptions) enumeration argument to asynchronously retrieve unicode xtokens and signatures for web requests.

To asynchronously retrieve Unicode xtokens and signatures for web requests, call
[XUserGetTokenAndSignatureUtf16Async](/reference/system/xuser/functions/xusergettokenandsignatureutf16async).

To retrieve the result of calling [XUserGetTokenAndSignatureUtf16Async](/reference/system/xuser/functions/xusergettokenandsignatureutf16async), call [XUserGetTokenAndSignatureUtf16Result](/reference/system/xuser/functions/xusergettokenandsignatureutf16result).

## Requirements

**Header:** XUser.h

**Library:** xgameruntime.lib

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

## See also

[XUser](/reference/system/xuser/xuser_members)

[XUserGetTokenAndSignatureUtf16Async](/reference/system/xuser/functions/xusergettokenandsignatureutf16async)

[XUserGetTokenAndSignatureUtf16Result](/reference/system/xuser/functions/xusergettokenandsignatureutf16result)


## Related topics

- [XUserGetTokenAndSignatureUtf16Result](/reference/system/xuser/functions/xusergettokenandsignatureutf16result.md)
- [XUserGetTokenAndSignatureUtf16Async](/reference/system/xuser/functions/xusergettokenandsignatureutf16async.md)
- [XUser](/reference/system/xuser/xuser_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XUserGetTokenAndSignatureUtf16Data](/reference/system/xuser/structs/xusergettokenandsignatureutf16data.md)
