Platforms to show: All Mac Windows Linux Cross-Platform
WindowsDeviceInformationPairingMBS class New in 23.4
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Bluetooth | MBS WinFrameworks Plugin | 23.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
- 2 events
- event PairAsyncCompleted(asyncStatus as Integer, PairingStatus as Integer, ProtectionLevelUsed as Integer)
- event UnpairAsyncCompleted(asyncStatus as Integer, UnpairingStatus as Integer)
- 4 properties
- property CanPair as Boolean
- property Handle as Integer
- property IsPaired as Boolean
- property ProtectionLevel as Integer
- 6 methods
- method Constructor Private
- method Constructor(other as WindowsDeviceInformationPairingMBS)
- method Destructor
- method PairAsync
- method PairAsync(minProtectionLevel as Integer)
- method UnpairAsync
- 2 shared methods
- shared method TryRegisterForAllInboundPairingRequests(pairingKindsSupported as Integer) as Boolean
- shared method TryRegisterForAllInboundPairingRequestsWithProtectionLevel(pairingKindsSupported as Integer, minProtectionLevel as Integer) as Boolean
- 39 constants
Pairing Kinds
Constant | Value | Description |
---|---|---|
DevicePairingKindsConfirmOnly | 1 |
The application must confirm they wish to perform the pairing action. You can present an optional confirmation dialog to the user. With a value of ConfirmOnly, call Accept from the event args of the PairingRequested event handler if you want the pairing to complete. |
DevicePairingKindsConfirmPinMatch | 8 |
The application must display the given PIN to the user and ask the user to confirm that the PIN matches the one show on the target device. With a value of ConfirmPinMatch, call Accept from the event args of the PairingRequested event handler if you want the pairing to complete. |
DevicePairingKindsDisplayPin | 2 |
The application must display the given PIN to the user. The user will then need to enter or confirm that PIN on the device that is being paired. With a value of DisplayPin, call Accept from the event args of the PairingRequested event handler if you want the pairing to complete. If your application cancels the pairing at this point, the device might still be paired. This is because the system and the target device don't need any confirmation for this DevicePairingKinds value. |
DevicePairingKindsNone | 0 |
No pairing is supported. |
DevicePairingKindsProvidePasswordCredential | 16 |
The application must request a user name and password from the user. With a value of ProvidePasswordCredential, call AcceptWithPasswordCredential from the event args of the PairingRequested event handler to accept the pairing. Pass in the PasswordCredential that encapsulates the user name and password as a parameter. |
DevicePairingKindsProvidePin | 4 |
The application must request a PIN from the user. The PIN will typically be displayed on the target device. With a value of ProvidePin, call Accept from the event args of the PairingRequested event handler if you want the pairing to complete. Pass in the PIN as a parameter. |
Protection Levels
Constant | Value | Description |
---|---|---|
DevicePairingProtectionLevelDefault | 0 |
The default value. This should not be used. |
DevicePairingProtectionLevelEncryption | 2 |
Pair the device using encryption. |
DevicePairingProtectionLevelEncryptionAndAuthentication | 3 |
Pair the device using encryption and authentication. |
DevicePairingProtectionLevelNone | 1 |
Pair the device using no levels of protection. |
ProtectionLevelAuthenticationRequired | 1 |
Require the link to be authenticated. |
ProtectionLevelEncryptionAndAuthenticationRequired | 3 |
Require the link to be encrypted and authenticated. |
ProtectionLevelEncryptionRequired | 2 |
Require the link to be encrypted. |
ProtectionLevelPlain | 0 |
Uses the default protection level. |
Pairing Status
Constant | Value | Description |
---|---|---|
DevicePairingResultStatusAccessDenied | 12 |
Your application does not have the appropriate permissions level to pair the device object. |
DevicePairingResultStatusAlreadyPaired | 3 |
The device object has already been paired. |
DevicePairingResultStatusAuthenticationFailure | 9 |
Authentication failed, so the device is not paired. Either the device object or the application rejected the authentication. |
DevicePairingResultStatusAuthenticationNotAllowed | 8 |
The authentication protocol is not supported, so the device is not paired. |
DevicePairingResultStatusAuthenticationTimeout | 7 |
The authentication process timed out before it could complete. |
DevicePairingResultStatusConnectionRejected | 4 |
The device object rejected the connection. |
DevicePairingResultStatusFailed | 19 |
An unknown failure occurred. |
DevicePairingResultStatusHardwareFailure | 6 |
The device object indicated there was a hardware failure. |
DevicePairingResultStatusInvalidCeremonyData | 13 |
The ceremony data was incorrect. |
DevicePairingResultStatusNoSupportedProfiles | 10 |
There are no network profiles for this device object to use. |
DevicePairingResultStatusNotPaired | 2 |
The device object is not currently paired. |
DevicePairingResultStatusNotReadyToPair | 1 |
The device object is not in a state where it can be paired. |
DevicePairingResultStatusOperationAlreadyInProgress | 15 |
The device object is already attempting to pair or unpair. |
DevicePairingResultStatusPaired | 0 |
The device object is now paired. |
DevicePairingResultStatusPairingCanceled | 14 |
The pairing action was canceled before completion. |
DevicePairingResultStatusProtectionLevelCouldNotBeMet | 11 |
The minimum level of protection is not supported by the device object or the application. |
DevicePairingResultStatusRejectedByHandler | 17 |
The application handler rejected the pairing. |
DevicePairingResultStatusRemoteDeviceHasAssociation | 18 |
The remove device already has an association. |
DevicePairingResultStatusRequiredHandlerNotRegistered | 16 |
Either the event handler wasn't registered or a required DevicePairingKinds was not supported. |
DevicePairingResultStatusTooManyConnections | 5 |
The device object indicated it cannot accept any more incoming connections. |
Unpairing Status
Constant | Value | Description |
---|---|---|
DeviceUnpairingResultStatusAccessDenied | 3 |
The caller does not have sufficient permissions to unpair the device. |
DeviceUnpairingResultStatusAlreadyUnpaired | 1 |
The device object was already unpaired. |
DeviceUnpairingResultStatusFailed | 4 |
An unknown failure occurred. |
DeviceUnpairingResultStatusOperationAlreadyInProgress | 2 |
The device object is currently in the middle of either a pairing or unpairing action. |
DeviceUnpairingResultStatusUnpaired | 0 |
The device object is successfully unpaired. |
This class has no sub classes.
Some properties using for this class:
- WindowsBluetoothLEDeviceMBS.Pairing as WindowsDeviceInformationPairingMBS
Blog Entries
The items on this page are in the following plugins: MBS WinFrameworks Plugin.
WindowsConsoleMBS - WindowsDeviceMBS
