Solved

Creating Events

Posted on 1998-08-14
4
168 Views
Last Modified: 2013-11-20
How do you create an event?
0
Comment
Question by:Jason_G
  • 2
4 Comments
 
LVL 2

Expert Comment

by:bernfarr
Comment Utility
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
Comment Utility
Well, I've create a thread using ::CreateThread, how would I create an event?

0
 
LVL 2

Expert Comment

by:bernfarr
Comment Utility
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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Complete beginner needs help making a cron job 9 104
List out all word 7 219
countEvens challenge 2 56
mapAB Challlenge 35 84
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now