Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Event Logging

Event Logging

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SuperGeek
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • S SuperGeek

      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

      A Offline
      A Offline
      Anders Molin
      wrote on last edited by
      #2

      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!"

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups