The NotifyChangeEventLog function lets an application receive notification when an event is written to the event log file specified by the hEventLog parameter. When the event is written to the event log file, the function causes the event object specified by the hEvent parameter to become signaled.
BOOL NotifyChangeEventLog(
HANDLE hEventLog, |
// handle to an event log |
HANDLE hEvent |
// handle to a Win32 event |
); |
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 hEventLog is the handle of an event log on a remote computer, the NotifiyChangeEventLog function returns FALSE, and GetLastError returns ERROR_INVALID_HANDLE.