Trace Message Header File
A trace message header (TMH) file is a text file that contains declarations of functions and variables used by the tracing code that WPP generates. The header file also includes macros that add trace message formatting instructions to a PDB file of a trace provider, such as a kernel-mode driver or user-mode application.
WPP generates the TMH file automatically when you compile a trace provider that includes WPP macros. The TMH file has the same name as the source file, but with a .tmh file name extension. WPP saves the file in the same directory as the source file.
When you add the WPP macros to source code, you must also add an #include directive for the TMH file that WPP will generate. The include statement has the form:
This include statement must appear after the definition of the WPP_CONTROL_GUIDS macro, but before any calls to the WPP macros.
For more information, see Adding WPP Macros to a Trace Producer and see TraceDrv, a sample driver that was designed for software tracing. The TraceDrv sample is available to download from Windows hardware development samples.