Solved

Can an agent write to Windows server system or application event viewer

Posted on 2009-07-06
5
450 Views
Last Modified: 2013-11-17
Greetings experts,

My Domino server is currently at R7.0.1 (will be 8.0.2 before the end of the month). I have software that can monitor the Windows operating system event viewer. Can an agent be coded to write to that event viewer?

Thank you.

Regards - Notes Rookie
0
Comment
Question by:notesrookie
[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
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:mbonaci
ID: 24785777
Yes, you can download the code from here, even if not registered.
You'll see the link:

    DOWNLOAD (200,608 bytes) -- Code for PerformanceTrax application.

http://my.advisor.com/doc/11871
0
 

Author Comment

by:notesrookie
ID: 24830539
Let me download that and give it a try. Thank you.
0
 

Author Comment

by:notesrookie
ID: 24830572
mbonaci - I downloaded the file, however, am not able to locate instructions on how to use this? Do you have any documentation? I also apologize for the delay in getting back to you. It has been an extremely busy week and have also been coughing up a lung (not very pleasant). I appreciate your help with this.

Thank you.

Regards - Notes Rookie.
0
 
LVL 22

Accepted Solution

by:
mbonaci earned 500 total points
ID: 24837966
Use API functions:
 - RegisterEventSource
 - GlobalAlloc
 - CopyMemory
 - ReportEvent
 - GlobalFree
 - DeregisterEventSource

You can see the example in function MakeReport (this part of the code):
	hEventLog = RegisterEventSource("", "PerformanceTrax")
	cbStringSize = Len(strMessage) + 1
	hMsgs = GlobalAlloc(&H40, cbStringSize)
	CopyMemory Byval hMsgs, Byval strMessage, cbStringSize
	iNumStrings = 1
	If ReportEvent(hEventLog, iLogType, 0, 8888, 0&, iNumStrings, cbStringSize, hMsgs,hMsgs) = 0 Then
		'I modified this part here cuz' you don't need logging into NSF db
		Msgbox "Error: Attempt to record error in Event Log failed"
		Call GlobalFree(hMsgs)
		DeregisterEventSource (hEventLog)				
		Exit Function				
	End If
	Call GlobalFree(hMsgs)
	DeregisterEventSource (hEventLog)

Open in new window

0
 

Author Comment

by:notesrookie
ID: 24875707
Thanks, mbonaci. I apologize for having kept you waiting.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 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