andrew4582

InteropEvents

Jul 6th, 2012
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1.  
  2. using System;
  3. using System.Runtime.InteropServices;
  4.  
  5. namespace Interop
  6. {
  7.     public class InteropEvents
  8.     {
  9.         [DllImport("Kernel32.dll")]
  10.         public static extern Boolean SetEvent(IntPtr hEvent);
  11.  
  12.         [DllImport("Kernel32.dll")]
  13.         public static extern Boolean ResetEvent(IntPtr hEvent);
  14.  
  15.         [DllImport("Kernel32.dll")]
  16.         public static extern IntPtr OpenEvent(UInt32 dwDesiredAccess,Boolean bInheritHandle,String lpName);
  17.  
  18.         [DllImport("Kernel32.dll")]
  19.         public static extern IntPtr CreateEvent(IntPtr lpEventAttributes,Boolean bManualReset,Boolean bInitialState,String lpName);
  20.  
  21.         [DllImport("Kernel32.dll")]
  22.         public static extern UInt32 WaitForSingleObject(IntPtr hHandle,Int32 dwMilliseconds);
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment