IAcpHal::Disconnect Method

Disconnects from the ACP.

Syntax

public:
HRESULT Disconnect()  

Return value

Type: HRESULT 

If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.

Return codes
Return code Description
ACP_E_NOT_CONNECTED This instance is not connected to the ACP.

Remarks

The only method that can be called after this is PopMessage. If a message queue was created during the Connect call, and 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 will no longer reference any resources allocated by this instance.

Requirements

Header: Declared in acphal.h.

Library: Use acphal.lib.