Click here to Skip to main content
15,891,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Can i pass a parameter to an event handler in C?

I am using CreateEventW to create an event and SetEvent to fire an event

Thanks

dj

What I have tried:

I have looked around by just found parameter passing using classes
Posted
Updated 28-Apr-19 7:21am
Comments
[no name] 28-Apr-19 8:34am    
No you can't pass a parameter except a name.
What is the idea behind that you need to pass a parameter to a synch object?

Do you need maybe to know who set the event? If yes, then this should do it: Waiting for Multiple Objects - Windows applications | Microsoft Docs[^]

1 solution

No you can't pass a parameter except a name.
What is the idea behind that you need to pass a parameter to a synch object?

Do you need maybe to know who set the event? If yes, then this should do it: Waiting for Multiple Objects - Windows applications | Microsoft Docs[^]
 
Share this answer
 
Comments
dj4400 29-Apr-19 3:51am    
I have some threads which receives multiple messages and i want to know the type of the message in the signaled thread.
By the way, can multiple threads wait for a single event? if so, if the event is signaled then all the waiting threads signaled?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900