TwclBluetoothRadio.Discover(Byte,TwclBluetoothDiscoverKind,Boolean) Method

Starts discovering for a remote Bluetooth enabled devices.

Namespace: wclBluetooth
public
 function Discover(const Timeout: Byte;
 const Kind: TwclBluetoothDiscoverKind;
 const IncludePaired: Boolean = False): Integer;

Parameters

Timeout
Type: Byte

Specifies the maximum amount of time before the inquiry is halted (in seconds).

Kind
Type: TwclBluetoothDiscoverKind

Specifies the discovered Bluetooth device types.

IncludePaired
Type: Boolean

Set this parameter to True if you need to get paired devices reported as just found even such devices are not available. If this parameter is False only available devices will be returned.

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.

If the discovering started the OnDiscoveringStarted event of the TwclBluetoothManager component fires.

When the discovering for the remote Bluetooth enabled devices completed (with or without success) the OnDiscoveringCompleted event of the TwclBluetoothManager component fires.