The BackupEventLog function saves the specified event log to a backup file. The function does not clear the event log.
BOOL BackupEventLog(
HANDLE hEventLog, |
// handle to event log |
LPCTSTR lpBackupFileName |
// name of backup file |
); |
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.
If the backup filename specifies a remote server, the event log handle must identify a log on the local computer. You cannot back up an event logfile from a remote server to a file on a remote server (even if the backup file and the original log are on the same server).