Export (0) Print
Expand All

What are PRE / POST macros?

PRE-logging and POST-logging macros define WPP_LEVEL_PRE(level) and WPP_LEVEL_POST(level) macros. The latter are user code that becomes part of the tracing function's expansion. PRE- and POST-logging macros can be used for any in-process setup or for cleanup around trace points.

By default they are set to do nothing. However, you can define them to add some pre-logging and post-logging logic.


PRE macro // If defined
If (WPP_CHECK_INIT && (Level,Flag) is enabled) {
....Call TraceMessage;
}
POST macro // If defined

For an example about how to define the PRE/POST macros, see How are Trace-If expressions used?.

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft