我有一个必须在 Windows 事件查看器中写入信息的服务应用程序。碰巧它有一个西班牙语版本,并且需要在文本中包含拉丁字符,因此当信息写入偶数查看器时,它显示不正确。我的 .mc 文件如下:
; // ***** log_messages.mc *****
; // This is the header.
MessageIdTypedef=DWORD
SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
Warning=0x2:STATUS_SEVERITY_WARNING
Error=0x3:STATUS_SEVERITY_ERROR
)
FacilityNames=(System=0x0:FACILITY_SYSTEM
Runtime=0x2:FACILITY_RUNTIME
Stubs=0x3:FACILITY_STUBS
Io=0x4:FACILITY_IO_ERROR_CODE
)
LanguageNames=(Spanish=0x0c0a:MSG00c0a)
; // The following are message definitions.
MessageId=0x1
Severity=Informational
Facility=Runtime
SymbolicName=MSG_INFO
Language=Spanish
Información: %1
.
MessageId=0x2
Severity=Warning
Facility=Runtime
SymbolicName=MSG_WARNING
Language=Spanish
Precaución: %1
.
MessageId=0x3
Severity=Error
Facility=Runtime
SymbolicName=MSG_ERROR
Language=Spanish
Error: %1
.
显示信息时,例如信息事件,拉丁字符显示不正确:
如果有人遇到这个问题并且可以帮助我,谢谢。