Solved

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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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.
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

820 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