BthStartInquiryAsync (Compact 2013)

3/26/2014

This function starts an inquiry.

Syntax

int BthStartInquiryAsync(
  UINT LAP,
  UCHAR length,
  UCHAR cNumResponses
);

Parameters

  • LAP
    [in] LAP code. For a general inquiry, use the GIAC LAP code (0x9e8b33). For more information about LAP codes, see the Core Specification v2.1 + EDR on the Bluetooth web site.
  • Length
    [in] Inquiry length in 1.28-second intervals.
  • cNumResponses
    Maximum number of responses before completing the inquiry. Set to 0 (zero) to accept an unlimited number of responses.

Return Value

The following table shows the possible return values.

Value

Description

ERROR_SUCCESS

Success.

ERROR_IN_PROGRESS

An inquiry is already in progress.

ERROR_SERVICE_NOT_ACTIVE

The Bluetooth stack is not present.

Remarks

The inquiry results are sent on a message queue as they are discovered. Use the RequestBluetoothNotifications function to register a message queue with the Bluetooth stack.

Extended Inquiry Response (EIR) requires a Bluetooth 2.1-enabled baseband module and must be supported by both the local and remote devices. If EIR is not supported on both devices, the message queue will return standard inquiry data.

Requirements

Header

bt_api.h

Library

Btdrt.lib

See Also

Reference

Bluetooth API Management Functions
BthCancelInquiry