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

# IAcpHal::Disconnect

> 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](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_popmessage) is the only method that can be called after this method. If a message queue was created during the [Connect](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_connect) 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](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_connect)\
[AcpHal](/reference/audio/acphal/acphal_members)
