Solved

Get EventLog using VB

Posted on 2001-08-12
3
200 Views
Last Modified: 2012-05-04
Does anyone know hot to get the record in the event log of windows NT or 2000? I need to make an application that read the event log and insert it into database.
I searched the MSDN but I only get the sample using Visual C++.
Any help or direction would be great appreciated.
0
Comment
Question by:falconew
3 Comments
 
LVL 6

Accepted Solution

by:
xSinbad earned 300 total points
ID: 6378753
0
 

Expert Comment

by:cpearl_s
ID: 6378967
Hope this will guide u in rest of u'r process.
Just take a backup of the application event log, then
try write database programm that format that message and store in a db as specified in message format.
Iam also trying that , if i get that i let u know, hope u to the same.


Private Declare Function BackupEventLog Lib "advapi32.dll" Alias "BackupEventLogA" (ByVal hEventLog As Long, ByVal lpBackupFileName As String) As Long
Private Declare Function OpenEventLog Lib "advapi32.dll" Alias "OpenEventLogA" (ByVal lpUNCServerName As String, ByVal lpSourceName As String) As Long

Private Sub cmdBkUpLog_Click()
Dim lng As Long
Dim str As String

lng = BackupEventLog(OpenEventLog("ServerName", "Application"), "C:\Eve.txt")

End Sub


regards
cpearl
0
 
LVL 1

Author Comment

by:falconew
ID: 6379077
Thanks xSinbad,
It is I was looking for.
For my great thanks I increase the point to be 350.

Thanks also to cpearl_s, actually it is the last solution I've ever think if I can't find the solution from xSinbad.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

778 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