VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Logs event to Windows Application Event Log via ReportEvent function of advapi32 API. Refactored ve

Anonymous  (267 Submissions)   Windows API Call/Explanation   VB 6.0   Unknown Difficulty   Thu 5th November 2009   Mon 8th February 2021

Logs event to Windows Application Event Log via ReportEvent function of advapi32 API. Refactored version of code originally submitted by

API Declarations


"RegisterEventSourceA" (ByVal lpUNCServerName As String, ByVal lpSourceName As String) As Long

Private Declare Function DeregisterEventSource Lib "advapi32" _
(ByVal hEventLog As Long) As Boolean

Private Declare Function ReportEvent _
Lib "advapi32" Alias "ReportEventA" _
(ByVal hEventLog As Long, _
ByVal wType As Long, _
ByVal wCategory As Long, _
ByVal dwEventID As Long, _
ByVal lpUserSid As Long, _
ByVal wNumStrings As Long, _
ByVal dwDataSize As Long, _
lpStrings As Any, _
lpRawData As Any) As Long

Public Enum LogTypes
EVENTLOG_SUCCESS = &H0 'Success event
EVENTLOG_ERROR_TYPE = &H1 'Error event
EVENTLOG_WARNING_TYPE = &H2 'Warning event
EVENTLOG_INFORMATION_TYPE = &H4 'Information event
EVENTLOG_AUDIT_SUCCESS = &H8 'Success audit event
EVENTLOG_AUDIT_FAILURE = &H10 'Failure audit event
End Enum


Rate Logs event to Windows Application Event Log via ReportEvent function of advapi32 API. Refactored ve (2(2 Vote))
Logs event to Windows Application Event Log via ReportEvent function of advapi32 API. Refactored ve.bas

Logs event to Windows Application Event Log via ReportEvent function of advapi32 API. Refactored ve Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters