?
Solved

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

Posted on 2009-07-06
5
Medium Priority
?
451 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 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

764 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