In The Hand
SetPin Method (device, pin)
NamespacesInTheHand.Net.BluetoothBluetoothSecuritySetPin(BluetoothAddress, String)
.NET Components for Mobility
This function stores the personal identification number (PIN) for the Bluetooth device.
Declaration Syntax
C#Visual Basic
public static bool SetPin(
	BluetoothAddress device,
	string pin
)
Public Shared Function SetPin ( _
	device As BluetoothAddress, _
	pin As String _
) As Boolean
Parameters
device (BluetoothAddress)
Address of remote device.
pin (String)
Pin, alphanumeric string of between 1 and 16 ASCII characters.
Return Value
True on success, else False.
Remarks

On Windows CE platforms this calls BthSetPIN, its MSDN remarks say:

“Stores the pin for the Bluetooth device identified in pba. The active connection to the device is not necessary, nor is the presence of the Bluetooth controller. The PIN is persisted in the registry until BthRevokePIN is called.

“While the PIN is stored, it is supplied automatically after the PIN request is issued by the authentication mechanism, so the user will not be prompted for it. Typically, for UI-based devices, you would set the PIN for the duration of authentication, and then revoke it after authentication is complete.”

See also RevokePin(BluetoothAddress)

See Also

Assembly: InTheHand.Net.Personal (Module: InTheHand.Net.Personal) Version: 3.0.0.0