Solved

Manipulating the eventviewer with a VB Dll

Posted on 2003-11-11
4
204 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
  • 2
  • 2
4 Comments
 
LVL 69

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 69

Accepted Solution

by:
Éric Moreau earned 125 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now