Share via


BthGetCurrentMode (Windows Embedded CE 6.0)

1/6/2010

This function retrieves the current mode of the ACL connection to the peer that is specified by the Bluetooth address. This function is equivalent to BTH_HCI_IOCTL_GET_HANDLE_MODE HCI IOCTL.

Note

To preserve Win32 compatibility, consider using the Winsock equivalent of this function. To do so, pass SO_BTH_GET_MODE as the optname value in getsockopt.

Syntax

int BthGetCurrentMode(
  BT_ADDR* pba,
  unsigned char* pmode
);

Parameters

  • pba
    [in] Pointer to the Bluetooth address.
  • pmode
    [out] Pointer to the current mode of the ACL connection to the peer specified by pba.

    The following table shows the possible values.

    Value Description

    0x00

    Active Mode.

    0x01

    Hold Mode.

    0x02

    Sniff Mode.

    0x03

    Park Mode.

Return Value

This function returns ERROR_SUCCESS when it completes successfully.

A return value of ERROR_SERVICE_NOT_ACTIVE indicates that the hardware is not inserted or that the Bluetooth stack is not present.

A return value of ERROR_NOT_FOUND indicates that an active ACL connection to the peer that is specified by the Bluetooth address does not exist.

Other standard error codes may be returned as appropriate.

Requirements

Header bt_api.h
Library Btdrt.lib
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

Bluetooth OS Functions

Other Resources

Bluetooth Application Development