Project

General

Profile

Bug #592

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

Added by Gordon Ross over 9 years ago. Updated almost 9 years ago.

Status:
New
Priority:
Low
Assignee:
Category:
-
Start date:
2010-12-30
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

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

The fix for 6861058 (MMC: Error message printed on log entries) http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6861058 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: http://msdn.microsoft.com/en-us/library/cc231409%28PROT.13%29.aspx

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 mymsg.mc
where c:\mymessages is the location of the output files and mymsg.mc 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!:)

History

#1

Updated by Gordon Ross over 9 years ago

  • Priority changed from Normal to Low
#2

Updated by Yuri Pankov almost 9 years ago

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

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

#3

Updated by Gordon Ross almost 9 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:
http://msdn.microsoft.com/en-us/library/aa363669.aspx

Also available in: Atom PDF