?
Solved

Manipulating the eventviewer with a VB Dll

Posted on 2003-11-11
4
Medium Priority
?
209 Views
Last Modified: 2010-05-01
Hi experts,
             is it possible to save and delete the application events caught by the Windows eventViewer ?

I'm doing a little dll to do a daily clean of the events and some ohter stuff ... but i don't know how to mess with the eventviewer by the code .


Regards!

- David
0
Comment
Question by:David MacDonald
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 9724018
VB.Net has classes that let you read the event log.
0
 
LVL 1

Author Comment

by:David MacDonald
ID: 9724373
emoreau : thanks, but I'm stuck with VB6 ... no .Net for now-(bummer!)...

I have to use the API functions, but it looks a bit complex ...

For example:

Dim test As Long
   
test = BackupEventLog(OpenEventLog("", "Application"), "C:\testLogEvent.txt")

I'm not sure what to put for the 1st parameter of OpenEventLog ... the name of the computer ... is it it's networkName ??   and the second, is it the kind of event to be backed-up (Application, security and system) ?

I cannot find any viable exemple ... not in vb anyway

Anyone can help?

Regards

- David
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 9724416
try to pass VBNullString
0
 
LVL 1

Author Comment

by:David MacDonald
ID: 9724582
hoho ... thanks a lot emoreau

I suppose that it's simpler in vb.Net .... anyways, it works well now ...


Regards!

- David
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question