BthWriteScanEnableMask

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This function sets the adapter's scan mode.

Note

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

Syntax

int BthWriteScanEnableMask(
  unsigned char mask
);

Parameters

  • mask
    [in] Sets the adapter's scan mode according to a mask.

    The following table shows the values that are used for the mask.

    Value Definition

    0x00

    No scans are enabled.

    0x01

    Inquiry scan is enabled and page scan is disabled.

    0x02

    Inquiry scan disabled and page scan is enabled.

    0x03

    Inquiry scan enabled and page scan is enabled.

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.

Other standard error codes may be returned as appropriate.

Remarks

The change to the mode is not persistent. It reverts to the default setting when the adapter is reinitialized, for example, when it is reinserted or the device is powered down.

For more information about this function, see the Write_Scan_Enable part of the Bluetooth Core Specification.

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