Share via


BthTerminateIdleConnections (Windows CE 5.0)

Send Feedback

This function disconnects all idle connections held by the L2CAP layer.

int BthTerminateIdleConnections(void);

Parameters

None.

Return Values

This function returns ERROR_SUCCESS when it completes successfully.

A return value of ERROR_SERVICE_NOT_ACTIVE indicates that the hardware is not inserted or that the Bluetooth stack is not present.

Other standard error codes may be returned as appropriate.

Remarks

When this function is successful and connections have been disconnected, L2CAP does not immediately disconnect ACL connections to peers. Instead, it keeps idle connections for a registry-configured timeout. This avoids reconnection overhead in many important cases, such as an SDP query followed by a connection to the resource.

This function forces all currently idle connections to be disconnected immediately. Typically, you do not need to call this function. The stack uses it internally to drop existing connections on controllers that do not support piconets.

It could be useful, however, in a very limited number of cases where the peer device does not support piconets but needs to connect to another device. For example, PDA establishes connection to a Bluetooth-enabled phone and causes it to dial the number. It then wants to disconnect immediately so the phone that does not support piconets could establish Bluetooth connection with the headset.

Requirements

OS Versions: Windows CE.NET 4.2 and later.
Header: Bt_api.h.
Link Library: Btdrt.lib.

See Also

Bluetooth OS Functions | Bluetooth Application Development | BthGetBasebandHandles

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.