Bug #592


Need tools to build cmd/smbsrv/smbd/eventlog.dll

Added by Gordon Ross over 11 years ago. Updated over 1 year ago.

cifs - CIFS server and client
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


Need tools to build cmd/smbsrv/smbd/eventlog.dll

The fix for 6861058 (MMC: Error message printed on log entries) introduced an eventlog.DLL file, which CIFS clients running the MMC "event viewer" will fetch from the "C$" share (also introduced
with the fix for this CR).

This DLL is not really a library, but a "resource-only" DLL delivering "event description" strings, which are formatting messages for the "vendor-specific" range of event IDs.
More information on how Windows clients process event descriptions and other localized strings can be found here:

Normally, eventlog.DLL is compiled using the MS Visual Studio message compiler (the commands: MC, RC, LINK).

The overall process in MS VC is:

1: Create a message compiler input (.mc) file with the source for your event messages. (See MSDN for details on what a .mc file looks like)

2: Compile the message file to create a resource compiler input file:
MC -v -w -s -h c:\mymessages -r c:\mymessages
where c:\mymessages is the location of the output files and is the name of the input file.
Note: The message compiler produces an output header (.h) file that defines the message IDs in the resource compiler output (.rc).

3: Compile the output file (.rc) from the message compiler to create a resource file (.res):
RC /v output_file.rc

4: Create a resource DLL file from the .res file:
LINK /DLL /NOENTRY resource_file.res

Ideally, we would not have this DLL in our source tree. We'd like a little "cross compilation" tool that can do the equivalent of the above procedure, but running on our build system. Not sure if such a thing exists. (pointers appreciated!:)

Actions #1

Updated by Gordon Ross over 11 years ago

  • Priority changed from Normal to Low
Actions #2

Updated by Yuri Pankov about 11 years ago

  • Difficulty set to Medium
  • Tags set to needs-triage

How should/does the input file containing the messages look like?

Actions #3

Updated by Gordon Ross about 11 years ago

We have some flexibility about the format of the input messages file.
In the last system I saw that used something like this, they looked like:

[[11|1|1|0|4|"OptionalString"]]= This is message ID one.
[[11|1|2|0|4|""]]= Messages can have embedded newlines\r\nand positional parameters (%1, %2, etc) but is all one line in this file.
[[11|1|3|0|4|""]]= This is message id three

I don't remember exactly what all the numbers in the square brackets are,
but I think they were a "facility" code (11?), message ID, some attributes, etc.

I suspect that if we write this as a two-way tool, that can both extract
messages from an existing DLL, and create a new DLL, the extraction
component will help us figure out what all the numbers are for.

There's also a format the MS tools appear to use, described here:

Actions #4

Updated by Gordon Ross over 1 year ago

  • Category set to cifs - CIFS server and client

Also available in: Atom PDF