全部博文(930)
分类: WINDOWS
2010-04-19 17:41:17
1) 直接打印字符串。
DbgPrint(“Hello World!”);
2) 空结尾的字符串,你可以用普通得C 语法表示字符串常量
char variable_string[] = “Hello World”;
DbgPrint(“%s”,variable_string);
3) 空结尾的宽字符串(WCHAR 类型 )
WCHAR string_w[] = L“Hello World!”;
DbgPrint(“%ws”,string_w);
或者
DbgPrint(“%S”,string_w);
4)Unicode 串,由UNICODE_STRING 结构描述, 包含16 位字符。
typedef struct _UNICODE_STRING{
USHORT Length;
USHORT MaximumLength;
PWSTR Buffer;
}UNICODE_STRING , *PUNICODE_STRING;
UNICODE_STRING string_unicode;
RtlInitUnicodeString(&string_unicode, L”Hello World!”);
DbgPrint(“%wZ\n”,&string_unicode);
5) ANSI 串,由ANSI_STRING 结构描述,包含8 位字符。
typedef struct _STRING{
USHORT Length;
USHORT MaximumLength;
PCHAR Buffer;
}STRING, *PANSI_STRING;
STRING bar;
或者: ANSI_STRING bar;
RtlInitAnsiString(&bar,”Hello World!”);
DbgPrint(“%Z\n”,&bar);
DebugPrint 格式说明符
根据DDK 上说明,Unicode 格式(%C, %S, %lc, %ls, %wc, %ws, and %wZ) 只能在 IRQL = PASSIVE_LEVEL 时才能使用.
chinaunix网友2010-06-01 06:29:51
MBT is based on Africa's indigenous people to create innovative walking barefoot, and wear this shoe can stimulate the body to relax the muscles so that the muscles of heat to be released, consumed calories, thus to achieve weight loss results. MBT's pursuit of beauty in order to satisfy customers, design a variety of styles, such as Mbt Chapa shoe, MBT Lami Shoe