How to Support Language-Independent Strings in Event LoggingLast reviewed: December 16, 1996Article ID: Q125661 |
The information in this article applies to:
SUMMARYInsertion strings in the event log entries are language-independent. Instead of using string literals as the insertion string, use "%%n" as the insertion string.
MORE INFORMATIONWhen the event viewer sees "%%n", it looks up the ParameterMessageFile value in the registry, under the source of the event, as in this example:
HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\ Services\ EventLog\ Security\ ... -or- HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\ Services\ EventLog\ System\ Service Control ManagerIt then calls the LoadLibrary() function of the ParameterMessageFile. Then it calls FormatMessage() using "n" as the ID. For example, suppose an event log entry has the source "Service Control Manager" and the description is "Failed to start the service due to the following error: %%245." In the registry, you find:
HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\ Services\ EventLog\ System\ Service Control Manager EventMessageFile... ParameterMessageFile REG_SZ kernel32.dll TypesSupported... ...Therefore, you need to follow these steps:
|
Additional reference words: 3.10 3.50 3.51 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |