BTH_HCI_IOCTL_GET_HANDLE_FOR_BD (Compact 2013)
3/26/2014
This I/O control message retrieves the connection handle for a Bluetooth device if it is connected. Send this message with DeviceIoControl.
Syntax
BOOL DeviceIoControl(
HANDLE hDevice, // handle to device
DWORD dwIoControlCode, // use BTH_HCI_IOCTL_GET_HANDLE_FOR_BD
LPVOID lpInBuffer, // pointer to input buffer
DWORD nInBufferSize, // input buffer size
LPVOID lpOutBuffer, // pointer to output buffer
DWORD nOutBufferSize, // output buffer size
LPDWORD lpBytesReturned, // number of bytes returned
OVERLAPPED lpOverlapped // pointer to OVERLAPPED structure
);
Parameters
- hDevice
The handle to the device.
- dwIoControlCode
[in] Control code for the operation. Use BTH_HCI_IOCTL_GET_HANDLE_FOR_BD for this operation.
- lpInBuffer
[in] Must be an aligned pointer to the BD_ADDR structure followed by one byte containing the zero-based order number of the handle to retrieve.
- nInBufferSize
[in] Set tosizeof(BD_ADDR)+1
.
- lpOutBuffer
[out] Must be an aligned pointer to an unsigned short that receives the connection handle.
- nOutBufferSize
[out] Set to 2.
- lpBytesReturned
[out] Equals nOutBufferSize.
- lpOverlapped
Ignored.
Remarks
The order number allows you to enumerate all connection handles for the peer represented by the Bluetooth address, including SCO connections.
To perform this enumeration, call the I/O control with the order number starting at 0, and then incrementing by one until an error is returned.
Requirements
Header |
bt_ddi.h |