TwclBluetoothManager.Close Method

Closes the Bluetooth Manager and releases all allocated resources.

Namespace: wclBluetooth
public
 function Close: Integer;

Return Value

Type: Integer

If the function succeed the return value is wclErrors.WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.

After calling this method an application should not use any of the Bluetooth Framework features. All instances of the TwclBluetoothRadio class are not valid after calling this method.

An application must call this method from its main thread only.

The call to this method may take some time because it requires to release all allocated resources and terminate all the running threads. The common case when the delay may appear is when your application started discovering for remote devices and right after that the Close was called. In this case Bluetooth Manager has to wait for discovering thread completion.