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

# ACP_MESSAGE_ERROR

> 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](/reference/audio/acphal/enums/acp_command_type) 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](/reference/audio/acphal/enums/acp_message_type) 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](/reference/audio/acphal/functions/acphalreleaseshapecontexts). New SHAPE contexts and ACP client objects should be allocated/created again as needed using [AcpHalAllocateShapeContexts](/reference/audio/acphal/functions/acphalallocateshapecontexts) and [AcpHalCreate](/reference/audio/acphal/functions/acphalcreate) respectively.

## Requirements

**Header:** acphal.h

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

## See also

[ACP\_MESSAGE\_TYPE](/reference/audio/acphal/enums/acp_message_type)\
[AcpHal](/reference/audio/acphal/acphal_members)


## Related topics

- [ACP_MESSAGE](/reference/audio/acphal/structs/acp_message.md)
- [AcpHal](/reference/audio/acphal/acphal_members.md)
- [ACP_MESSAGE_TYPE](/reference/audio/acphal/enums/acp_message_type.md)
- [ACP_COMMAND_MESSAGE](/reference/audio/acphal/structs/acp_command_message.md)
- [ACP_MESSAGE_FLOWGRAPH_COMPLETED](/reference/audio/acphal/structs/acp_message_flowgraph_completed.md)
