The NotifyChangeEventLog function enables an application to receive notification when an event is written to the specified event log file. When the event is written to the event log file, the specified event object is set to the signaled state.
BOOL NotifyChangeEventLog(
HANDLE hEventLog, // handle to an event log
HANDLE hEvent // handle to an event object
);
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The NotifyChangeEventLog function does not work with remote handles. If the hEventLog parameter is the handle to an event log on a remote computer, NotifiyChangeEventLog returns zero, and GetLastError returns ERROR_INVALID_HANDLE.
When an event is written to the log file specified by hEventLog, the event specified by the hEvent parameter is set to the signaled state.
Windows NT: Requires version 3.5 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use advapi32.lib.
Event Logging Overview, Event Logging Functions, CreateEvent, OpenBackupEventLog, OpenEventLog