BthGetCurrentMode (Windows CE 5.0)
This function retrieves the current mode of the ACL connection to the peer that is specified by the Bluetooth address. This function is equivalent to BTH_HCI_IOCTL_GET_HANDLE_MODE HCI IOCTL.
Note To preserve Win32 compatibility, consider using the Winsock equivalent of this function. To do so, pass SO_BTH_GET_MODE as the optname value in getsockopt.
int BthGetCurrentMode( BT_ADDR* pba, unsigned char* pmode);
Parameters
pba
[in] Pointer to the Bluetooth address.pmode
[out] Pointer to the current mode of the ACL connection to the peer specified by pba.The following table shows the possible values.
Value Description 0x00 Active Mode. 0x01 Hold Mode. 0x02 Sniff Mode. 0x03 Park Mode.
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.
A return value of ERROR_NOT_FOUND indicates that an active ACL connection to the peer that is specified by the Bluetooth address does not exist.
Other standard error codes may be returned as appropriate.
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