Click to Rate and Give Feedback
MSDN
MSDN Library
Networking
Wireless Networking
Bluetooth
Bluetooth Reference
 BLUETOOTH_DEVICE_INFO Structure
BLUETOOTH_DEVICE_INFO Structure

The BLUETOOTH_DEVICE_INFO structure provides information about a Bluetooth device.

Syntax

C++
typedef struct _BLUETOOTH_DEVICE_INFO {
  DWORD             dwSize;
  BLUETOOTH_ADDRESS Address;
  ULONG             ulClassofDevice;
  BOOL              fConnected;
  BOOL              fRemembered;
  BOOL              fAuthenticated;
  SYSTEMTIME        stLastSeen;
  SYSTEMTIME        stLastUsed;
  WCHAR             szName[BLUETOOTH_MAX_NAME_SIZE];
}BLUETOOTH_DEVICE_INFO;

Members

dwSize

Size of the BLUETOOTH_DEVICE_INFO structure, in bytes.

Address

Address of the device.

ulClassofDevice

Class of the device.

fConnected

Specifies whether the device is connected.

fRemembered

Specifies whether the device is a remembered device. Not all remembered devices are authenticated.

fAuthenticated

Specifies whether the device is authenticated, paired, or bonded. All authenticated devices are remembered.

stLastSeen

Last time the device was seen, in the form of a SYSTEMTIME structure.

stLastUsed

Last time the device was used, in the form of a SYSTEMTIME structure.

szName

Name of the device.

Remarks

See the Bluetooth specification at www.bluetooth.com for class of device (COD) information.

Requirements

Minimum supported clientWindows Vista, Windows XP with SP2
Minimum supported serverNone supported
HeaderBluetoothAPIs.h (include Bthsdpdef.h or BluetoothAPIs.h)

See Also

SYSTEMTIME

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
stLastSeen is broken, it reports 'now' instead of when the device was last seen.      Alan J. McFarlane ... 老鼠舞棒槌   |   Edit   |   Show History
  • On XP SP2 and Vista gold the stLastSeen field sadly does not report the last time a device was seen, it always contains the time when the discovery process was run (?when it completed). For instance run a discovery as 12:00:00 UTC and the value in that field will be 12:00:10 UTC for every device, even those 'remembered' and not in range. Note that the Bluetooth Control panel Device Property dialog shows the same bad time value too, e.g. as "Last connected: 15 May 2007 at 13:00:10".
Tags What's this?: Add a tag
Flag as ContentBug
a problem with BluetoothGetDeviceInfo      zhanghwem   |   Edit   |   Show History
The fConnected field always be 0 (call BluetoothGetDeviceInfo), whenever the device is connected or not.
Tags What's this?: Add a tag
Flag as ContentBug
Delphi      Carl Kenner   |   Edit   |   Show History
This structure can be found in the Jedi API, which you need to download, or you can use the following declaration:

Uses Windows;

const
BLUETOOTH_MAX_NAME_SIZE = 248;
type
BTH_ADDR = Int64;
_BLUETOOTH_ADDRESS = record
case Integer of
0: (ullLong: BTH_ADDR); // easier to compare again BLUETOOTH_NULL_ADDRESS
1: (rgBytes: array [0..5] of Byte); // easier to format when broken out
end;
BLUETOOTH_ADDRESS = _BLUETOOTH_ADDRESS;
TBlueToothAddress = BLUETOOTH_ADDRESS;
PBlueToothAddress = ^BLUETOOTH_ADDRESS;

_BLUETOOTH_DEVICE_INFO = record
dwSize: DWORD; // size, in bytes, of this structure - must be the sizeof(BLUETOOTH_DEVICE_INFO)
Address: BLUETOOTH_ADDRESS; // Bluetooth address
ulClassofDevice: ULONG; // Bluetooth "Class of Device"
fConnected: BOOL; // Device connected/in use
fRemembered: BOOL; // Device remembered
fAuthenticated: BOOL; // Device authenticated/paired/bonded
stLastSeen: SYSTEMTIME; // Last time the device was seen
stLastUsed: SYSTEMTIME; // Last time the device was used for other than RNR, inquiry, or SDP
szName: array [0..BLUETOOTH_MAX_NAME_SIZE - 1] of WideChar; // Name of the device
end;
BLUETOOTH_DEVICE_INFO = _BLUETOOTH_DEVICE_INFO;
PBLUETOOTH_DEVICE_INFO = ^_BLUETOOTH_DEVICE_INFO;
TBlueToothDeviceInfo = BLUETOOTH_DEVICE_INFO;
PBlueToothDeviceInfo = PBLUETOOTH_DEVICE_INFO;

Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker