BthGetLinkKey (Compact 2013)
3/26/2014
This function retrieves the link key for the specified Bluetooth device.
Syntax
int BthGetLinkKey(
BT_ADDR *pba,
unsigned char key[16]
);
Parameters
- pba
[in] Pointer to the address of the device.
- key
[in] Retrieves the link key for the device identified in pba. An active connection to the device is not necessary, nor is the presence of the Bluetooth controller.
Return Value
The following table shows the possible return values.
Value |
Description |
---|---|
ERROR_SUCCESS |
Success. |
ERROR_SERVICE_NOT_ACTIVE |
The Bluetooth stack is not present. |
Other standard HRESULT error codes may be returned as appropriate.
Remarks
Typically, the Bluetooth stack manages link keys automatically, such as storing them when they are created. This function is mainly useful for backup purposes.
Link keys are 16 bytes long and are only generated by the Bluetooth controller.
Requirements
Header |
bt_api.h |
Library |
Btdrt.lib |
See Also
Reference
Bluetooth API Security Management Functions
Bluetooth AG Service Functions