Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The BluetoothSetLocalServiceInfo function sets local service information for a specific Bluetooth radio.
Syntax
DWORD BluetoothSetLocalServiceInfo(
[in, optional] HANDLE hRadioIn,
[in] const GUID *pClassGuid,
[in] ULONG ulInstance,
[in] const BLUETOOTH_LOCAL_SERVICE_INFO *pServiceInfoIn
);
Parameters
[in, optional] hRadioIn
A handle of the Bluetooth radio device to specify local service information for. If NULL, BluetoothSetLocalServiceInfo searches for the first available local Bluetooth radio.
[in] pClassGuid
The GUID of the service to expose. This should match the GUID in the server-side INF file.
[in] ulInstance
An instance ID for the device node of the Plug and Play (PnP) ID.
[in] pServiceInfoIn
A pointer to a BLUETOOTH_LOCAL_SERVICE_INFO structure that describes the local service to set.
Return value
The BluetoothSetLocalServiceInfo function returns the following values:
Return code | Description |
---|---|
|
The specified Bluetooth radio was not detected. |
|
No Bluetooth radios were detected. |
|
Sufficient resources were not available to complete the operation. You can receive this error when more than 100 local physical device objects (PDOs) correspond to Bluetooth services. |
|
The caller does not have the required privileges. See the Remarks section for information about how to elevate privileges. |
Remarks
BluetoothSetLocalServiceInfo is a user-mode API that is used only by profile driver developers to trigger the installation of a local service that is described by the service GUID in pClassGuid.
BluetoothSetLocalServiceInfo generates a Plug and Play (PnP) device ID in the form of "BTHENUM{ClassGuid}". For example, "BTHENUM{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}". User-mode applications can call BluetoothSetLocalServiceInfo subsequent times with the same service GUID but with a different instance ID to create multiple instances of the specified server-side profile.
To use Bluetooth APIs like BluetoothSetLocalServiceInfo, user-mode applications should link with BthProps.lib.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Versions:_Supported in Windows Vista, and later. |
Target Platform | Universal |
Header | bluetoothapis.h |
Library | BthProps.lib |
DLL | bthprops.cpl; BluetoothAPIs.dll |