End Google Ads 201810 - BS.net 01 --> Hi again,
I wonder if there is any possibility to accomplish the following:

A GUI has a button with attached eventhadler (button_click).

In this eventhandler, there shall be called a function, that gathers some information. The information iInfo shall be returned like

int iInfo = gatherSomeInfo();

to the eventhandler button_click in the GUI.

Here is the Problem: The gatherSomeInfo() function needs eventhandling to collect all information. So I have to leave the gatherSomeInfo() function before knowing what to return and loosing the ability to send the needed information back (as return value). It is not possible to collect all information and immediatly return from this gatherSomeInfo() function back to the eventhandler in the GUI.

The gatherSomeInfo() Function is hooked into another event (of another thread in fact) that finally signals the info. From that moment on I could send a return value but I don't know how.

The function call of gatherSomeInfo() within the button_click eventhandler would block the further execution (if waiting for return value) until the return is done but that would exactly be what I need for this procedure.

How can I do this??? I can't believe that there is no way to do that. Can anyone help please???