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

# XApuGetResultCount

> XApuGetResultCount

# XApuGetResultCount

Returns the number of [XApuResult](/reference/audio/xapu/structs/xapuresult) in the results queue.

## Syntax

```cpp theme={null}
uint32_t XApuGetResultCount(  
         XApuHandle handle,  
         uint32_t* totalResultCount  
)  
```

### Parameters

*handle*   \_In\_\
Type: XApuHandle

Handle returned by calling [XApuConnect](/reference/audio/xapu/functions/xapuconnect).

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

Number of [XApuResult](/reference/audio/xapu/structs/xapuresult) structures in the output/results queue of the XAPU.

### Return value

Type: uint32\_t

If there is no command submitted or there is no [XApuResult](/reference/audio/xapu/structs/xapuresult) ready, the output will be zero, otherwise the return value will be greater than zero. If the return value is greater than zero, the caller must call [XApuDequeueResult](/reference/audio/xapu/functions/xapudequeueresult) for each [XApuResult](/reference/audio/xapu/structs/xapuresult) contained in the results queue.

## Remarks

This method will take a pointer to uint32\_t to return the *totalResultCount* for the current session.

This number represents the total results that have been processed since the session started and after [XApuConnect](/reference/audio/xapu/functions/xapuconnect) was called.

This number will be one when the first [XApuDequeueResult](/reference/audio/xapu/functions/xapudequeueresult) and it will keep increasing as more commands get processed and the results become available for consumption. This number will not go back to zero.

## Requirements

**Header:** xapu.h

**Library:** xapu.lib

**Supported platforms:** XBOX Series X|S

## See also

[XAPU](/reference/audio/xapu/xapu_members)


## Related topics

- [XApuDequeueResult](/reference/audio/xapu/functions/xapudequeueresult.md)
- [XApuConnect](/reference/audio/xapu/functions/xapuconnect.md)
- [XAPU](/reference/audio/xapu/xapu_members.md)
- [XApuConnectOutputParameters](/reference/audio/xapu/structs/xapuconnectoutputparameters.md)
- [XblSocialRelationshipResultGetTotalCount](/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultgettotalcount.md)
