Function Reference


_EventLog__Clear

Clears the event log

#include <EventLog.au3>
_EventLog__Clear ( $hEventLog, $sFileName )

Parameters

$hEventLog Handle to the event log
$sFileName The name of the backup file. If the name is blank, the current event log is not backed up.

Return Value

Success: True
Failure: False

Remarks

This function fails if the event log is empty or a file already exists with the same name as $sFileName.
After this function returns, any handles that reference the cleared event log cannot be used to read the log.

Related

_EventLog__Open

Example

#include <EventLog.au3>

Example()

Func Example()
        Local $hEventLog

        $hEventLog = _EventLog__Open("", "Application")
        _EventLog__Clear($hEventLog, "C:\EventLog.bak")
        _EventLog__Close($hEventLog)
EndFunc   ;==>Example