BthAnswerPairRequest (Windows Embedded CE 6.0)
1/6/2010
This function responds to a request for the personal identification number (PIN) for a Bluetooth device.
Note
The PIN is an ASCII string that is not terminated by \0. Although it can be any binary data, it is typically limited to digits that can be dialed on the phone (0-9) or typed on a computer keyboard (alphanumeric characters).
Syntax
int BthAnswerPairRequest (
BT_ADDR* pba,
int cPinLength,
unsigned char *ppin
);
Parameters
- pba
[in] Points to BT_ADDR that stores the address of the peer device.
- cPinLength
[in] PIN length must be between 1 and 16 bytes.
- ppin
[in] Pointer to the PIN.
Return Value
If pairing is established between two Bluetooth devices, then this function returns ERROR_SUCCESS. Other standard error codes may be returned as appropriate.
Remarks
BthAnswerPairRequest is called after a device receives a pairing request. This function passes the parameters to the BthSetPIN function and waits for the pairing to be established.
BT_ADDR is defined in Ws2bth.h:
typedef ULONGLONG bt_addr, *pbt_addr, BT_ADDR, *PBT_ADDR;
Requirements
Header | bt_api.h |
Library | Btdrt.lib |
Windows Embedded CE | Windows CE 5.0 and later |