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

# IAcpHal::Disconnect

> IAcpHal::Disconnect

Disconnects from the ACP.

## Syntax

```cpp theme={null}
HRESULT Disconnect(  
)  
```

### Parameters

### Return value

Type: HRESULT

If the method succeeds, it returns `S_OK`. If the method fails, it returns one of the following codes (partial list):

| Return code | Description |
| - | - |
| ACP\_E\_NOT\_CONNECTED | This instance is not connected to the ACP. |

## Remarks

[PopMessage](https://docs.xbox.com/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_popmessage.md) is the only method that can be called after this method. If a message queue was created during the [Connect](https://docs.xbox.com/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_connect.md) call, and if the message type **ACP\_MESSAGE\_TYPE\_DISCONNECTED** was registered for, it will be the last message sent by the ACP. When the disconnected message is received, the ACP no longer references any resources allocated by this instance.

## Requirements

**Header:** acphal.h

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

## See also

[Connect](https://docs.xbox.com/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_connect.md)\
[AcpHal](https://docs.xbox.com/reference/audio/acphal/acphal_members.md)


## Related topics

- [IAcpHal](https://docs.xbox.com/reference/audio/acphal/interfaces/IAcpHal/iacphal.md)
- [IAcpHal::Connect](https://docs.xbox.com/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_connect.md)
- [IAcpHal::PopMessage](https://docs.xbox.com/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_popmessage.md)
- [IAcpHal::SubmitCommand](https://docs.xbox.com/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_submitcommand.md)
- [IAcpHal::GetNumMessages](https://docs.xbox.com/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_getnummessages.md)
