Partager via


BthFindFirstEirRecord (Compact 7)

3/12/2014

This function starts an enumeration of the local or remote Extended Inquiry Response (EIR) data.

Syntax

int BthFindFirstEirRecord(
  __in BT_ADDR *pbta,
  __out PBYTE pcbLength,
  __out PBYTE pbDataType,
  __out PBYTE pData,
  __in DWORD cbDataBuffer,
  HANDLE* phFind
);

Parameters

  • pbta
    [in] Pointer to the Bluetooth address. Set to NULL to query local EIR data.
  • pcbLength
    [out] Length of the EIR record in bytes.
  • pbDataType
    [out] Data type of the EIR record.
  • pData
    [out] Record data blob.
  • cbDataBuffer
    [in] Size of the pData buffer in bytes.
  • phFind
    [out] Pointer to the enumeration handle.

Return Value

The following table shows the possible return values.

Value Description

ERROR_SUCCESS

Success.

ERROR_SERVICE_NOT_ACTIVE

The Bluetooth stack is not present.

ERROR_INVALID_HANDLE

The enumeration handle is not valid.

ERROR_INSUFFICIENT_BUFFER

The pData buffer is too small.

Remarks

To hold the largest possible EIR record, increase buffer size to 240 bytes.

You can use the handle that this function returns (phFind) to retrieve the next record by using the BthFindNextEirRecord function. The enumeration must be closed with the BthFindEirRecordClose function.

Requirements

Header

bt_api.h

Library

Btdrt.lib

See Also

Reference

Bluetooth API Connection Functions