Link to home
Start Free TrialLog in
Avatar of BoltonWanderer
BoltonWanderer

asked on

VB.NET Read Event Log - Advanced Views

Hello,

I am interestedin querying the event log programaticlaly.

I currently have something very simple which works (Below). However I want to get some more information such as the information which is contained in the Details Tab > XML View and/or within the General Tab from the actual event log.

   Dim eventlog1 As New EventLog("Security")
        Dim entry As EventLogEntry
        Dim intNum As Integer = 0
        For Each entry In EventLog1.Entries

            TextBox1.Text &= (entry.ToString) & " -  " & entry.Data.Count & " - " & entry.TimeWritten & " - " & entry.EventID.ToString & vbNewLine
          
        Next

Open in new window


Is this possible?

Thanks,
Alex
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

I think that's just a view which is being created by event log viewer using existing information.
Avatar of BoltonWanderer
BoltonWanderer

ASKER

Hi CodeCruiser, where is it picking that information up from? e.g. how can I access it?
Thanks
You can access it from EventLogEntry object.
I am already using that but I want to see the XML data programmatically. What property should I use?
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sadly not what a wanted. But it was a work around. Thanks,