// bthxddi.h
// CTL_CODE(0x0041, 0x103, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_BTHX_WRITE_HCI 0x0041040F
View the official Windows Driver Kit DDI referenceNo description available.
IOCTL_BTHX_WRITE_HCI is used to write Bluetooth ACL Data and Commands to the transport layer.
Profile drivers should use KMDF and its WdfRequestRetrieveInputMemory method to retrieve input parameters. For example, to get the input buffer:
Status = WdfRequestRetrieveInputMemory(_Request, &ReqInMemory);
The buffer describes a BTHX_HCI_READ_WRITE_CONTEXT structure that specifies the type of write and the data associated with the write.
Refer to the WDK Bluetooth samples for more information.
The length of the buffer is the size of the BTHX_HCI_READ_WRITE_CONTEXT structure.
Profile drivers should use KMDF and its WdfRequestRetrieveOutputMemory method to retrieve input parameters. For example, to get the output buffer:
Status = WdfRequestRetrieveOutputMemory(_Request, &ReqOutMemory);
The buffer describes a ULONG of the number of bytes written for the input data specified in the BTHX_HCI_READ_WRITE_CONTEXT structure.
Refer to the WDK Bluetooth samples for more information.
The length of the buffer is the size of a ULONG.
If the request is successful the Information member of the STATUS_BLOCK structure is set to the number of bytes in the Output Parameter.
The Status member is set to one of the values in the following table.
| Status value | Description |
|---|---|
| STATUS_SUCCESS | The IOCTL completed successfully. |
The Bluetooth stack sends IOCTL_BTHX_WRITE_HCI to write HCI ACL data and HCI command to the controller.
The input buffer points to a BTHX_HCI_READ_WRITE_CONTEXT structure whose DataLen member specifies the number of bytes in the Data member. The Type member is set based on whether the packet is a command packet or an ACL data packet.