Opens a handle to the event log
#include <EventLog.au3>
_EventLog__Open ( $sServerName, $sSourceName )
$sServerName | The UNC name of the server on where the event log will be opened. If blank, the operation is performed on the local computer. |
$sSourceName | The name of the log |
Success: | the handle to the event log. |
Failure: | 0. |
To close the handle to the event log, use the _EventLog__Close().
_EventLog__Clear, _EventLog__Close, _EventLog__Read, _EventLog__Report
#include "Extras\HelpFileInternals.au3"
#include <EventLog.au3>
#include <FontConstants.au3>
#include <GUIConstantsEx.au3>
Example()
Func Example()
Local $hEventLog
; Create GUI
GUICreate("EventLog", 600, 300)
_MemoCreate(2, 2, 596, 294, 0)
GUISetState(@SW_SHOW)
$hEventLog = _EventLog__Open("", "Application")
_MemoWrite("Log full ........: " & _EventLog__Full($hEventLog))
_MemoWrite("Log record count : " & _EventLog__Count($hEventLog))
_MemoWrite("Log oldest record: " & _EventLog__Oldest($hEventLog))
_EventLog__Close($hEventLog)
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example