Doubt regarding openevent() in vc++

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
 

sudhanshu22

Member
Joined
Nov 8, 2006
Messages
20
Programming Experience
Beginner
I am trying this in vc++.net. This is not a visual basic code. Event in c++ is one way of synchronization.
Can people suggest answers?
 

Administrator

VB.NET Forum Admin
Joined
Jun 3, 2004
Messages
1,461
Programming Experience
10+
Hello,

This forum is specific to VB.NET. If you have a problem you need assistance with regarding VB.NET, please post your question.
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,604
Location
Norway
Programming Experience
10+
You will only find forums related to VB.Net development on this site. If you didn't notice it's called VB.NET FORUMS. We use Visual Studio too, you know.
 
Top Bottom