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

How to print out debug message in release version driver ???

0 views
Skip to first unread message

Xu Wen Bin

unread,
Feb 9, 2002, 10:49:41 AM2/9/02
to
Hi Everybody:
Recently I met a strange problem, which only occurs in release
version driver. I want to print out simple debug message in release
version driver. But I don't know how to do. I ever tried to #define
DEBUG just before _DbgPrint(...) funtion. It doesn't work at all. Any
idea ? Thank you in advance.

Skeeter
02/09/2002

Spiro Trikaliotis

unread,
Feb 9, 2002, 11:12:50 AM2/9/02
to
Hello,

just use DbgPrint(), it is "active" with the release version of a
driver. I assume you're using KdPrint() normally? This is not
effective in a release driver, but DbgPrint() really is.

HTH,
Spiro.

Salim Virani

unread,
Feb 9, 2002, 11:09:05 AM2/9/02
to
I hope you are using DbgPrint(...) to print and not KdPrint( ... ).

Do not know what is _DbgPrint( .. ). I guess _DbgPrint( ..) has been defined
in your environement to do nothing in free build and to DbgPrint() in
checked build.

--Salim

"Xu Wen Bin" <wb...@yahoo.com> wrote in message
news:2a7b8e44.02020...@posting.google.com...

Page Fault

unread,
Feb 9, 2002, 2:12:10 PM2/9/02
to
DbgPrint works on the retail build of drivers and Windows NT/2K/XP.
Look at ntddk.h ...

#ifndef _DBGNT_

ULONG
_cdecl
DbgPrint(
PCH Format,
...
);

// end_wdm

ULONG
_cdecl
DbgPrintReturnControlC(
PCH Format,
...
);

// begin_wdm
#endif // _DBGNT_

wb...@yahoo.com (Xu Wen Bin) wrote in message news:<2a7b8e44.02020...@posting.google.com>...

Gary Li

unread,
Feb 9, 2002, 3:50:31 PM2/9/02
to
If you don't see print traces at free build, you must be using KdPrint()
like functions in your driver.
You may either #define DBG to make them work in the free build, or redefine
KdPrint() as DbgPrint().

-Gary

"Xu Wen Bin" <wb...@yahoo.com> wrote in message
news:2a7b8e44.02020...@posting.google.com...

Xu Wen Bin

unread,
Feb 9, 2002, 10:06:58 PM2/9/02
to
Thank all of you very very much. I will try it right now.

Skeeter

0 new messages