DbgPrint, &!STATUS!

Hello!

I’m looking at the usbsamp KMDF sample and in there I find stuff like this:

UsbSamp_DbgPrint(1, (“WdfDeviceCreate failed with Status code %!STATUS!\n”, status));

If the above line is supposed to output the status code in a human readable format it would be great news! However, the only thing that end up in my log is !STATUS! which isn’t helpful at all.

As far as I can understand from the documentation of DbgPrint there aren’t any special formats like %!STATUS!. What is going here? Is there another DbgPrint that I don’t know about?

Regards,
Mattias

%!STATUS! is used by the trace viewers and not understood by DbgPrint.

OK. I’m using DebugView and the only thing I get as output from this is !STATUS!. Is there some configuration that needs to be done in the tracer? Do you know where I can get more information on this?

Regards,
Mattias

-----Ursprungligt meddelande-----
Fr?n: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] F?r xxxxx@gmail.com
Skickat: den 30 oktober 2007 13:03
Till: Windows System Software Devs Interest List
?mne: RE:[ntdev] DbgPrint, &!STATUS!

%!STATUS! is used by the trace viewers and not understood by DbgPrint.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

You have to enable WPP tracing in the sample, and then use one of the trace
viewers such as TraceView or TraceLog (see tools\tracing in the WDK). Just
because the name has DbgPrint in it this is not targeted for the DbgPrint
statement.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

“Mattias Brändström” wrote in message
news:xxxxx@ntdev…
OK. I’m using DebugView and the only thing I get as output from this is
!STATUS!. Is there some configuration that needs to be done in the tracer?
Do you know where I can get more information on this?

Regards,
Mattias

-----Ursprungligt meddelande-----
Från: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] För xxxxx@gmail.com
Skickat: den 30 oktober 2007 13:03
Till: Windows System Software Devs Interest List
Ämne: RE:[ntdev] DbgPrint, &!STATUS!

%!STATUS! is used by the trace viewers and not understood by DbgPrint.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

This is Event Tracing For Windows nonsense that is not compatible with standard printf formatting. Some will claim this as a bonus feature for ETW, others as yet another reason to avoid ETW like the plague. DebugView shows you printf formatted output, not ETW output, and somewhat by accident printf format processing ends up outputting unknown format specifications as you observe.

To recap: the driver you are looking at can be compiled to output to the standard dbgprint console or to ETW (or perhaps both) and uses nonstandard ETW-only format specifications which result in the observed behavior in DebugView.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mattias Br?ndstr?m
Sent: Tuesday, October 30, 2007 8:55 AM
To: Windows System Software Devs Interest List
Subject: SV: [ntdev] DbgPrint, &!STATUS!

OK. I’m using DebugView and the only thing I get as output from this is !STATUS!. Is there some configuration that needs to be done in the tracer? Do you know where I can get more information on this?

Regards,
Mattias

-----Ursprungligt meddelande-----
Fr?n: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] F?r xxxxx@gmail.com
Skickat: den 30 oktober 2007 13:03
Till: Windows System Software Devs Interest List
?mne: RE:[ntdev] DbgPrint, &!STATUS!

%!STATUS! is used by the trace viewers and not understood by DbgPrint.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer