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.
>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
"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