I have an ActiveX control in a Delphi project. It features a function that calculates certain value. The trouble is that the result of calculation is provided in an event that is triggered asynchronously.
I would rather prefer to make a call to this function and to wait until it finishes, then to proceed with the program (sync call).
I tried using a thread, but that did not trigger the event due to unknown reason. Furthermore, I am not sure if it is thread safe to use the control in this way.
Are there any general guidelines how to safely convert an AX async method to a sync method?