Create a type if you haven't already..
Type
PVLDCallbackReturn = ^TVLDCallbackReturn;
Okay with this construct I will be able to compile (after some small additional adjustments on the code) without any warning but the result is the same.
See Screenshot 1:
The callback is called by the DLL and will reach my Breakpoint located at the "begin" of the function.
See Screenshot 2:
Before entering the function with F7 here is the call stack
As you can see the Parameters of WRITEDATATOFILE are looking strange.
I assume that they are not yet filled with the correct values?
See Screenshot 3:
After key in F7 the software crashes.
Looking now on the call stack shows us, that now the parameters are "looking correct" - nevertheless the crash isn't gone