Szerkesztés

Megosztás a következőn keresztül:


Bluetooth IOCTLs

The Bluetooth driver stack provides profile drivers with several IOCTLs to gather information about:

  • The local Bluetooth radio and system.

  • Remote Bluetooth devices.

  • The device that caused the Plug and Play (PnP) Manager to load a profile driver.

To gather information about the local Bluetooth radio and system, a profile driver uses IOCTL_BTH_GET_LOCAL_INFO. After the IOCTL returns, its AssociatedIrp.SystemBuffer member contains a pointer to a BTH_LOCAL_RADIO_INFO structure that contains information about the local Bluetooth radio and system, including flags that indicate whether the local radio can be discovered and connected to. The returned BTH_LOCAL_RADIO_INFO structure contains a BTH_DEVICE_INFO structure, which contains system-specific information, and a BTH_RADIO_INFO structure, which contains local radio-specific information.

To gather information about a specific remote Bluetooth device, a profile driver uses IOCTL_BTH_GET_RADIO_INFO. After the IOCTL returns, its AssociatedIrp.SystemBuffer member contains a pointer to a BTH_RADIO_INFO structure that provides information about the specific remote radio, including whether the remote radio can be discovered and connected to.

To gather information about all remote radios that have been discovered, a profile driver uses IOCTL_BTH_GET_DEVICE_INFO. After the IOCTL returns, its AssociatedIrp.SystemBuffer member contains a pointer to a BTH_DEVICE_INFO_LIST structure that contains an array of BTH_DEVICE_INFO structures. The BTH_DEVICE_INFO_LIST structure contains one array entry for each discovered remote radio. The user-mode BluetoothGetDeviceInfo API uses this functionality to return information about all remote radios.

To gather information about the remote device that caused the PnP Manager to load it, a profile driver uses IOCTL_INTERNAL_BTHENUM_GET_DEVINFO. After the IOCTL returns, its AssociatedIrp.SystemBuffer member contains a pointer to a BTH_DEVICE_INFO structure that contains information about the remote device, including its Bluetooth device address, device state, and its class-of-device (CoD) settings.

A profile driver uses IOCTL_INTERNAL_BTHENUM_GET_ENUMINFO to obtain information about the underlying device and service that caused the PnP manager to load the profile driver. After the IOCTL returns, its AssociatedIrp.SystemBuffer member contains a pointer to a BTH_ENUMERATOR_INFO structure that contains vendor-provided information about the device, including the port number, device flags, vendor ID, and product ID.

For more information about using Bluetooth IOCTLs and BRBs, see Building and Sending a BRB.