NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

EventLog EntryWritten Event

Occurs when an entry is written to the event log.

The following declaration shows the syntax for a method that handles the EntryWritten event.

[Visual Basic]
Private Sub EventLogName_EntryWritten( _
   ByVal sender As Object, _
   ByVal e As EventLogEventArgs _
)
[C#]
private void EventLogName_EntryWritten(
   object sender,
   EventLogEventArgs e
);
[C++]
private: void EventLogName_EntryWritten(
   Object* sender,
   EventLogEventArgs* e
);
[JScript]
private EventLogName_EntryWritten(
   sender : Object,
   e : EventLogEventArgs
);

Parameters

sender
The source of the event.
e
An EventLogEventArgs that contains the event data.

Remarks

When overriding System.Diagnostics.EventLog.EntryWritten in a derived class, be sure to call the base class's System.Diagnostics.EventLog.EntryWritten method.

When you create an System.Diagnostics.EventLog.EntryWritten delegate, you identify the method that will handle the event. To associate the event with your event-handling method, add an instance of the delegate to the event. The event-handling method is called whenever the event occurs, until you remove the delegate. For more information about handling events with delegates, see TBD.

See Also

EventLog Class | EventLog MembersTopic | System.Diagnostics Namespace