Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

10 Experts available now in Live!

Get 1:1 Help Now