0

SUMMARY

When using Windows EventViewer application, it displays an exclamation mark (!) when there are new events to display. I found several articles about implementing SENS in .NET (http://www.codeproject.com/Articles/1361/Using-the-COM-Event-System-service-in-the-Net-Appl or http://richardarthur.sys-con.com/node/105651/mobile) but they are either too old (2001) or mentioning other SENS interfaces.

I know I can subscribe for new events using EventLog or EventLog.Eventing but I just want to know if there are new events in EventLog. After some googling, I found IEventWriteLog interface might be the correct interface but there are no information about how to implement it.

QUESTION

Does anyone have a recent sample that is optimized for .NET4+ to detect new events in Windows EventLog? And... I don't want to use WMI and EventLog.OnEntryWritten events.

Community
  • 1
  • 1
meraydin
  • 89
  • 1
  • 1
  • 11
  • I have edited your title. Please see, "[Should questions include “tags” in their titles?](http://meta.stackexchange.com/questions/19190/)", where the consensus is "no, they should not". – John Saunders Jan 17 '14 at 00:34
  • What exactly is wrong with using the classes in the [`System.Diagnostics.Eventing.Reader`](http://msdn.microsoft.com/en-us/library/system.diagnostics.eventing.reader.aspx) namespace? See "[How to: Subscribe to Events in an Event Log](http://msdn.microsoft.com/en-us/library/bb671202.aspx)" – John Saunders Jan 17 '14 at 00:39
  • Eventing.Reader subscribes to every event. In a busy box with more than 500-1000 events per second, you get a performance hit with this approach. What I want to achieve is to know when there is a new event (w/o polling) and I will read those records periodically using a bookmark. – meraydin Jan 17 '14 at 06:43

0 Answers0