?
Solved

Creating Events

Posted on 1998-08-14
4
Medium Priority
?
218 Views
Last Modified: 2013-11-20
How do you create an event?
0
Comment
Question by:Jason_G
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Expert Comment

by:bernfarr
ID: 1320791
What kind of event? What do you want to do with it, presumably send it to something? Your own application, another one?
0
 
LVL 1

Author Comment

by:Jason_G
ID: 1320792
Well, I've create a thread using ::CreateThread, how would I create an event?

0
 
LVL 2

Expert Comment

by:bernfarr
ID: 1320793
What do you mean by an event, a message that you're sending somewhere? Or something else.
0
 
LVL 2

Accepted Solution

by:
jstolan earned 200 total points
ID: 1320794
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month8 days, 12 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question