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!

Creating EventLog Components

You create EventLog components when you want to build event log monitoring functionality into your application. EventLog components allow you to connect to existing event logs, write entries to them, and react to entries the logs receive.

To create EventLog components programmatically

  1. Create an instance of the EventLog class in code. You code might look like this:
    [Visual Basic]
    Dim myEL As New System.Diagnostics.EventLog
    [C#]
    System.Diagnostics.EventLog myEL = new EventLog();
  2. Configure any other necessary properties for your component. For details, see Configuring EventLog Components.
Note You must set the Monitoring property on your component instance to true before your component will work.

See Also

Introduction to the EventLog Component  | Configuring EventLog Components