> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ACP_MESSAGE_ERROR

> ACP_MESSAGE_ERROR

Error message from the ACP.

## Syntax

```cpp theme={null}
typedef struct ACP_MESSAGE_ERROR {  
    HRESULT errorCode; 
    UINT32 additionalData;  
} ACP_MESSAGE_ERROR  
```

### Members

*errorCode*\
Type: HRESULT

Error code.

*additionalData*\
Type: UINT32

Additional data relevant to the error.

## Remarks

Values returned in *errorCode* have the following meanings.

| *errorCode* | Description |
| - | - |
| ACP\_E\_ALREADY\_ALLOCATED | The data is already allocated. |
| ACP\_E\_ALREADY\_CONNECTED | The instance is already connected to the ACP. |
| ACP\_E\_ALREADY\_REGISTERED | Already registered. |
| ACP\_E\_INVALID\_COMMAND | The command is not valid; *additionalData* contains the `commandId`. |
| ACP\_E\_INVALID\_COMMAND\_TYPE | The command type is not valid. (See the [ACP\_COMMAND\_TYPE](https://docs.xbox.com/reference/audio/acphal/enums/acp_command_type.md) enumeration.) |
| ACP\_E\_INVALID\_CONTEXT\_DATA | The context data is not valid. |
| ACP\_E\_INVALID\_FLOWGRAPH | The specified flowgraph is not valid. Examine the flowgraph entry headers; invalid entries have the error bit set. |
| ACP\_E\_INVALID\_MESSAGE\_TYPE | The message type is not valid. |
| ACP\_E\_INVALID\_XMA\_CONTEXT | The index of the XMA context is not valid. |
| ACP\_E\_MESSAGE\_ALREADY\_REGISTERED | The message type cannot be registered because it is already registered. |
| ACP\_E\_MESSAGE\_NOT\_REGISTERED | The message type cannot be unregistered because it is not registered. |
| ACP\_E\_NOT\_ALLOCATED | The data was not allocated. |
| ACP\_E\_NOT\_CONNECTED | The instance is not connected to the ACP. |
| ACP\_E\_NOT\_REGISTERED | Not registered. |
| ACP\_E\_QUEUE\_FULL | The command queue is full. |
| ACP\_E\_STILL\_CONNECTED | The attempted operation cannot be made while connected to the ACP. |
| ACP\_E\_XMA\_PARSER\_ERROR | The XMA context generated a parser error; *additionalData* contains the index of the XMA context. |
| ACP\_E\_CORE\_UNHANDLED\_EXCEPTION | The core has encountered an unhandled exception and has now crashed/hung. |

This structure is used by the `ACP_MESSAGE_TYPE_ERROR` message. This structure is also used by the [ACP\_MESSAGE\_TYPE](https://docs.xbox.com/reference/audio/acphal/enums/acp_message_type.md) structure.

In the event of receiving an `ACP_E_CORE_UNHANDLED_EXCEPTION` code, it is advised for **all** existing ACP client objects to be destroyed and for allocated SHAPE contexts to be freed using [AcpHalReleaseShapeContexts](https://docs.xbox.com/reference/audio/acphal/functions/acphalreleaseshapecontexts.md). New SHAPE contexts and ACP client objects should be allocated/created again as needed using [AcpHalAllocateShapeContexts](https://docs.xbox.com/reference/audio/acphal/functions/acphalallocateshapecontexts.md) and [AcpHalCreate](https://docs.xbox.com/reference/audio/acphal/functions/acphalcreate.md) respectively.

## Requirements

**Header:** acphal.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[ACP\_MESSAGE\_TYPE](https://docs.xbox.com/reference/audio/acphal/enums/acp_message_type.md)\
[AcpHal](https://docs.xbox.com/reference/audio/acphal/acphal_members.md)


## Related topics

- [ACP_MESSAGE](https://docs.xbox.com/reference/audio/acphal/structs/acp_message.md)
- [AcpHal](https://docs.xbox.com/reference/audio/acphal/acphal_members.md)
- [ACP_MESSAGE_TYPE](https://docs.xbox.com/reference/audio/acphal/enums/acp_message_type.md)
- [ACP_COMMAND_MESSAGE](https://docs.xbox.com/reference/audio/acphal/structs/acp_command_message.md)
- [ACP_MESSAGE_COMMAND_COMPLETED](https://docs.xbox.com/reference/audio/acphal/structs/acp_message_command_completed.md)
