Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static ManualResetEvent signal;
- public static void Start()
- {
- signal = new ManualResetEvent(false);
- EventLog ewApplication = new EventLog("Application", ".", "Application");
- ewApplication.EntryWritten += new EntryWrittenEventHandler(MyOnEntryWritten);
- ewApplication.EnableRaisingEvents = true;
- signal.WaitOne();
- }
- private void Stop()
- {
- **signal.Reset(); //not working
- signal.Close(); //not working**
- }
Add Comment
Please, Sign In to add comment