开发者

Logging in Windows Event Log in Unmanaged C++

I know that I can use ReportEvent method to write event l开发者_JAVA百科ogs in windows. But it seems to me that this method is useful for logging events prior to Windows Vista and 7 event log changes. For example, I don't think I can create a custom application log, set sessionID, ... using this library.

My other option will be using the System::Diagnostics methods like WriteEntry. This one has the features that I'm looking for, but the problem is that I can only use it in /clr mode.

My question is: is there any unmanaged C++ library for logging events to Windows 7?

Cheers, Reza++


Thanks @Luke, the answer is ETW. For writting to event logger, you can not use the legacy API and you should use the manifest-based providers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜