sudhanshu22
Member
- Joined
- Nov 8, 2006
- Messages
- 20
- Programming Experience
- Beginner
Hi all,
I am writing a multithreaded code in vc++, where I am using createevent() and openevent() function to control threads.
hEvent1 = OpenEvent(EVENT_ALL_ACCESS, FALSE, "Event1");
I want to know the significance of first 2 arguments. This is in light of
when I tried EVENT_MODIFY_STATE in place of EVENT_ALL_ACCESS, it did not give desired result as I was not able to set/reset events in 2 separate threads, apart from main thread. My code creates 2 new threads and then communication between the 2 threads is by set/reset events.
The second parameter is for making the handle non-inheritable. what about the event "Event1". Is this event always accessible by all threads at all times. I mean any thread or any other dll/ exe file can open a handle to it at any time.
Regards
sudhanshu
I am writing a multithreaded code in vc++, where I am using createevent() and openevent() function to control threads.
hEvent1 = OpenEvent(EVENT_ALL_ACCESS, FALSE, "Event1");
I want to know the significance of first 2 arguments. This is in light of
when I tried EVENT_MODIFY_STATE in place of EVENT_ALL_ACCESS, it did not give desired result as I was not able to set/reset events in 2 separate threads, apart from main thread. My code creates 2 new threads and then communication between the 2 threads is by set/reset events.
The second parameter is for making the handle non-inheritable. what about the event "Event1". Is this event always accessible by all threads at all times. I mean any thread or any other dll/ exe file can open a handle to it at any time.
Regards
sudhanshu