ucertify Level: Protégé
 Registered: 13-09-2005 Posts: 8
|
What is the CreateEventSource method of the EventLog class?
The CreateEventSource method of the EventLog class establishes an application as a valid event source for writing event information to a particular event log on a computer. The event log used to write entries can be the event log available by default on a computer or a custom event log. This method can also be used to create a custom event log on a computer.
The EventLog class defines two overloaded versions of the method. Their signatures are as follows:
1. public static void CreateEventSource(string, string);
This overloaded version of the method accepts two string parameters. The first string parameter represents the source name by which the application is registered on the local computer. The second string parameter is the name of the log that will be used for writing event information. If the log specified by the second string parameter does not exist, a custom log is created on the computer.
2. public static void CreateEventSource(string, string, string);
This overloaded version of the method accepts three string parameters. The first string parameter represents the source name by which the application is registered on the specified computer. The second string parameter is the name of the log that will be used for writing event information. The third string parameter is the name of the computer. If the log specified by the second string parameter does not exist on the specified computer, a custom log is created on the computer.
About the Author:
uCertify was formed in 1996 with an aim to offer high quality educational training software and services in the field of information technology to its customers. uCertify provides exam preparation solutions for the certification exams of Microsoft, CIW, CompTIA, Oracle, Sun and other leading IT vendors. To know more about uCertify, please visit http://www.ucertify.com/
|