# ppxCloseConnection

Closes a connection.

#### Prototype

DWORD ppxCloseConnection ( PPXHD ppxhd )

Argument | Description
ppxhd | Connection handle returned by ppxCreateConnection or by ppxOpenConnection.

#### Return values

Return value | Description
SUCCESS |
CTAERR_INVALID_HANDLE | ppxhd is not a valid connection handle.
CTAERR_OUT_OF_MEMORY | Unable to allocate memory.
CTAERR_SVR_COMM | Natural Access server communication error.
PPXERR_COMM_FAILURE | Problems were encountered when communicating with the PPX server.

#### Details

ppxCloseConnection closes a previously created connection. If the connection is unnamed, the resources associated with the connection are freed and all listeners on the connection are returned to their default disabled states. The talker, if any, is disconnected. All telephony bus timeslots used by the connection are also freed.

If the connection is named, ppxCloseConnection releases only the connection handle.

Refer to Closing a connection for more information.

#### See also

ppxDestroyNamedConnection