Click or drag to resize

wclBluetoothRadioSetDiscoverable Method

Changes the discoverable state of the local Bluetooth Radio.

Namespace: wclBluetooth
Assembly: wclBluetoothFramework (in wclBluetoothFramework.dll) Version: 7.17.12.0 (7.17.12.0)
Syntax
public int SetDiscoverable(
	bool Discoverable
)

Parameters

Discoverable  Boolean
The new discoverable state for the Radio.

Return Value

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

Setting the Discoverable parameter to True allows remote Bluetooth enabled devices to discover this Radio.

Setting the Discoverable parameter to False blocks the Radio from discovering by remote Bluetooth enabled devices.

Microsoft: Use the GetDiscoverable method to determine the current state of a Bluetooth radio. Windows ensures that a discoverable system is connectable, and as such, the radio must allow incoming connections prior to making a radio discoverable. Failure to allow incoming connections results in the SetDiscoverable method call failing.

When SetDiscoverable changes the discovery state, the new state is valid for the lifetime of the calling application. Additionally, if a Bluetooth radio previously made discoverable with this function is disabled and re-enabled via the application, discoverability will not persist. Once the calling application terminates, the discovery state of the specified Bluetooth radio reverts to the state it was in before SetDiscoverable was called.

See Also