ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Bluetooth
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
BTEnableService (Function)
In french: BTActiveService
Enables a service provided by a Bluetooth device.
Example
nNuméroPériph is int
sService is string
// Les périphériques sont stockés dans un champ Table
nNuméroPériph = TABLE_Périph.COL_ID[TABLE_Périph]
// Les services sont listés dans un champ Liste
sService = LISTE_Services[LISTE_Services]
// Activation du service sélectionné dans le champ Liste
IF BTEnableService(nNuméroPériph, sService) = True THEN
	// Remplissage du champ Liste avec les services actifs
	ListAdd(LISTE_ServicesActifs, sService)
ELSE
	 Trace("Périph : " + nNuméroPériph + ", service : " + sService)
	 Info(ErrorInfo(errFullDetails))
END
Syntax
<Result> = BTEnableService(<Device identifier> , <Service name> [, <Radio identifier>])
<Result>: Boolean
  • True if the service was enabled,
  • False otherwise. ErrorInfo returns more information on the error.
<Device identifier>: Integer
Identifier of the Bluetooth device to use. This identifier is returned by BTListDevice.
<Service name>: Character string
Name of the service to enable. The name of the services is returned by BTListService.
<Radio identifier>: Optional integer
Identifier of Bluetooth radio to use. This identifier is returned by BTListRadio. If this parameter is not specified, all the available radios will be used.
Remarks
Only the Microsoft and Bluesoleil bluetooth stacks are supported by this version. To know the stack used, call BTStack.
For more details, see Which stacks to use?
Component: wd300com.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help