Module Module1
Private Declare Function BackupEventLog Lib "advapi32.dll" Alias "BackupEventLogA" (ByVal hEventLog As Integer, ByVal lpBackupFileName As String) As Integer
Private Declare Function CloseEventLog Lib "advapi32.dll" (ByVal hEventLog As Integer) As Integer
Private Declare Function OpenEventLog Lib "advapi32.dll" Alias "OpenEventLogA" (ByVal lpUNCServerName As String, ByVal lpSourceName As String) As Integer
Private Declare Function ClearEventLog Lib "advapi32.dll" Alias "ClearEventLogA" (ByVal hEventLog As Integer, ByVal lpBackupFileName As String) As Integer
Sub Main()
Dim hEventLog As Integer
Dim lretv As Integer
hEventLog = OpenEventLog(vbNullString, "Application")
If hEventLog = 0 Then
Debug.Print("OpenEventLog Failed")
Exit Sub
End If
lretv = BackupEventLog(hEventLog, "appslog.evt")
If lretv = 0 Then
Debug.Print("BackupEventLog Failed")
Exit Sub
End If
lretv = ClearEventLog(hEventLog, vbNullString)
If lretv = 0 Then
Debug.Print("ClearEventLog Failed")
Exit Sub
End If
lretv = CloseEventLog(hEventLog)
If lretv = 0 Then
Debug.Print("CloseEventLog Failed")
Exit Sub
End If
End Sub
End Module
Visual Basic & Exel + Schleifen
Kennyger 08.03.2007 - 167 Hits - 8 Antworten
Mit welchem Programm kann man Visual Basic 6.0 Pro Englisch ins Deutsche aktualisieren?
VB6Fan!!! 08.03.2007 - 99 Hits - 1 Antwort
makros aktivieren
bangs 22.04.2008 - 90 Hits -
Wer kent sich im Visual Basic 2008 Express Edition aus
Black117 11.05.2008 - 80 Hits - 6 Antworten
visual basic minimieren
HugoHamburger 30.11.2009 - 123 Hits - 4 Antworten