windowswinapievent-logmessageformat

Windows: ReportEvent function


As far as I understood, the ReportEvent function requires Message Text Files associated through the registry to receive properly formatted messages. Is there any common Event Ids or any simple way to report an event with no Message Text Files associated?

Or may be, is there special common Event Source which I can use in my application? Something like RegisterEventSource(NULL, "Application")?


Solution

  • No, you just have to follow the rules and define your message text files, build them into resources, link them to your app etc.

    The example provided at MSDN leads you through everything you need to do.