Creating Events

How do you create an event?
LVL 1
Jason_GAsked:
Who is Participating?
 
jstolanConnect With a Mentor Commented:
The purpose of an event id interprocess communication.  You can create the event in either thread using the "CreateEvent" call.  There are some options, but the simplest call is something like

HANDLE hEventHandle = CreateEvent(NULL,TRUE,TRUE,"MyEvent");

Now when another thread makes the same call, it won't create a new event, it gets a handle to the same event you created above.  By using SetEvent or ResetEvent you can then have the two threads communicate.
0
 
bernfarrCommented:
What kind of event? What do you want to do with it, presumably send it to something? Your own application, another one?
0
 
Jason_GAuthor Commented:
Well, I've create a thread using ::CreateThread, how would I create an event?

0
 
bernfarrCommented:
What do you mean by an event, a message that you're sending somewhere? Or something else.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.