BthAnswerPairRequest (Windows CE 5.0)

Send Feedback

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).

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 Values

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

OS Versions: Windows CE 5.0 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

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.