I am evaluating WPP and am trying to add it to my project. When I
build I get the error:
error C4013: 'WPP_BIT_' undefined; assuming extern returning int
I must have missed a step. I am trying to follow the sample code
osrusbfx2.
I have added this to my sources:
RUN_WPP=$(SOURCES) \
-km \
-func:TraceEvents(LEVEL,FLAGS,MSG,...) \
-gen:{km-WdfDefault.tpl}*.tmh (added this as a test, made no
difference)
I have added this to my header file:
/
*****************************************************************************
WPP Tracing stuff
*****************************************************************************/
#define WPP_CHECK_FOR_NULL_STRING //to prevent exceptions due to NULL
strings
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID(EpTraceGuid,(e7cd1840 ,f9bf, 11dc ,95ff ,
0800200c9a66), \
WPP_DEFINE_BIT(ES_ERRORS) /* bit 0 = 0x00000001
*/ \
)
/* You can have up to 32 defines. If you want more than that,\
\
you have to provide another trace control GUID */
#define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) WPP_LEVEL_LOGGER(flags)
#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) (WPP_LEVEL_ENABLED(flags)
&& WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl)
I include <driver.tmh> after my other header file.
I call it like this:
TraceEvents(TRACE_LEVEL_INFORMATION,
ES_ERRORS,
("This is a test trace message %d\n"),
9);
Any ideas on what is going wrong here ?
Thanks.