Guest User

Untitled

a guest
Feb 16th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. static ManualResetEvent signal;
  2. public static void Start()
  3. {
  4. signal = new ManualResetEvent(false);
  5. EventLog ewApplication = new EventLog("Application", ".", "Application");
  6. ewApplication.EntryWritten += new EntryWrittenEventHandler(MyOnEntryWritten);
  7. ewApplication.EnableRaisingEvents = true;
  8.  
  9. signal.WaitOne();
  10. }
  11.  
  12. private void Stop()
  13. {
  14. **signal.Reset(); //not working
  15. signal.Close(); //not working**
  16. }
Add Comment
Please, Sign In to add comment