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!

Why is there SetEvent but not IsEventSet ? 1

Status
Not open for further replies.

neseidus

Programmer
Sep 1, 2004
41
CA
Hi

The project I'm working on involves working with events, and one of the things I need to do is find out whether the event is set or not.

Is there an easy way to do this?

I'm calling CreateEvent and SetEvent to create and set events

I can't just have a flag that changes whenever an event is set since it's heavily threaded... And my attempt using mutex's failed.

Any help very appreciated!
 
You're using the event together with WaitForSingleObject (or similar wait functions), right?

Given zero time-out it will return immediately. If it returns WAIT_TIMEOUT, the event isn't signaled.

/Per

"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top