Share via


BthActivatePAN (Compact 2013)

3/26/2014

This function activates or deactivates the Bluetooth Personal Area Networking (PAN) profile.

Syntax

int BthActivatePAN (
  BOOL fActivate
);

Parameters

  • fActivate
    [in] Specifies whether PAN should be active. TRUE activates PAN, and FALSE deactivates PAN.

Return Value

The following table shows the possible return values.

  • ERROR_SUCCESS
    Success.
  • ERROR_SERVICE_NOT_ACTIVE
    The Bluetooth stack or PAN service is not initialized yet.
  • ERROR_INVALID_STATE
    The caller tried to deactivate PAN while it was already deactivated.

Remarks

To indicate that Bluetooth PAN should be automatically activated when the device starts up, you can set the ActivateOnBoot registry setting. For more information, see Personal Area Network (PAN) Profile Registry Settings.

After an application calls BthActivatePAN, a Service Discovery Protocol (SDP) record is registered and the application needs to stay loaded. If it does not stay loaded, the Bluetooth PAN profile will become undetectable.

Requirements

Header

bt_api.h

Library

Btdrt.lib

See Also

Reference

Bluetooth API Personal Area Network Functions