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

# XApuDequeueResult

> XApuDequeueResult

# XApuDequeueResult

Retrieves an [XApuResult](/reference/audio/xapu/structs/xapuresult) from the results queue, if available.

## Syntax

```cpp theme={null}
HRESULT XApuDequeueResult(  
         XApuHandle handle,  
         XApuResult* commandResult  
)  
```

### Parameters

*handle*   \_In\_\
Type: XApuHandle

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

*commandResult*   \_Out\_\
Type: [XApuResult\*](/reference/audio/xapu/structs/xapuresult)

Result returned from the XAPU.

### Return value

Type: HRESULT

Returns S\_OK if successful; otherwise, returns an error code.

## Remarks

Retrieves an [XApuResult](/reference/audio/xapu/structs/xapuresult) from the results queue if available, otherwise the call will [XAPU\_E\_PENDING\_RESULTS](/reference/audio/xapu/enums/xapuerrors). This call will return quickly as there is very little processing done under the hood. This call is thread safe, however there is no performance advantage to call it from more than one thread.

If the hardware server is in a bad state, [XApuEnqueueCommand](/reference/audio/xapu/functions/xapuenqueuecommand) will return [XAPU\_E\_DEVICE\_FATAL\_ERROR](/reference/audio/xapu/enums/xapuerrors) error code. In this case all XAPU clients should be disconnected and reconnected again.

If this method fails, a descriptive error code will be returned.

## Requirements

**Header:** xapu.h

**Library:** xapu.lib

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

## See also

[XAPU](/reference/audio/xapu/xapu_members)\
[XApuEnqueueCommand](/reference/audio/xapu/functions/xapuenqueuecommand)\
[XApuGetResultCount](/reference/audio/xapu/functions/xapugetresultcount)


## Related topics

- [XApuConnect](/reference/audio/xapu/functions/xapuconnect.md)
- [XApuCommandId](/reference/audio/xapu/structs/xapucommandid.md)
- [XApuCommandType](/reference/audio/xapu/enums/xapucommandtype.md)
- [XApuGetResultCount](/reference/audio/xapu/functions/xapugetresultcount.md)
- [XAPU](/reference/audio/xapu/xapu_members.md)
