【发布时间】:2013-02-28 12:36:32
【问题描述】:
我需要在Window log 下访问Audit Failure -> Security 事件在记录时立即进行,有什么方法可以在记录时立即捕获它。我需要访问实时尝试。
目前我正在 c# 中的 EventLogEntry 类中阅读此内容,但我需要在 Audit Failure 发生时运行我的应用程序。
foreach (EventLogEntry entry in log.Entries)
{
if (entry.EntryType==EventLogEntryType.FailureAudit)
{
///
}
}
类似的东西:
EventLog myNewLog = new EventLog();
myNewLog.Log = "MyCustomLog";
myNewLog.EntryWritten += new EntryWrittenEventHandler(MyOnEntryWritten);
myNewLog.EnableRaisingEvents = true;
Event log events,有些这样的我也想触发windows日志
【问题讨论】:
标签: c# winapi event-viewer