BthWriteScanEnableMask (Windows CE 5.0)
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.
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 Values
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
OS Versions: Windows CE.NET 4.2 and later.
Header: Bt_api.h.
Link Library: Btdrt.lib.
See Also
Bluetooth OS Functions | Bluetooth Application Development
Send Feedback on this topic to the authors