In The Hand
SetServiceState Method (service, state)
NamespacesInTheHand.Net.SocketsBluetoothDeviceInfoSetServiceState(Guid, Boolean)
.NET Components for Mobility
Enables or disables services for a Bluetooth device.
Declaration Syntax
C#Visual Basic
public void SetServiceState(
	Guid service,
	bool state
)
Public Sub SetServiceState ( _
	service As Guid, _
	state As Boolean _
)
Parameters
service (Guid)
The service GUID on the remote device.
state (Boolean)
Service state - TRUE to enable the service, FALSE to disable it.
Remarks
When called on Windows CE, the device will require a soft-reset to enabled the settings.
Note:

The system maintains a mapping of service guids to supported drivers for Bluetooth-enabled devices. Enabling a service installs the corresponding device driver. Disabling a service removes the corresponding device driver. If a non-supported service is enabled, a driver will not be installed.

This overload is silent on error; the other overload raises an exception if required (SetServiceState(Guid, Boolean, Boolean)).

Exceptions
ExceptionCondition
PlatformNotSupportedException Thrown if this method is called on Windows CE platforms.

Assembly: InTheHand.Net.Personal (Module: InTheHand.Net.Personal) Version: 3.0.0.0