Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Manipulating the eventviewer with a VB Dll

Posted on 2003-11-11
4
Medium Priority
?
210 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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

636 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