Share via


BthSwitchRole (Compact 2013)

3/26/2014

This function changes the role of the local device in the piconet.

Syntax

int BthSwitchRole (
  BT_ADDR *pbt,
  USHORT usRole
);

Parameters

  • pbt
    [in] Pointer to the address that identifies the connection to change.
  • usRole
    [in] The new role.

    Role

    Value

    Master

    0

    Subordinate

    1

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.

Other standard HRESULT error codes may be returned as appropriate.

Requirements

Header

bt_api.h

Library

Btdrt.lib

See Also

Reference

Bluetooth API Management Functions
Bluetooth AG Service Functions