Export (0) Print
Expand All

BackupEventLog function

Saves the specified event log to a backup file. The function does not clear the event log.

Syntax


BOOL BackupEventLog(
  _In_  HANDLE hEventLog,
  _In_  LPCTSTR lpBackupFileName
);

Parameters

hEventLog [in]

A handle to the open event log. The OpenEventLog function returns this handle.

lpBackupFileName [in]

The absolute or relative path of the backup file.

Return value

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.

Remarks

The BackupEventLog function fails with the ERROR_PRIVILEGE_NOT_HELD error if the user does not have the SE_BACKUP_NAME privilege.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

Unicode and ANSI names

BackupEventLogW (Unicode) and BackupEventLogA (ANSI)

See also

OpenBackupEventLog
OpenEventLog

 

 

Community Additions

ADD
Show:
© 2014 Microsoft