Simple code to write event viewer (without using API calls)
Simple code to write event viewer (without using API calls)
API Declarations
Private Enum EventErrorType
iInformation = 0
iError = 1
iWarning = 2
End Enum
Rate Simple code to write event viewer (without using API calls)
(1(1 Vote))
fSaveLogEventViewer "teste ERROR", iError
fSaveLogEventViewer "teste WARNING", iWarning
fSaveLogEventViewer "teste INFORMATION", iInformation
End Sub
Private Sub fSaveLogEventViewer (ByVal cDescription As String, ByVal iErrorType As EventErrorType)
Dim oShell As Object
Set oShell = CreateObject("WScript.Shell")
oShell.LogEvent iErrorType , cDescription
End Sub
Simple code to write event viewer (without using API calls) Comments
No comments yet — be the first to post one!
Post a Comment