Can somebody please look for me at the function declaration of procedure NotificationCallback() in System.
Can somebody please look for me at the function declaration of procedure NotificationCallback() in System.Win.Bluetooth.pas for Delphi XE8 or XE10?
It should be declared as stdcall but is actually cdecl in the file shipped with DX7.1, which triggers an annoying stack overflow when you use BluetoothLE GATT notifications. When lowering stack size to 64KB, I managed to get the overflow in about 15 seconds of full BLE data traffic - a bit less than 5000 notifications.
M$ documentation is not helpful either, but there is example code that uses WINAPI for this callback.
Background (EDN login required):
https://quality.embarcadero.com/browse/RSP-11715
#Delphi #BluetoothLowEnergy
https://code.msdn.microsoft.com/windowsapps/Windows-Driver-Kit-WDK-80-e3161626/sourcecode?fileId=92302&pathId=1810634922
It should be declared as stdcall but is actually cdecl in the file shipped with DX7.1, which triggers an annoying stack overflow when you use BluetoothLE GATT notifications. When lowering stack size to 64KB, I managed to get the overflow in about 15 seconds of full BLE data traffic - a bit less than 5000 notifications.
M$ documentation is not helpful either, but there is example code that uses WINAPI for this callback.
Background (EDN login required):
https://quality.embarcadero.com/browse/RSP-11715
#Delphi #BluetoothLowEnergy
https://code.msdn.microsoft.com/windowsapps/Windows-Driver-Kit-WDK-80-e3161626/sourcecode?fileId=92302&pathId=1810634922
Comments
Post a Comment