Event Logging
-
My application(.EXE) drops a buch of events into the event log for the network admin folks and other users. In my MFC prject, I have an event message file .MC which is compiled separatedly using "mc" command line utility. After message compilation, .rc, .h and MSG00001.bin files are created by "mc". The problem is that I only know how to produce event message resource table for the evnt viewer using command line "rc"(produces .res) and "link" step, which finally produces .dll(it will contain the table). To automate this process, I had to write a batch file, which executes all these utilites. This batch file is automatically executed in the post-build step - pretty cumbersome and boring, isn't it? This is the old Win32 way of doing things for the event viewer, and I don't particularly like it. I know that the message resource table can be easily contained within the same executable that runs my project, which will save the headache of managing two separate files, .EXE - the program, and .DLL - program's event message table. Tried many things with .rc files and recourse.h - event viewer only recognizes messages from the .dll. Does anyone know how to properly merge .rc and .res files within the same project to create one common resource table that will contain the prject's resources as well as its event message table. Will be happy to digest any hints. Thanks. Kirill
-
My application(.EXE) drops a buch of events into the event log for the network admin folks and other users. In my MFC prject, I have an event message file .MC which is compiled separatedly using "mc" command line utility. After message compilation, .rc, .h and MSG00001.bin files are created by "mc". The problem is that I only know how to produce event message resource table for the evnt viewer using command line "rc"(produces .res) and "link" step, which finally produces .dll(it will contain the table). To automate this process, I had to write a batch file, which executes all these utilites. This batch file is automatically executed in the post-build step - pretty cumbersome and boring, isn't it? This is the old Win32 way of doing things for the event viewer, and I don't particularly like it. I know that the message resource table can be easily contained within the same executable that runs my project, which will save the headache of managing two separate files, .EXE - the program, and .DLL - program's event message table. Tried many things with .rc files and recourse.h - event viewer only recognizes messages from the .dll. Does anyone know how to properly merge .rc and .res files within the same project to create one common resource table that will contain the prject's resources as well as its event message table. Will be happy to digest any hints. Thanks. Kirill
Just put this line in the top of the project's .rc file...
1 11 msg00001.bin
- Anders Money talks, but all mine ever says is "Goodbye!"