Solution:
Passing an ATEasy procedure to a callback is supported from version 6.0 and above.
The following workaround provides the same functionality for ATEasy version 3.x-5.x:
1. Write a DLL with the callback function and pass it to the function that requires callback function.
2. To pass the address, call the Windows API GetProcAddresss(), then pass the result as long to the function that requires callback function.
3. The DLL callback function can use another ATEasy thread to perform an action in ATEasy when the call back was called. The thread can be triggered by an ATEasy synchronization object (AEvent), using a global variable or an ATEasy user interrupt.
|