Hello there, fellow spod.
I have a VB Program which creates several objects and then calls a method of each asynchronously. I need the calling section of code to wait until all the methods have finished. I can't use DoEvents in a while loop because I am getting paid for this. Is there an API call or something which will say "wait until all these methods are finished", or "wait until this flag is raised", or something (without spawning threads because they don't work in VB6)? I've tried using WaitForMultipleObjects but it won't work. If you've got a clue, please let me know as this is like a steering wheel in my pants (it's driving me nuts).
I have a VB Program which creates several objects and then calls a method of each asynchronously. I need the calling section of code to wait until all the methods have finished. I can't use DoEvents in a while loop because I am getting paid for this. Is there an API call or something which will say "wait until all these methods are finished", or "wait until this flag is raised", or something (without spawning threads because they don't work in VB6)? I've tried using WaitForMultipleObjects but it won't work. If you've got a clue, please let me know as this is like a steering wheel in my pants (it's driving me nuts).