Share via


BthGetRole (Windows Embedded CE 6.0)

1/6/2010

This function retrieves the current role for a peer Bluetooth device.

Syntax

int BthGetRole 
  BT_ADDR* pbt,
  USHORT* pusRole
);

Parameters

  • pbt
    [in] Pointer to the Bluetooth address as a BT_ADDR type. BT_ADDR is defined in Ws2bth.h:

    typedef ULONGLONG bt_addr, *pbt_addr, BT_ADDR, *PBT_ADDR;
    
  • pusRole
    [out] Pointer to a USHORT type that specifies the current role of the peer device. Set the value to 0 (zero) if it is a master device or to 1 if it is a subordinate device.

Return Value

This function returns ERROR_SUCCESS when it completes successfully.

Other standard error codes may be returned as appropriate.

Requirements

Header bt_api.h
Library Btdrt.lib
Windows Embedded CE Windows Embedded CE 6.0

See Also

Reference

Bluetooth OS Functions

Other Resources

Bluetooth Application Development