Registering Event Source Names

Before logging any event, the application must register itself as an event source name. The event source name is the name of the application that will be logging the events. The registering process includes the creation of a registry subkey in the Windows registry. The subkey name is the event source name or application name. This subkey is created under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application" where "Application" is the event source name to be registered.

While creating this subkey, the path of the message DLL is stored as the named value for the subkey. This message DLL is used to look for the message when the application logs an event.

To perform all these operations, the Event Logger object provides the RegisterCurrentEventSource method.

 

See Also