Now I use a C DEFINE to choose between WPP and DbgPrint at build time, using the same lines of code in my .c files.
Is there a way redefine the MACROs below to have WPP and DbgPrint at the same time?
SOURCES FILE
!IFDEF __wtt_tracing
RUN_WPP=$(SOURCES) -km -func:DebugPrint_D(LEVEL,(MSG,...)) -scan:wpp_types.h
!ENDIF
HEADER FILE
#ifdef _wtt_tracing
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID(EloAprG2Trace,(FF106D0F,6C07,492E,9851,48965000C092), \
WPP_DEFINE_BIT(DEBUG_LEVEL_ERROR) )
#else
#define DEBUG_LEVEL_ERROR 0x00000001
#define DebugPrint_D(level, x) \
if((level) & gPrint) { \
DbgPrint x; \
}
#endif
.C source file
DebugPrint_D(DEBUG_LEVEL_ERROR,(" Evt Io failed status %s\n", __STATUS));
Take a look at http://www.osronline.com/article.cfm?article=375
WPP_DEBUG is your friend here.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
-----Original Message-----
From: xxxxx@yahoo.com [mailto:xxxxx@yahoo.com]
Posted At: Wednesday, July 07, 2010 4:50 PM
Posted To: ntdev
Conversation: WPP AND Debug Print in the same build
Subject: WPP AND Debug Print in the same build
Now I use a C DEFINE to choose between WPP and DbgPrint at build time,
using
the same lines of code in my .c files.
Is there a way redefine the MACROs below to have WPP and DbgPrint at
the same
time?
SOURCES FILE
!IFDEF __wtt_tracing
RUN_WPP=$(SOURCES) -km -func:DebugPrint_D(LEVEL,(MSG,…))
-scan:wpp_types.h
!ENDIF
HEADER FILE
#ifdef _wtt_tracing
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID(EloAprG2Trace,(FF106D0F,6C07,492E,9851,48965000C
092),
\
WPP_DEFINE_BIT(DEBUG_LEVEL_ERROR) )
#else
#define DEBUG_LEVEL_ERROR 0x00000001
#define DebugPrint_D(level, x) \
if((level) & gPrint) { \
DbgPrint x; \
}
#endif
.C source file
DebugPrint_D(DEBUG_LEVEL_ERROR,(" Evt Io failed status %s\n",
__STATUS));
__________ Information from ESET Smart Security, version of virus
signature
database 5260 (20100707) __________
The message was checked by ESET Smart Security.
http://www.eset.com