Solved

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

Posted on 2009-07-06
5
446 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now