Solved

Creating Events

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Rewrite URL With Encoded Characters 6 78
Separate files macro - Errors on larger data set 18 71
Detect CR LF to each line 12 162
Way to decrease size of apk file 9 71
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 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