Declare Function BackupEventLog Lib "advapi32.dll" Alias "BackupEventLogA" ( _ ByVal hEventLog As Long, _ ByVal lpBackupFileName As String) _ As Long
BackupEventLog сохраняет заданный лог события в резервном файле.
Dim hEventLog As Long Dim lretv As Long hEventLog = OpenEventLog(vbNullString, "Application") If hEventLog = 0 Then Debug.Print "OpenEventLog Failed" Exit Sub End If lretv = BackupEventLog(hEventLog, "appback.evt") If lretv = 0 Then Debug.Print "BackupEventLog Failed" Exit Sub End If lretv = CloseEventLog(hEventLog) If lretv = 0 Then Debug.Print "CloseEventLog Failed" Exit Sub End If