Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DbgPrint

0 views
Skip to first unread message

mkot...@my-deja.com

unread,
Nov 21, 2000, 9:47:55 PM11/21/00
to
Hi
Newbie question again

Is there a way to print messages to the debug console(WinDbg or OSR
DbgView) in a free build driver. The documentation seems to say that
DbgPrint does that, but doesnt work for me. And docs say that KdPrint
prints in the debug mode only.

Thanks!


Sent via Deja.com http://www.deja.com/
Before you buy.

Mark Roddy

unread,
Nov 22, 2000, 3:00:00 AM11/22/00
to
On Wed, 22 Nov 2000 02:47:55 GMT, mkot...@my-deja.com wrote:

>Hi
>Newbie question again
>
>Is there a way to print messages to the debug console(WinDbg or OSR
>DbgView) in a free build driver. The documentation seems to say that
>DbgPrint does that, but doesnt work for me. And docs say that KdPrint
>prints in the debug mode only.
>

DbgPrint works even if your driver has been compiled for the free
build. KdPrint is a macro that does nothing if DBG is undefined.

#if DBG

#define KdPrint(_x_) DbgPrint _x_

...

#else

#define KdPrint(_x_)

...

If you aren't seeing your debug prints using DbgPrint, make sure that
you haven't defeated your intentions by wrapping DbgPrint in a macro
that, like KdPrint, does nothing if DBG is not defined. If you are
running the latest windbag !dbgprint will dump the contents of the
debug print buffer.


Also you could always use the system log for this sort of message.

=
Mark Roddy
WindowsNT Windows2000 Consultant
Hollis Technology Solutions
http://www.hollistech.com
mailto:in...@hollistech.com

Joel Kolstad

unread,
Nov 24, 2000, 12:14:30 AM11/24/00
to
Another note:

"Mark Roddy" <ma...@wattanuck.mv.com> wrote in message
news:6mcn1tg9mrscc823o...@4ax.com...


> DbgPrint works even if your driver has been compiled for the free
> build. KdPrint is a macro that does nothing if DBG is undefined.
>
> #if DBG

...

Don't be a moron like I was and use:

#ifdef DBG

...since it's always defined, it's just either zero or non-zero. :-)

---Joel Kolstad

Glenn

unread,
Dec 5, 2000, 3:00:00 AM12/5/00
to
Hope you have solved it before this message, but this can be a hint
anyway, so my mistakes will not be repeated by you.
I use DbgPrint in my driver, and DbgView for reading the output. I
inherited a project from WinNT, where they used DbgMon, but that didn't
work on my win2000. DbgView did not work either, until I check the menu
"Options - Force Carriage Returns".
/Glenn
0 new messages