Message Compiler Properties for Driver Projects

Sets the properties for the Message Compiler (MC.exe) tool. The compiler generates the message resource files that you can add to your project.

For example, if you are using the Event Tracing for Windows (ETW) kernel-mode API to add event tracing to a kernel-mode driver, you could use the message compiler to create a header file that contains definitions for the event provider, event attributes, channels, and events. You must include this header file in your source code. The message compiler creates a resource compiler script (*.rc) that you add to your project file.

Setting Message Compiler properties for driver projects

  1. Open the property pages for your driver project. Right-click the driver project in Solution Explorer and select Properties.
  2. In the property pages for the driver project, click Configuration Properties and then click Message Compiler.
  3. Set the properties for the project.

This property page is available if you add a message text file (.mc) or a manifest (.man) to your solution.

OptionDescription

Additional Options

Specifies additional options to pass to the Message Compiler (MC.exe) tool.

Ansi Input File

Specifies that the input file contains ANSI content (this is the default). (-a)

Ansi Message In Bin File

Specifies that the messages in the output .bin file should be ANSI. (-A)

Baseline Path

The path must point to the folder that contains the .BIN files that the baseline operation created. (-t directory)

Baseline Resource Path

The folder which contains the baseline manifest files. (-s directory)

Debug Output Path

The path in which to place the .dbg C include file. (-x path)

Enable Callout Macro

Adds a callout macro to invoke user code at logging. Not available for C#, and ignored. (-co)

Enable Debug Output Path

Enables the compiler to place the .dbg C include file specified by the Debug Output Path property.

File extension for the generated header

Specifies the extension of the generated header file. (-e extension)

Generate Baseline Resource

Creates a baseline of your instrumentation.

Generate C# (managed) logging class

Generates a C# (managed) logging class that includes methods that you would call to log events in your manifest. (-cs namespace)

Generate header file for containing counter names and GUIDs

Use this option to specify the folder into which you want the compiler to place the generated header file.

Generate Kernel Mode Logging Macros

Generates kernel-mode logging macros. (-km)

Generate MOF File

Generate down-level support for all functions and macros generated. MOF file will be generated from the manifest. MOF file will be placed in the location specified by the -h option (-mof).

Generate OLE2 Header

Generates an OLE2 header file. (-o)

Generate static C# (managed) logging class

Generates a static C# (managed) logging class that includes methods that you would call to log events in your manifest. (-css namespace)

Generate User Mode Logging Macros

Generate user-mode logging macros. (-um)

Generated Files Base Name

Specifies the base name of all generated files. (-z basename)

Generated RC and Binary Message Files Path

Specifies the path to the generated the RC and binary message files.

Header File Path

Specifies the path the generated header file. (-h path)

Maximum Message Length

Use this argument to have the compiler generate a warning if any message exceeds length characters. (-m length)

Prefix Macro Name

Use this argument to override the default prefix that the compiler uses for the logging macro names and method names. (-p prefix)

RC File Path

The folder into which you want the compiler to place the generated resource compiler script (.rc file) and the generated .bin files. (-r path)

Remove Characters From Symbolic Name

Use this argument to remove characters from the beginning of the symbolic name that you specified for the event. (-P prefix)

Set Customer Bit

Sets the Customer bit in the entire message Ids. (-c)

Terminate Message With Null

Terminates all strings with nulls in the message tables. (-n)

Unicode Input File

Specifies that the input file contains Unicode content. (-u)

The default is ANSI.

Unicode Message In Bin File

Specifies that the messages in the output .bin file are Unicode. (-U)

This is the default.

Use Base Name Of Input

Use this argument to have the compiler use the base name of the input file for the name of the output .bin files. (-b)

Use Decimal Values

Use this argument to use decimal values for the Severity and Facility constants in the header file instead of hexadecimal values. (-d)

Validate Against Baseline Resource

Use this argument when you create a new version of your manifest and want to check it for application compatibility against the baseline that you created using the -s option.

Verbose

Use this option to generate verbose output. (-v)

 

Related topics

Message Compiler (MC.exe)
WDK and Visual Studio build environment
Message compiler task
Event Tracing for Windows (ETW)

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft