Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Waiting for event using Windows API (or otherwise)

Status
Not open for further replies.

Jools

Programmer
Oct 18, 2000
2
GB
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 couple more questions before I attempt to give an answer.

The object that you're creating... it is a VB Object that you have control over the source?

How are you calling them asynchronosly? I thought most calls were sychronous. This is probably related to my first question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top