Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BluetoothSendAuthenticationResponse function

The BluetoothSendAuthenticationResponse function is called when an authentication request to send the passkey response is received.

Note  When developing for Windows Vista SP2 and Windows 7 the use of BluetoothSendAuthenticationResponseEx is recommended.
 

Syntax


DWORD BluetoothSendAuthenticationResponse(
   HANDLE                hRadio,
   BLUETOOTH_DEVICE_INFO *pbtdi,
   LPWSTR                pszPasskey
);

Parameters

hRadio

Optional handle to the local radio handle, or NULL. If NULL, the function attempts to send an authentication response on all local radios.

pbtdi

Pointer to a BLUETOOTH_DEVICE_INFO structure describing the Bluetooth device being authenticated. This can be the same structure passed to the callback function.

pszPasskey

Pointer to a UNICODE zero-terminated string of the passkey response to be sent back to the authenticating device. the pszPasskey parameter can be no larger than BLUETOOTH_MAX_PASSKEY_SIZE, excluding NULL. If translation to ANSI is performed, the pszPasskey parameter cannot be larger than 16 bytes, excluding NULL.

Return value

Returns ERROR_SUCCESS when the device accepts the passkey response; the device is authenticated. Any other return value indicates failure. The following table describes common errors:

Return codeDescription
ERROR_CANCELLED

The Bluetooth device denied the passkey response. This error is also returned if a communication problem exists with the local radio.

E_FAIL

The device returned a failure code during authentication.

 

Requirements

Minimum supported client

Windows Vista, Windows XP with SP2 [desktop apps only]

Minimum supported server

None supported

Header

BluetoothAPIs.h (include Bthsdpdef.h or BluetoothAPIs.h)

Library

Bthprops.lib

DLL

Bthprops.dll

See also

BluetoothAuthenticateDevice
BluetoothAuthenticateMultipleDevices
BluetoothEnableDiscovery
BluetoothEnableIncomingConnections
BluetoothIsConnectable
BluetoothIsDiscoverable
BluetoothRegisterForAuthentication
BluetoothSendAuthenticationResponseEx
BluetoothUnregisterAuthentication
BLUETOOTH_DEVICE_INFO

 

 

Show: