Table of contents
TOC
Collapse the table of content
Expand the table of content

Can I tell if my trace provider is enabled for tracing?

Last Updated: 11/22/2016

Yes, you can use the WPP_LEVEL_ENABLED macro to tell whether your trace provider, such as a kernel-mode driver or user-mode application, is enabled for tracing and which flags are enabled. This is especially useful if your trace provider does extra work to prepare for software tracing.

For example, you can use a condition of the form:

If (WPP_LEVEL_ENABLED(flag) {
            // Tracing is enabled
            Prepare to trace
            DoTraceMessage(flag...);
}

Send comments about this topic to Microsoft

© 2017 Microsoft