|
-
May 6th, 2002, 09:24 AM
#1
Thread Starter
Junior Member
System Event Logs
I am currently busy working on an intrusion detection system. I am looking at using VB.Net for creating a Windows Service. This service will have to read entries from the 3 operating system event logs, namely the Application, System and Security logs. This logs are only available in Win NT, 2000 and XP. Firstly can this be done using VB.Net and secondly does anyone know of good documentation on the subject.
Thanx
-
May 6th, 2002, 09:31 AM
#2
System.Diagnostics.EventLog is the namespace you can use.
Try doing an internet search for that. There is a method called GetEVentLogs that might be what you need. It returns an Eventlog array you would probably have to loop through and turn into a string. That is as much as I know about it though.
-
May 6th, 2002, 09:38 AM
#3
hold on..i am wrwoking on some code for ya thate should work
-
May 6th, 2002, 09:40 AM
#4
Thread Starter
Junior Member
Found it!
Yip found it looks like I mighht be able to use it. Just have to figure out this Server Explorer first.
Thanx
-
May 6th, 2002, 09:41 AM
#5
Code:
Dim log As New System.Diagnostics.EventLog()
Dim logentry As System.Diagnostics.EventLogEntry
log.Log="Application"
For Each logentry in myLog.Entries
MessageBox.Show(logentry.Message)
Next logentry
give that a shot
-
May 6th, 2002, 09:49 AM
#6
myLog.Entries should be log.Entries
-
May 6th, 2002, 09:54 AM
#7
Thread Starter
Junior Member
I will give it a shot!
Thanx not working on PC with .Net on. Will test the code tonight.
But I am certain it will work.
-
May 6th, 2002, 10:01 AM
#8
ok cool..Well I just tried it out and it worked perfectly. Not bad for a complete guess.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|