DllImport SetEvent causing MissingMethodException

G

Guest

Hi,

can someone tell me where im going wrong:

[DllImport("Coredll.dll")]
public static extern IntPtr CreateEvent(IntPtr a,bool b,bool c,string d);
[DllImport("Coredll.dll")]
public static extern bool SetEvent(IntPtr hEvent);
....
IntPtr hEvent = CreateEvent(IntPtr.Zero,false,false,"xxx");
bool b = SetEvent(hEvent); //--> MissingMethodException

D
 
C

Chris Tacke, eMVP

SetEvent doesn't exist as a method. It's a macro around EventModify (as are
Pulse and Clear). Take a look at OpenNETCF's SDF for implementations (as
well as an actual managed EventMonitor that supports named events).

www.opennetcf.org/sdf


--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top