如何为自定义EventViewer创建message.dll? mc.exe

时间:2018-10-08 12:43:41

标签: c# windows events logging event-viewer

我如何创建自定义message.dll,该消息将存储在regedit->〜EventLog \ Apllication \ myCustomApplication中?我使用了msdn文档中的语法,但是不起作用。我的邮件文件格式为.mc C:\ customLog \ mesMC.mc 我在〜\ customLog目录=〜\ customLog \ res中创建了结果文件夹 我的语法是我使用的:

C:\Program Files (x86)\Windows Kits\10\bin\x64>mc.exe -r "C:\customLog\res" -h "C:\customLog" C:\customLog\mesMC.mc

结果:

MC: Compiling C:\customLog\mesMC.man
C:\customLog\mesMC.man(17) : error : expected keyword - You
C:\customLog\mesMC.man(17) : error : expected keyword - have

我在ANSI中的message.mc内容:

  

MessageIdTypedef = DWORD

     

SeverityNames =(成功= 0x0:STATUS_SEVERITY_SUCCESS   信息= 0x1:STATUS_SEVERITY_INFORMATIONAL   警告= 0x2:STATUS_SEVERITY_WARNING错误= 0x3:STATUS_SEVERITY_ERROR)

     

FacilityNames =(系统= 0x0:FACILITY_SYSTEM运行时= 0x2:FACILITY_RUNTIME   存根= 0x3:FACILITY_STUBS Io = 0x4:FACILITY_IO_ERROR_CODE)   LanguageNames =(英语= 0x409:MSG00409)

     

MessageId = 0x3E7   SymbolicName = MSG_BAD_COMMAND   语言=英文   您选择了不正确的命令。测试评论#1

0 个答案:

没有答案