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

返回结果队列中 [XApuResult](/reference/audio/xapu/structs/xapuresult) 的数量。

## Syntax

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

### Parameters

*handle*   \_In\_\
Type: XApuHandle

通过调用 [XApuConnect](/reference/audio/xapu/functions/xapuconnect) 返回的句柄。

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

XAPU 输出/结果队列中 [XApuResult](/reference/audio/xapu/structs/xapuresult) 结构的数量。

### Return value

Type: uint32\_t

如果没有提交任何命令或者没有 [XApuResult](/reference/audio/xapu/structs/xapuresult) 就绪,则输出为零;否则,返回值将大于零。如果返回值大于零,调用方必须为结果队列中包含的每个 [XApuResult](/reference/audio/xapu/structs/xapuresult) 调用 [XApuDequeueResult](/reference/audio/xapu/functions/xapudequeueresult)。

## Remarks

此方法接受一个指向 uint32\_t 的指针以返回当前会话的 *totalResultCount*。

该数字表示自会话开始以来以及在调用 [XApuConnect](/reference/audio/xapu/functions/xapuconnect) 之后已处理的结果总数。

当第一次 [XApuDequeueResult](/reference/audio/xapu/functions/xapudequeueresult) 时,该数字为 1;随着更多命令被处理并且结果可供使用,该数字将持续增加。该数字不会归零。

## Requirements

**头文件:** xapu.h

**库:** xapu.lib

**支持的平台:** XBOX Series X|S

## See also

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


## Related topics

- [XApuDequeueResult](/zh-CN/reference/audio/xapu/functions/xapudequeueresult.md)
- [XApuConnect](/zh-CN/reference/audio/xapu/functions/xapuconnect.md)
- [XAPU](/zh-CN/reference/audio/xapu/xapu_members.md)
- [XApuConnectOutputParameters](/zh-CN/reference/audio/xapu/structs/xapuconnectoutputparameters.md)
- [XblMultiplayerGetSearchHandlesResultCount](/zh-CN/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayergetsearchhandlesresultcount.md)
