falconew
asked on
Get EventLog using VB
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.
I searched the MSDN but I only get the sample using Visual C++.
Any help or direction would be great appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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.
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(OpenEventLo
End Sub
regards
cpearl