Share via


HCI_ReadPacket

This function reads the packet from the connecting device.

int HCI_ReadPacket(
  HCI_TYPE* peType, 
  BD_BUFFER* pInBuffer
);

Parameters

  • peType
    [out] Pointer to the HCI type. These values can be DATA_PACKET_ACL, DATA_PACKET_SCO, or EVENT_PACKET.
  • pInBuffer
    [in, out] Pointer to the packet buffer.

Return Values

TRUE on successful completion. FALSE if error has occurred. If this function returns FALSE, the stack interface to hardware will immediately be brought down by calling HCI_CloseConnection.

Remarks

This is a blocking function. It returns only when the packet is read or an error is encountered.

The HCI_ReadPacket function is given a buffer (BD_BUFFER) where:

  • cSize is no smaller than the value returned by the HCI_ReadHciParameters function.
  • cStart is set to 0.
  • cEnd equals cSize.

The HCI_ReadPacket function can use this buffer however it wants. When it returns a value, however, the data between cStart and cEnd must contain a valid Bluetooth HCI packet.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Bt_hcip.h.
Link Library: Btd.lib.

See Also

HCI_CloseConnection | BD_BUFFER | HCI_ReadHciParameters

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.