Solved

Creating Events

Posted on 1998-08-14
4
211 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 50 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

Technology Partners: 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

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.

737 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