首页 > 解决方案 > C++ builder 10.4 FMX TBluetoothLE 读取设备值异常错误

问题描述

我使用 C++ builder 10.4 设计我的项目,我的项目需要保持蓝牙连接并接收蓝牙值,问题是当我从 TBluetoothGattCharacteristic 获得值时,我的应用程序将崩溃,

我尝试如下

void __fastcall TForm2::BluetoothLE1CharacteristicRead(TObject * const Sender,
TBluetoothGattCharacteristic * const ACharacteristic,TBluetoothGattStatus AGattStatus)
{
    TBytes t_bata = const_cast<TBluetoothGattCharacteristic*>(ACharacteristic)->Value; 
   
    Do My Code.....

}

1.异常错误

2.按Break Stop Here

标签: c++firemonkey

解决方案


推荐阅读