码迷,mamicode.com
首页 > 数据库 > 详细

DbgPrint/KdPrint输出格式控制

时间:2014-08-01 10:48:01      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:http   使用   for   ar   html   htm   .net   学习   

在驱动编程学习中,往往需要通过DbgPrint或者KdPrint来输出调试信息,对于Check版本,KdPrint只是DbgPrint的一个宏定义,而对于Free版本,KdPrint将被优化掉。这些输出信息可以通过DebugView对内核的监控来看到。

KdPrint is identical to the DbgPrint routine in code that is compiled in a checked build environment. This routine has no effect if compiled in a free build environment. Only kernel-mode drivers can call the KdPrint routine.

下面还是说一下他们的输出格式控制吧:

符号 格式说明符 类型 %c, %lc ANSI字符 char %C, %wc 宽字符 wchar_t %d, %i 十进制有符号整数 int %D 十进制__int64 __int64 %L 十六进制的LARGE_INTEGER LARGE_INTEGER %s, %ls NULL终止的ANSI字符串 char* %S, %ws NULL终止的宽字符串 wchar_t* %Z ANSI_STRING字符串 ANSI_STRING %wZ UNICODE_STRING字符串 UNICODE_STRING %u 十进制的ULONG ULONG %x 小写字符十六进制的ULONG ULONG %X 大写字符十六进制的ULONG ULONG %p 指针Pointer 32/64位 

就那么多。根据DDK上说明,Unicode格式(%C, %S, %lc, %ls, %wc, %ws, and %wZ)只能在 IRQL = PASSIVE_LEVEL时才能使用。

 

Copyed From 程序人生 Home Page:http://www.programlife.net Source URL:http://www.programlife.net/dbgprint-kdprint-format.html

DbgPrint/KdPrint输出格式控制,布布扣,bubuko.com

DbgPrint/KdPrint输出格式控制

标签:http   使用   for   ar   html   htm   .net   学习   

原文地址:http://www.cnblogs.com/meihao1989/p/3884308.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!