BluetoothGetDeviceInfo function (bluetoothapis.h)
The BluetoothGetDeviceInfo function retrieves information about a remote Bluetooth device. The Bluetooth device must have been previously identified through a successful device inquiry function call.
Syntax
DWORD BluetoothGetDeviceInfo(
HANDLE hRadio,
BLUETOOTH_DEVICE_INFO *pbtdi
);
Parameters
hRadio
A handle to a local radio, obtained from a call to the BluetoothFindFirstRadio or similar functions, or from a call to the SetupDiEnumDeviceInterfaces function.
pbtdi
A pointer to a BLUETOOTH_DEVICE_INFO structure into which data about the first Bluetooth device will be placed. For more information, see Remarks.
Return value
Returns ERROR_SUCCESS upon success, indicating that data about the remote Bluetooth device was retrieved. Returns error codes upon failure. The following table lists common error codes associated with the BluetoothGetDeviceInfo function.
Return code | Description |
---|---|
|
The size of the BLUETOOTH_DEVICE_INFO is not compatible. Check the dwSize member of the BLUETOOTH_DEVICE_INFO structure. |
|
The radio is not known by the system, or the Address member of the BLUETOOTH_DEVICE_INFO structure is all zeros. |
|
The pbtdi parameter is NULL. |
Remarks
The Bluetooth device for which data is obtained must have been previously identified through a successful device inquiry function call.
In the BLUETOOTH_DEVICE_INFO structure pointed to by pbtdi, the dwSize member must be equivalent to the size, in bytes, of the structure. The Address member of the BLUETOOTH_DEVICE_INFO structure must contain the Bluetooth address of the remote device.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista, Windows XP with SP2 [desktop apps only] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | bluetoothapis.h (include Bthsdpdef.h, BluetoothAPIs.h) |
Library | Bthprops.lib |
DLL | bthprops.cpl |
See also
BLUETOOTH_DEVICE_SEARCH_PARAMS