Group: Event Logging - Library: advapi32
Reading entries from Event logs
HANDLE OpenEventLog(
LPCTSTR lpUNCServerName,
LPCTSTR lpSourceName
);
DECLARE INTEGER OpenEventLog IN advapi32;
STRING lpUNCServerName,;
STRING lpSourceName
lpUNCServerName [in] The Universal Naming Convention (UNC) name of the server on which the event log is to be opened.
lpSourceName [in] The name of the log. If a custom log cannot be found, the event logging service opens the Application log; however, there will be no associated message or category string file.
If the function succeeds, the return value is the handle to an event log.
To close the handle to the event log, use the CloseEventLog function.
With Event Viewer, users can monitor events recorded in the Application, Security, and System logs.