AllAPI Network - The KPD-Team

Allapi Network

 API List

API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
This Site
 Search Engine
 Contact Form

Donate to


The ClearEventLog function clears the specified event log, and optionally saves the current copy of the logfile to a backup file.

Declare Function ClearEventLog Lib "advapi32.dll" Alias "ClearEventLogA" (ByVal hEventLog As Long, ByVal lpBackupFileName As String) As Long


Operating Systems Supported
Requires Windows NT 3.1 or later; Win9x/ME: Not supported


Parameter Information
[in] Handle to the event log to be cleared. This handle is returned by the OpenEventLog function.

[in] Pointer to the null-terminated string specifying the name of a file in which a current copy of the event logfile will be placed. If this file already exists, the function fails.
If the lpBackupFileName parameter is NULL, the current event logfile is not backed up.

Return Values
If the function succeeds, the return value is nonzero. The specified event log has been backed up (if lpBackupFileName is not NULL) and then cleared.

If the function fails, the return value is zero. To get extended error information, call GetLastError.


Related Functions

No VB.NET Example Found



Copyright © 1998-2007, The Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at