[置頂]

書單: 安迪葛洛夫:Only paranoid survives.

Jan 17, 2008

Using DbgPrint under Vista

If you want to use DbgPrint() to do kernel driver debugging, it
works fine under Windows XP but NOT Vista!

By http://msdn2.microsoft.com/en-us/library/ms792790.aspx, there
is a description:
"the following two function calls are identical:

DbgPrint ( Format, arguments )

DbgPrintEx ( DPFLTR_DEFAULT_ID, DPFLTR_INFO_LEVEL, Format, arguments )"

and http://msdn2.microsoft.com/en-us/library/ms792789.aspx gives
very good explaination and example! for you to learn the new strategy
for debugging kernel drivers.

(To take advantage of new way, please read the above article
carefully. But, if you only want to let your "DbgPrint" debug message
showed, read the following message.)

If you still used the old-style DbgPrint to print debug message, you can:

1. Create or open the key :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Debug Print Filter

2. Under the key, create a DWORD value, DEFAULT. (Case sensitive !!)

3. Set the value of DEFAULT 0x00000008

4. Reboot.

5. It's ok! Now "run as administrator" to launch your lovely
DbgView.exe to capture your important debug message!


It is not necessary to replace you DbgView, but if you want to
update to the lastest version, it is 4.74.

http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx

No comments: