NotifyChangeEventLog

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
);
 

Parameters

hEventLog
Handle to an event log file. This handle is returned by the OpenEventLog or OpenBackupEventLog function.
hEvent
Handle to an event object. Use the CreateEvent function to create the event object.

Return Values

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.

Remarks

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.

QuickInfo

  Windows NT: Requires version 3.5 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in winbase.h.
  Import Library: Use advapi32.lib.

See Also

Event Logging Overview, Event Logging Functions, CreateEvent, OpenBackupEventLog, OpenEventLog