Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find a good example of ReportEvent function usage?

As with most "legacy" MSDN pages, the page for ReportEvent has too little information for me to make much sense of it. I've tried searching, but can't find a good, clean, simple example of the function's usage. Could anyone suggest one?

like image 650
Nick Bolton Avatar asked Aug 17 '09 22:08

Nick Bolton


1 Answers

I ended up using this:

HANDLE eventLog;
WORD type;
const char* msg;

// ... snip ...

ReportEvent(eventLog, type, 0, 1, NULL, 1, 0, &LPCTSTR(msg), NULL);

Seems to work well enough.

like image 155
Nick Bolton Avatar answered Nov 13 '22 17:11

Nick Bolton