BluetoothSelectDevices function

The BluetoothSelectDevices function enables Bluetooth device selection.

Syntax


BOOL BluetoothSelectDevices(
   BLUETOOTH_SELECT_DEVICE_PARAMS *pbtsdp
);

Parameters

pbtsdp

A pointer to a BLUETOOTH_SELECT_DEVICE_PARAMS structure that identifies Bluetooth devices.

Return value

Returns TRUE if a user selected a device.

Returns FALSE if no valid data was returned. Call the GetLastError function to retrieve error information. The following conditions apply to returned error information.

Return codeDescription
ERROR_CANCELLED

The user canceled the request.

ERROR_INVALID_PARAMETER

The pbtsdp parameter is NULL.

ERROR_REVISION_MISMATCH

The structure passed in pbtsdp is of unknown size.

 

Remarks

The BluetoothSelectDevices function opens a common dialog box for selecting Bluetooth devices. The list of devices displayed to the user is determined by the flags and settings the caller specifies in the pbtsdp parameter.

If BluetoothSelectDevices returns TRUE, the pDevices member of the BLUETOOTH_SELECT_DEVICE_PARAMS structure points to valid data. The caller should verify that the fAuthenticated and fRemembered flags in the BLUETOOTH_SELECT_DEVICE_PARAMS structure to determine which devices were successfully authenticated, and which devices are valid selections for the user. Call the BluetoothSelectDevicesFree function to free resources only if the BluetoothSelectDevices function returns TRUE.

Requirements

Minimum supported client

Windows Vista, Windows XP with SP2 [desktop apps only]

Minimum supported server

None supported

Header

BluetoothAPIs.h (include Bthsdpdef.h or BluetoothAPIs.h)

Library

Bthprops.lib

DLL

Bthprops.dll

See also

PFN_DEVICE_CALLBACK
BLUETOOTH_SELECT_DEVICE_PARAMS

 

 

Community Additions

ADD
Show: