I'm repeatedly calling a method with BeginInvoke. After each call, I call EndInvoke.
The problem is that for the second call, the IsCompleted member in the returned IAsyncResult is set to true IMMEDIATELY after the BeginInvoke call.
This causes a malfunction, because the program then thinks the second call is done.
Why does it do this, and how can I detect when the 2nd call is REALLY completed?
Declarations:
IAsyncResult ar;
Mercury.J4000.Ui.frmMain.doPrintsDelegate printCallback;
The BeginInvoke call:
ar = printCallback.BeginInvoke (jobNameArray, copies, distances, null, null);
The EndInvoke call (in another method):
printCallback.EndInvoke(ar);