Maybe I didn’t read the OP’s post correctly, but my understanding was that
he was using WPP_BIT_1 as the LEVEL parameter for his trace function.
If this is not correct and the OP uses “ERROR” and “WARNING” for his LEVEL
parameters, then clearly my suggestion will not help.
Shahar
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Roddy
Sent: Monday, May 30, 2005 12:57 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WPP tracing
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Shahar Talmi
Sent: Sunday, May 29, 2005 6:49 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] WPP tracing
> 4 Add to the mydriver.h
> #define WPP_CONTROL_GUIDS \
>
>
WPP_DEFINE_CONTROL_GUID(MyDriver,(C56386BD,7C67,4264,B8D9,C4A5
3B93CBEB), \
> WPP_DEFINE_BIT(ERROR) /* bit 0 =
0x00000001 */ \
> WPP_DEFINE_BIT(WARNING) /* bit 1 = 0x00000002 */ \
> )
The bits you defined are “ERROR” and “WARNING”, if you want to use
WPP_BIT_1 instead you should do something like:
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID(MyDriver,(C56386BD,7C67,4264,B8D9,C4A5
3B93CBEB),
\
WPP_DEFINE_BIT(WPP_BIT_1) /* bit 0 = 0x00000001 */ \
WPP_DEFINE_BIT(WPP_BIT_2) /* bit 1 = 0x00000002 */ \
)
Not really. Look at the examples in the ddk, (toaster and tracedrv).
For example toaster does the following:
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID(Toaster,(C56386BD,7C67,4264,B8D9,C4A53B93CBEB),
\
WPP_DEFINE_BIT(ERROR) /* bit 0 = 0x00000001 */ \
WPP_DEFINE_BIT(WARNING) /* bit 1 = 0x00000002 */ \
WPP_DEFINE_BIT(TRACE) /* bit 2 = 0x00000004 */ \
WPP_DEFINE_BIT(INFO) /* bit 3 = 0x00000008 */ \
WPP_DEFINE_BIT(DebugFlag04) /* bit 4 = 0x00000010 */ \
WPP_DEFINE_BIT(DebugFlag05) /* bit 5 = 0x00000020 */ \
WPP_DEFINE_BIT(DebugFlag06) /* bit 6 = 0x00000040 */ \
WPP_DEFINE_BIT(DebugFlag07) /* bit 7 = 0x00000080 */ \
WPP_DEFINE_BIT(DebugFlag08) /* bit 8 = 0x00000100 */ \
WPP_DEFINE_BIT(DebugFlag09) /* bit 9 = 0x00000200 */ \
WPP_DEFINE_BIT(DebugFlag10) /* bit 10 = 0x00000400 */ \
WPP_DEFINE_BIT(DebugFlag11) /* bit 11 = 0x00000800 */ \
WPP_DEFINE_BIT(DebugFlag12) /* bit 12 = 0x00001000 */ \
WPP_DEFINE_BIT(DebugFlag13) /* bit 13 = 0x00002000 */ \
WPP_DEFINE_BIT(DebugFlag14) /* bit 14 = 0x00004000 */ \
WPP_DEFINE_BIT(DebugFlag15) /* bit 15 = 0x00008000 */ \
WPP_DEFINE_BIT(DebugFlag16) /* bit 16 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag17) /* bit 17 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag18) /* bit 18 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag19) /* bit 19 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag20) /* bit 20 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag21) /* bit 21 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag22) /* bit 22 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag23) /* bit 23 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag24) /* bit 24 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag25) /* bit 25 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag26) /* bit 26 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag27) /* bit 27 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag28) /* bit 28 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag29) /* bit 29 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag30) /* bit 30 = 0x00000000 */ \
WPP_DEFINE_BIT(DebugFlag31) /* bit 31 = 0x00000000 */ \
)
And tracedrv:
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID(CtlGuid,(d58c126f, b309, 11d1, 969e,
0000f875a5bc), \
WPP_DEFINE_BIT(TRACELEVELONE) \
WPP_DEFINE_BIT(TRACELEVELTWO) )
Both of which look to me to be the equivalent to what the op claims he did:
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID(MyDriver,(C56386BD,7C67,4264,B8D9,C4A53B93CBEB),
\
WPP_DEFINE_BIT(ERROR) /* bit 0 = 0x00000001 */ \
WPP_DEFINE_BIT(WARNING) /* bit 1 = 0x00000002 */ \
)
If I had a clue as to what he did wrong I would have said something, but I’m
fairly certain that he does not have to do as you suggest.
I assume that he is passing ERROR or WARNING to his MyDriverDebugPrintWpp
trace routine as the LEVEL parameter.
He has some other error.
=====================
Mark Roddy
Windows .NET/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032 www.hollistech.com
Shahar
“Dany Polovets” wrote in message
> news:xxxxx@ntdev…
> Hello,
> I am trying to add WPP tracing support to my Win2003 driver.
> The following changes are done in the driver:
>
> 1. Add to the sources file
> RUN_WPP=$(SOURCES)<br>> -km<br>> -func:MyDriverDebugPrintWpp(LEVEL,MSG,…)
>
> 2. Add WPP_INIT_TRACING(DriverObject, RegistryPath); in DriverEntry
> and
> WPP_CLEANUP(DriverObject); in DriverUnload
>
> 3. Add #include “mydriver.tmh”
>
> 4 Add to the mydriver.h
> #define WPP_CONTROL_GUIDS <br>>
> WPP_DEFINE_CONTROL_GUID(MyDriver,(C56386BD,7C67,4264,B8D9,C4A5
> 3B93CBEB),
> <br>> WPP_DEFINE_BIT(ERROR) /* bit 0 =
> 0x00000001 / <br>> WPP_DEFINE_BIT(WARNING) / bit 1 = 0x00000002 */ <br>> )
>
>
> Now when I am trying to compile the driver there is an error in
> MyDriverDebugPrintWpp() call: " ‘WPP_BIT_1’ : undeclared identifier ".
> If I define WPP_BIT_1 manually (#define WPP_BIT_1 1) and run the
> driver with TraceView utility, there are no messages printed.
>
> Can anyone point to the error in what I did.
> Thanks,
> Dany
> This mail was sent via storeage.com
>
> ****************************************
>
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals &
> computer viruses.
> ****************************************
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@hollistech.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@safend.com To unsubscribe
send a blank email to xxxxx@lists.osr.com