1

I know that I can use ReportEvent method to write event logs 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++

4
  • 1
    Is this what you are looking for? Commented Sep 8, 2011 at 20:25
  • It I'm correct, it seems to be what I'm looking for with more features. Thanks a lot. Commented Sep 8, 2011 at 21:03
  • @Luke: I'm not sure how I can use EWT to log to Windows Event Viewer. I could only make it work to output in an .etl file Commented Sep 9, 2011 at 18:41
  • I've only ever used the legacy API; I don't know anything about the new API other than it exists. Commented Sep 9, 2011 at 19:26

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.