Detecting "new events available" as in Event Viewer using COM+/SENS with C#

415 Views Asked by At

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.

0

There are 0 best solutions below