zoukankan      html  css  js  c++  java
  • DbgPrint/KdPrint输出格式控制

    在驱动编程学习中,往往需要通过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

  • 相关阅读:
    1,JAVA图形
    作业(2)
    作业(1)
    作业
    2.15 (第二次作业)
    60页2.6 (第二次作业)
    1.12 (第一次作业)
    27页1.8(第一次作业)
    26页1.3(第一次作业)
    作业第六次
  • 原文地址:https://www.cnblogs.com/meihao1989/p/3884308.html
Copyright © 2011-2022 走看看